- Add stub hidusb driver
- Hidusb driver is reponsible to connect with the hidclass driver (not yet present) and connect hid framework with usb hid devices
svn path=/branches/usb-bringup/; revision=53500
- Don't leave DISPATCH_LEVEL while holding a spin lock acquired at DISPATCH_LEVEL
- Synchronize cancellation checking by acquiring the cancel spin lock
svn path=/branches/usb-bringup/; revision=52071
- Comment out getting usb device interface. It is currently unused and usbhub does not yet support it
- Forward pnp capabilities request to lower device object
- Fix compilation by Usurp
svn path=/branches/usb-bringup/; revision=52063
- Check if the port is usb 2.0 controller. In that case call the Usb2.0 initialize function
- Prevents crash when used with usbohci
svn path=/branches/usb-bringup/; revision=52036
- Fix OHCI_ISO_TD structure. Fixes host system crashes in Windows XP
- Fix multiple bugs in isochronous transfer implementation
- Still not yet working, as the interrupt completion is not fired yet
svn path=/branches/usb-bringup/; revision=51998
- Implement function to retrieve isochronous head endpoint descriptor
- Implement function to retrieve current frame number
- Set isochronous descriptor flag for head endpoint
- Implement retrieve device status for devices
- Implement retrieve class status from device
- Partly implement isochronous descriptor handling in usb queue
- Start implementing isochronous transfers in ISUBRequest
- Code currently not tested as the Virtual Machine with XP + ReactOS usbohci driver brings down the host system when starting the iso transfers. Ironically it crashes in MS usbohci driver
svn path=/branches/usb-bringup/; revision=51957
- Set up periodic threshold (90 %)
- Add function to retrieve interrupt endpoints
- Add function to retrieve specific descriptors from interface. These are used by HID devices such as mice / keyboards
- Add function to retrieve interrupt interval
- Enqueue all endpoint descriptors at the end of the associated queue
- Only notify hardware of insertion when it is an bulk / control request
- Scan interrupt endpoint list to find the completed transfer descriptor
- Add debugging function to print out linked endpoint descriptors
- Interrupt transfers are now implemented.
- Tested in Windows XP SP3 + Vbox 4.04 + Microsoft 5-Button Mouse. The HID mouse installs, initializes and starts up. Unfortunately the mouse does not work as expected yet
svn path=/branches/usb-bringup/; revision=51922
- Remove dead code
- Silence traces
- Pass status & DoneHead as parameters to dpc routine
- Move IUSBRequest cleanup code into new function and use it for bulk / control transfer cleanup
- Fix bugs in AllocateEndpointDescriptor. It did not take the device address into account. It also did not respect the direction of the descriptor
- Implement support for bulk transfer requests
- Handle irp completion in CompletionCallback
- Tested in Windows XP SP3 + Vbox 4.04 + USB2.0 disabled + ReactOS usbstor + USB mass storage device
- OHCI Mass storage support is now also ready
- Next interrupt transfers
svn path=/branches/usb-bringup/; revision=51917
- Add glue code for supporting iso transfers
- Remove dead from Handle
- Remove broken asserts
- Add support for string descriptors
- Add support for class specific endpoint requests (Needs be ported to usbehci)
- Link to usbd driver
- Add support for retrieving string descriptor
- Rewrite configuration descriptor handling in IUSBDevice. New code is smaller, smarter and handles a lot more cases. Needs to be ported to usbehci
- Wrap usbdlib.h include in extern c macro, it has c linkage
- Control transfers should now work
- Need to implement support for isochronous / bulk / interrupt transfers until functional
- Tested with Bluetooth USB Stick (multi function, interrupt / bulk / control / isochronous) / USB Microphone (isochronous & control) in XP SP3
svn path=/branches/usb-bringup/; revision=51900
- Add sanity checks
- Preserve command status value when notifying the hc that a control / bulk endpoint was added
- Re-enable root hub notification interrupt when reset port has been completed
- Dispatch processing to USBQeueu when DoneHead event arrives
- Scan endpoints to find the logical endpoint which was completed by the hardware
- Signal completion to IUSBRequest by calling CompletionCallback
- Create a final transfer descriptor which is linked to the endpoint descriptor
- Control transfers now appear to be working (Device retrieves device descriptor / configuration descriptor and succeeds in setting device address)
- Configuration parsing code needs more work now (currently fails there due to invalid / unexpected configuration descriptor from device)
svn path=/branches/usb-bringup/; revision=51888
- Enable global power mode
- Wait untill reset is complete
- Clear reset complete bit when reset is done
- Enable port
- Reset port now works
- USBOHCI still hangs after adding first control request, needs more investigation
svn path=/branches/usb-bringup/; revision=51883
- Start implementing control transfers
- Move initialization of usb queue after the bulk / control head endpoints have been created
- Add interface functions to retrieve bulk / control head endpoint descriptors
- Add macros for setting transfer descriptors field (taken from Haiku)
- Partly implement IUSBQueue::AddUSBRequest for control / bulk transfers
- Create endpoint descriptor for control request and link setup descriptor to it
- Link setup descriptors to data descriptor / status descriptor
- WIP (needs fixes)
svn path=/branches/usb-bringup/; revision=51864
- Fix bug in calculating offset of status register
- Start implementing deferred processing routine
- Signal status change when new device is arrived
- Implement basic GetPortStatus
- Start implementing SetPortFeature, ClearPortStatus
- ResetPort not yet fully working, WIP
svn path=/branches/usb-bringup/; revision=51858
- Add check that controller is functional state
- enable interrupts after the controller has been started
- partly implement isr routine
svn path=/branches/usb-bringup/; revision=51852
- Start of OHCI support
- Based on new usbehci driver and Haiku USB Stack
- Driver initializes the controller and retrieve number of ports
svn path=/branches/usb-bringup/; revision=51851
- Pass memory manager to USBQueue object
- Fix bug in memory manager which did not check if an allocation equals page size
- Implement interrupt queue head array with frequencys of 1ms up to 32ms
- Store queue heads in the sync schedule array
- WIP
svn path=/branches/usb-bringup/; revision=51826
- Add error handling to USBSTOR_CSWCompletionRoutine for errors that can be recovered via reset of pipe/port/controller. Only pipe reset is attempted. WIP.
svn path=/branches/usb-bringup/; revision=51808
- Implement retrieving serial number from device
- Use serial number to format instance id and retrieve in StorageDeviceProperty requests
- Silence traces
svn path=/branches/usb-bringup/; revision=51770
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- Only get the string descriptors if they are available. Fixes crash when using usb mouse and keyboards in windows.
svn path=/branches/usb-bringup/; revision=51688
- Modify BuildBulkTransferQueueHead to support TransferBufferLengths larger than PAGE_SIZE * 5.
- Acquire a SpinLock before adding QueueHeads to AsyncList and PendingList.
- Dont request a new QueueHead for incomplete transfers in QueueHeadCompletion, as the memory for the just completed QueueHead has not been released yet. Doing so overwrites the m_TransferDescriptor[x] members with new address resulting in memory leaks. Instead request a new QueueHead after the QueueHead has been freed in QueueHeadCleanup.
- Fix a bug where a QueueHead was removed from the m_CompletedRequestAsyncList instead of the m_PendingRequestAsyncList.
- Temporary hackfix InternalCalculateTransferLength to return the TransferBufferLength. This hack will be removed as soon as possible.
- With these changes the hub and ehci driver allow viewing content of and transfers to/from usb disks.
svn path=/branches/usb-bringup/; revision=51684