Commit graph

26 commits

Author SHA1 Message Date
Johannes Anderwald e9a0c8ba68 [USBSTOR]
- Add asserts
- Rewrite queue methods to accept the FDO only 
- Fix multiple synchronization bugs
- Don't start next irp before current irp has completed
- Use contiouslogicalbytes blocks from srb
- Should fix race conditions

svn path=/branches/usb-bringup/; revision=51764
2011-05-15 14:59:16 +00:00
Johannes Anderwald 793e8870ca [USBSTOR]
- Fix one more warning

svn path=/branches/usb-bringup/; revision=51760
2011-05-15 12:49:17 +00:00
Johannes Anderwald 5c5f758afa [USBSTOR]
- Silence warnings
- Silence traces
- Add asserts
- Add code to detect usb reset in progress. In that case cancel the request
- Add more code to synchronize urb action
- WIP, still hangs are observed

svn path=/branches/usb-bringup/; revision=51759
2011-05-15 12:47:54 +00:00
Michael Martin e5f521c90a [USBSTOR]
- Start implementing error handling.
- On errors use a worker thread to attempt a recovery. If successful restart the operation that failed.
- If STALL_PID is received reset the pipe of the device.
- Not entered into code path yet. WIP.

svn path=/branches/usb-bringup/; revision=51754
2011-05-15 11:23:16 +00:00
Michael Martin f1ec4fbe16 [USBSTOR]
- USBSTOR_SendRequest: The buffer for read/write may not be NonPagedPool, which is documented as a requirement for using MmBuildMdlForNonPagedPool. Also locking the buffers pages is also not an option as the routine is called at DISPATCH_LEVEL.
It so happens that Irp->MdlAddress is valid for read/write operations. Use it instead of procedure above.
- Add a sanity check to make sure the Mdl does describe the transfer buffer.
Fixes IRQL_NOT_LESS_OR_EQUAL bugcheck in windows. These changes also may fixed writing to device.

svn path=/branches/usb-bringup/; revision=51752
2011-05-15 08:23:32 +00:00
Johannes Anderwald be12088a55 [USBSTOR]
- Start implementing queued srb handling
- Implement SRB_FUNCTION_RELEASE_QUEUE, SRB_FUNCTION_FLUSH, SRB_FUNCTION_FLUSH_QUEUE
- WIP, not yet working perfectly

svn path=/branches/usb-bringup/; revision=51739
2011-05-14 18:09:00 +00:00
Johannes Anderwald 3f8c058a07 [USBSTOR]
- Start implementing write command
- Disabled for now as it causes corruptions

svn path=/branches/usb-bringup/; revision=51695
2011-05-13 14:44:24 +00:00
Johannes Anderwald 89aa9d3264 [USBSTOR]
- Fix bug in read command, which uses wrong format. LBA address is stored in the CDB10 struct
- Don't build the mdl for nonpaged pool if the driver passes an mdl (i/o paging requests)
- Usbstor can now list disk contents and browse files when used in Windows XP
- Need to implement SCSIOP_WRITE to write files

svn path=/branches/usb-bringup/; revision=51694
2011-05-13 14:04:38 +00:00
Johannes Anderwald eb228159bc [USBSTOR]
- Handle SCSIOP_MEDIUM_REMOVAL
- Handle paging i/o requests. These request don't provide a data buffer in the srb, but the buffer is stored in the irp' mdl
- Fix the hack for unimplemented Mode Sense command
- Usbstor now completes initializes and receives read requests
- Still need to fix read request, as Windows XP fails to recognize the disk format, WIP

svn path=/branches/usb-bringup/; revision=51693
2011-05-13 13:37:50 +00:00
Michael Martin 98ed611448 [USBSTOR]
- Add a check at USBSTOR_FdoHandleStartDevice to make sure the device uses Bulk Transfers.
- Use macros for initializing the Urbs. The macros ensure that the proper fields of the URB are set correctly.
Fixes failing of getting device descriptor and getting devices BlockLength.


svn path=/branches/usb-bringup/; revision=51691
2011-05-13 09:14:28 +00:00
Johannes Anderwald b0b03bfdd1 [USBSTOR]
- Rewrite scsi method to act asynchronous

svn path=/branches/usb-bringup/; revision=51673
2011-05-11 03:49:15 +00:00
Johannes Anderwald fc298e51a5 [USBSTOR]
- Partly implement test unit command

svn path=/branches/usb-bringup/; revision=51671
2011-05-10 23:26:56 +00:00
Johannes Anderwald fc34f0177d [USBSTOR]
- Start implementing SCSI read

