coreboot/payloads/libpayload/drivers/usb
Julius Werner 4deca38e9d libpayload: usb: ehci: Honor 10ms reset recovery period
This patch adds the 10ms TRSTRCY delay between a reset and the following
Set Address command that is required by the USB 2.0 specification to the
EHCI root hub driver. The generic_hub driver that's used for XHCI and
external hubs already included this delay. This is such a glaring
violation of the spec that I'm really amazed how many USB 2.0 devices
we tested before seemed perfectly fine with responding to a Set Address
within 2 microframes of the reset...

It also increases the port reset hold delay by one millisecond to avoid
an ugly race condition on Tegra SoCs: they decided to time the 50ms
themselves instead of relying on the CPU to do it (fair enough), and to
automatically transition Port Reset to 0 and Port Enable to 1 after that
(bad idea). If the CPU's read-modify-write to clear Port Reset races
exactly with the host controller setting Port Enable, we may end up
clearing the bit again and going into the companion controller handoff
path later on. The added millisecond shouldn't cause any problems for
other host controllers and is not a big deal compared to other delays in
this code path.

BUG=chrome-os-partner:26749
TEST=Run several dozen reboot loops with The USB Stick of Death (TM) (a
blue Patriot XT 13fe:5200 with bcdDevice = 1.00), make sure it always
gets detected correctly.

Change-Id: Idd3329ae6d7e5e1c07a84a5475549b3459836b31
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/189872
Reviewed-by: Gabe Black <gabeblack@chromium.org>
Reviewed-by: Jim Lin <jilin@nvidia.com>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
2014-04-03 22:41:58 +00:00
..
ehci.c libpayload: ehci: Fix byte count in dump_td() 2013-10-30 01:04:52 +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: usb: ehci: Honor 10ms reset recovery period 2014-04-03 22:41:58 +00:00
generic_hub.c libpayload: usb: Remove generic roothub reset port function 2014-03-11 05:53:56 +00:00
generic_hub.h libpayload: usb: Remove generic roothub reset port function 2014-03-11 05:53:56 +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: usb: Refactor USB enumeration to fix SuperSpeed devices 2013-10-10 00:32:40 +00: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: Refactor USB enumeration to fix SuperSpeed devices 2013-10-10 00:32:40 +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: find source of input characters 2014-01-19 04:15:03 +00:00
usbhub.c libpayload: usb: Refactor USB enumeration to fix SuperSpeed devices 2013-10-10 00:32:40 +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: usb: xhci: Fix STALL endpoint handling 2014-04-02 23:42:58 +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: Refactor USB enumeration to fix SuperSpeed devices 2013-10-10 00:32:40 +00:00
xhci_events.c libpayload: xhci: Use Event Data TRBs for transfer event generation 2013-10-10 00:32:36 +00:00
xhci_private.h libpayload: usb: Refactor USB enumeration to fix SuperSpeed devices 2013-10-10 00:32:40 +00:00
xhci_rh.c libpayload: usb: xhci: Treat port reset as a port status change 2014-03-11 05:54:00 +00:00