coreboot/payloads/libpayload/drivers/usb
Julius Werner f12424af0e libpayload: xhci: Ensure to reset dequeue pointer on stopped endpoints
This patch fixes a bug in the XHCI stack that occurs when a multi-TRB TD
times out before the last TRB is processed. The driver will correctly
issue a Stop Endpoint command in that case, but the xHC will still
preserve the transfer state and just pick up right after that on the
next doorbell ring. It will then process the leftover TRBs from the old
TD the next time a transfer is issued. (cf. XHCI 4.6.9)

We fix this by changing the existing xhci_reset_endpoint() calls in
transfer functions to not only trigger on Halted (2) and Error (4), but
also on Stopped (3). That function will not actually issue a Reset
Endpoint command in this case, but it will nuke the whole transfer ring
and issue a Set TR Dequeue Pointer command, which is sufficient (though
slightly overkill) to solve our problem.

BUG=chrome-os-partner:21969
TEST=Manual

Change-Id: I3abbe30ff9d4911a8af1f792324e018d427019e8
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/170833
Reviewed-by: Ronald Minnich <rminnich@chromium.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
2013-10-05 02:21:04 +00:00
..
ehci.c libpayload: Redirect USB slave init through controller driver 2013-09-16 19:38:24 +00:00
ehci.h libpayload: Add USB support for non-PCI controllers 2013-05-20 17:01:26 -07:00
ehci_private.h libpayload: ehci: Cache management is hard, let's go copying... 2013-09-14 01:31:18 +00:00
ehci_rh.c libpayload: Add USB support for non-PCI controllers 2013-05-20 17:01:26 -07:00
generic_hub.c libpayload: usb: Unify USB speed between XHCI stack and USB core 2013-10-04 18:46:30 +00:00
generic_hub.h libpayload: usb: Unify USB speed between XHCI stack and USB core 2013-10-04 18:46:30 +00:00
ohci.c libpayload: Redirect USB slave init through controller driver 2013-09-16 19:38:24 +00:00
ohci.h libpayload: Add USB support for non-PCI controllers 2013-05-20 17:01:26 -07:00
ohci_private.h libpayload: Add USB support for non-PCI controllers 2013-05-20 17:01:26 -07:00
ohci_rh.c libpayload: usb: Unify USB speed between XHCI stack and USB core 2013-10-04 18:46:30 +00:00
quirks.c libpayload: Turn the "debug" #define into the usb_debug static inline function. 2012-11-07 18:38:37 +01:00
TODO Since some people disapprove of white space cleanups mixed in regular commits 2010-04-27 06:56:47 +00:00
uhci.c libpayload: Redirect USB slave init through controller driver 2013-09-16 19:38:24 +00:00
uhci.h libpayload: Add USB support for non-PCI controllers 2013-05-20 17:01:26 -07:00
uhci_private.h libpayload: Remove bitfield use from UHCI data structures 2012-01-10 00:02:54 +01:00
uhci_rh.c libpayload: usb: Unify USB speed between XHCI stack and USB core 2013-10-04 18:46:30 +00:00
usb.c libpayload: usb: Fix several minor USB stack bugs 2013-10-04 18:46:36 +00:00
usb_dev.c Fix the USB code to find the headers after they were moved. 2008-09-11 17:29:00 +00:00
usbhid.c libpayload: usb: Fix several minor USB stack bugs 2013-10-04 18:46:36 +00:00
usbhub.c libpayload: usb: Unify USB speed between XHCI stack and USB core 2013-10-04 18:46:30 +00:00
usbinit.c libpayload: usb: Allow direct instantiation of MMIO host controllers 2013-09-17 03:22:00 +00:00
usbmsc.c libpayload: usb: Fix several minor USB stack bugs 2013-10-04 18:46:36 +00:00
xhci.c libpayload: xhci: Ensure to reset dequeue pointer on stopped endpoints 2013-10-05 02:21:04 +00:00
xhci.h libpayload: Add USB support for non-PCI controllers 2013-05-20 17:01:26 -07:00
xhci_commands.c libpayload: xhci: Make XHCI stack usable on ARM 2013-09-17 03:21:57 +00:00
xhci_debug.c libpayload: xhci: Make XHCI stack usable on ARM 2013-09-17 03:21:57 +00:00
xhci_devconf.c libpayload: usb: Fix several minor USB stack bugs 2013-10-04 18:46:36 +00:00
xhci_events.c libpayload: xhci: Make XHCI stack usable on ARM 2013-09-17 03:21:57 +00:00
xhci_private.h libpayload: usb: Unify USB speed between XHCI stack and USB core 2013-10-04 18:46:30 +00:00
xhci_rh.c libpayload: usb: Unify USB speed between XHCI stack and USB core 2013-10-04 18:46:30 +00:00