svn path=/branches/usb-bringup/; revision=51654
2011-05-08 22:18:55 +00:00
Johannes Anderwald 45f27e8b8c [USBEHCI_NEW]
- Fix retrieving drive capacity
- Fix ufi command structures

svn path=/branches/usb-bringup/; revision=51649
2011-05-08 19:33:41 +00:00
Johannes Anderwald 5573560a44 [USBSTOR]
- Implement SCSI mode sense

svn path=/branches/usb-bringup/; revision=51609
2011-05-06 17:23:19 +00:00
Johannes Anderwald ff67bee091 [USBSTOR]
- Implement retrieving drive capacity
- Use constant from scsi.h instead of defining own format
- Don't reset returned parameters length to zero, as ioctl handler might set it


svn path=/branches/usb-bringup/; revision=51608
2011-05-06 16:25:01 +00:00
Johannes Anderwald 5c9e645604 [USBSTOR]
- Implement retrieving adapter descriptor (IOCTL_STORAGE_QUERY_PROPERTY)
- Implement retrieving device descriptor (IOCTL_STORAGE_QUERY_PROPERTY)
- Next Function to implement is SRB_FUNCTION_EXECUTE_SCSI

svn path=/branches/usb-bringup/; revision=51607
2011-05-06 13:29:27 +00:00
Johannes Anderwald c5af801a10 [USBSTOR]
- Rename common device extension, it conflicts with classpnp.h header structures
- Start implementing disk ioctls
- Implement SRB_FUNCTION_CLAIM_DEVICE, SRB_FUNCTION_RELEASE_DEVICE

svn path=/branches/usb-bringup/; revision=51585
2011-05-05 00:39:00 +00:00
Johannes Anderwald c071ae0f59 [USBSTOR]
- Make DeviceId generation to match ms usbstor
- Don't hardcode the device type in USBSTOR_PdoHandleQueryHardwareId
- Don't hardcode device type in USBSTOR_PdoHandleQueryCompatibleId
- Hackfix generation of instance id
- Add comments
- Cleanup code
- Usbstor now receives ioctl from disk.sys

svn path=/branches/usb-bringup/; revision=51582
2011-05-04 23:14:32 +00:00
Johannes Anderwald 8d93646c2d [USBSTOR]
- Rewrite hardware id / instance id matching
- Implement support for compatible id
- UsbStor still not attached to disk.sys, needs more research on how to get this done

svn path=/branches/usb-bringup/; revision=51580
2011-05-04 20:19:33 +00:00
Johannes Anderwald 062111f2e1 [USBSTOR]
- Don't free device descriptor if it failed to acquire it
- Don't move out of usb configuration array. Found by special pool
- Fix bug when storing interface information which lead to a overwrite
- Implement retrieving generic type for device
- Fix bugs in QueryDeviceId
- Implement querying hardware ids
- Implement querying instance ids
- With these changes, usbstor now initializes and create pdo, which is also enumerated
- Needs more code / fixes so that disk.sys attaches to usbstor
- WIP

svn path=/branches/usb-bringup/; revision=51575
2011-05-04 12:33:01 +00:00
Johannes Anderwald 7821a805ef [USBSTOR]
- Implement retrieving string device type from SCSI device type
- Handle BusQueryDeviceId
- Implement support routines for sending CBW / CSW / Data
- Implement retrieving device type (SCSI inquiry request)
- WIP

svn path=/branches/usb-bringup/; revision=51567
2011-05-03 19:40:03 +00:00
Johannes Anderwald 991d02daa5 [USBEHCI_NEW]
- Remove function declaration
[USBSTOR]
- Start on usbstor driver (USB Mass Storage Driver)
- Implement reading device descriptor / configuration descriptor
- Implement scanning of configuration descriptor for bulk in / bulk out endpoints
- Implement selecting configuration and interface and verify selected interface
- Implement reading max lun and create child device object for each lun
- Handle PnP requests for functional device object
- Implement support routines to send urb's to lower device object (usbhub)
- Start implementing PDO routines

svn path=/branches/usb-bringup/; revision=51563
2011-05-03 00:15:23 +00:00
Amine Khaldi 2a1f050cb3 [CMAKE]
- Add USB modules to build.

svn path=/branches/cmake-bringup/; revision=51299
2011-04-09 16:01:04 +00:00
Amine Khaldi 62ff6c86b7 - Delete rbuild and the rbuild files.
svn path=/branches/cmake-bringup/; revision=48237
2010-07-24 19:21:04 +00:00
Amine Khaldi c424146e2c Create a branch for cmake bringup.
svn path=/branches/cmake-bringup/; revision=48236
2010-07-24 18:52:44 +00:00