aboutsummaryrefslogtreecommitdiffstats
path: root/src/drivers/usb/xhci.h
Commit message (Collapse)AuthorAgeFilesLines
* [xhci] Ignore invalid protocol speed ID values on Intel Skylake platformsMichael Brown2015-06-181-0/+3
| | | | | | | | | | | | | | | Some Intel Skylake platforms (observed on a prototype Lenovo ThinkPad) report the list of available USB3 protocol speed ID values as {1,2,3} but then report a port's speed using ID value 4. The value 4 happens to be the default value for SuperSpeed (when no protocol speed ID value list is explicitly defined), and the hardware seems to function correctly if we simply ignore its protocol speed ID table and assume that it uses the default values. Fix by adding a "broken PSI values" quirk for this controller. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [xhci] Record device-specific quirks in xHCI device structureMichael Brown2015-06-181-0/+2
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [xhci] Use meaningful device names in debug messagesMichael Brown2015-05-101-0/+2
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [xhci] Support USB1 devices attached via transaction translatorsMichael Brown2015-03-231-0/+6
| | | | | | | | | | | | | | | | | | | | xHCI provides a somewhat convoluted mechanism for specifying details of a transaction translator. Hubs must be marked as such in the device slot context. The only opportunity to do so is as part of a Configure Endpoint command, which can be executed only when opening the hub's interrupt endpoint. We add a mechanism for host controllers to intercept the opening of hub devices, providing xHCI with an opportunity to update the internal device slot structure for the corresponding USB device to indicate that the device is a hub. We then include the hub-specific details in the input context whenever any Configure Endpoint command is issued. When a device is opened, we record the device slot and port for its transaction translator (if any), and supply these as part of the Address Device command. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [usb] Fix USB timeouts to match specificationMichael Brown2015-03-181-2/+4
| | | | | | | | | | | | | | | Several of the USB timeouts were chosen on the principle of "pick an arbitrary but ridiculously large value, just to be safe". It turns out that some of the timeouts permitted by the USB specification are even larger: for example, control transactions are allowed to take up to five seconds to complete. Fix up these USB timeout values to match those found in the USB2 specification. Debugged-by: Robin Smidsrød <robin@smidsrod.no> Tested-by: Robin Smidsrød <robin@smidsrod.no> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [usb] Add the concept of a USB bus maximum transfer sizeMichael Brown2015-03-161-0/+3
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [xhci] Undo PCH-specific quirk fixes when removing deviceMichael Brown2015-03-061-15/+26
| | | | | | | | Restore the original values of XUSB2PR and USB3PSSEN, in case we are booting an OS with no support for xHCI. Suggested-by: Dan Ellis <Dan.Ellis@displaylink.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [xhci] Enable USB3 ports on Intel PCH8/PCH9 controllersMichael Brown2015-03-061-0/+15
| | | | | | | | | | Intel PCH controllers default to routing USB2 ports to EHCI rather than xHCI, and default to disabling SuperSpeed connections. Manipulate the PCI configuration space registers as necessary to reroute ports and enable SuperSpeed. Originally-fixed-by: Dan Ellis <Dan.Ellis@displaylink.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [legal] Relicense files under GPL2_OR_LATER_OR_UBDLMichael Brown2015-03-021-1/+1
| | | | | | | Relicense files for which I am the sole author (as identified by util/relicense.pl). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [xhci] Abort commands on timeoutMichael Brown2015-02-181-2/+13
| | | | | | | | | | | | When a command times out, abort it (via the Command Abort bit in the Command Ring Control Register) so that subsequent commands may execute as expected. This improves robustness when a device fails to respond to the Set Address command, since the subsequent Disable Slot command will now succeed. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [xhci] Delay after (possibly) forcing port link state to RxDetectMichael Brown2015-02-111-0/+3
| | | | | | | | | | | | Some xHCI controllers (observed with a Renesas Electronics PCIe USB3 card) seem to require a delay after forcing the link state of USB3 ports to RxDetect. Omitting this delay causes strange behaviour including system lockups. Add an unconditional 20ms delay after writing the port link states. This seems to be sufficient to avoid the problem. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [usb] Parse endpoint descriptor bInterval fieldMichael Brown2015-02-101-0/+5
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [usb] Report xHCI host controller eventsMichael Brown2015-02-051-0/+21
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [usb] Add support for xHCI host controllersMichael Brown2015-02-031-0/+1066
Signed-off-by: Michael Brown <mcb30@ipxe.org>