Commit graph

12 commits

Author SHA1 Message Date
Johannes Anderwald 4cbccecd5c [USBOHCI]
- Check if the transfer descriptors reported errors and propagate the error in the urb status field
- OHCI now reports error which the class driver are handling
- Allocate device descriptor from non paged pool to prevent possible alignment problems
- Fix checking of completed transfer descriptors
- Fix double freeing of descriptors
- Cleanup endpoints when the halted bit is set by the host controllers
- Check for the endpoint direction in the data descriptor
- Setup descriptor needs buffer rounding set

svn path=/branches/usb-bringup-trunk/; revision=55389
2012-02-03 09:52:29 +00:00
Cameron Gutman 25d8cf82c9 [USBOHCI]
- Fix StartController() to perform initialization according to OHCI spec
- Fixes the infamous OHCI initialization hang on real hardware

svn path=/branches/usb-bringup-trunk/; revision=55181
2012-01-25 19:46:44 +00:00
Johannes Anderwald f73caa061d [USBOHCI]
- More traces to fix isochronous problem
- Fix broken assert found by mjmartin

svn path=/branches/usb-bringup/; revision=52004
2011-05-30 06:55:32 +00:00
Johannes Anderwald d2accc6c3e [USBOHCI]
- 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
2011-05-29 19:54:55 +00:00
Johannes Anderwald 2231c8333a [USBOHCI]
- 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
2011-05-27 13:04:55 +00:00
Johannes Anderwald 9aff3e967c [USBOHCI]
- 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
2011-05-26 12:37:18 +00:00
Johannes Anderwald 667b425b6c [USBOHCI]
- 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
2011-05-26 02:15:11 +00:00
Johannes Anderwald e24bfbfa91 [USBOHCI]
- 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
2011-05-24 17:57:00 +00:00
Johannes Anderwald b275073474 [USBOHCI]
- 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
2011-05-24 12:51:03 +00:00
Johannes Anderwald f75cb3d51d [USBOHCI]
- 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
2011-05-23 17:42:52 +00:00
Johannes Anderwald c5acda628c [USBOHCI]
- 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
2011-05-23 11:29:55 +00:00
Johannes Anderwald d4c4a2e080 [USBOHCI]
- 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
2011-05-22 19:36:13 +00:00