coreboot-kgpe-d16/payloads/libpayload/drivers/usb
Julius Werner e44a4e8787 libpayload: usb: xhci: Prevent address reuse
We have been trying to avoid reassigning previously used USB addresses
to different devices since CL:197420, because some devices seem to take
issue with that. Unfortunately, that patch doesn't affect XHCI: those
controllers insist on chosing addresses on their own. The only way to
prevent them from reusing a previously assigned address is to not
disable that slot at all.

This patch implements address reuse avoidance on XHCI by not disabling
slots when a device is detatched (which may occur both on physical
detachment or if we simply couldn't find a driver for that device).
Instead, we just release as many resources as we can for detached
devices (by dropping all endpoint contexts) and defer the final cleanup
until the point where the controller actually runs out of resources (a
point that we probably don't often reach in most firmware scenarios).

BRANCH=none
BUG=chrome-os-partner:42181
TEST=Booted an Oak plugged into a Servo without having a driver for the
SMSC network chip, observed that it could still enumerate the next
device afterwards. Kept unplugging/replugging stuff until the cleanup
triggered and made sure the controller still worked after that. Also
played around a bit on a Falco without issues.

Change-Id: Idfbab39abbc5bc5eff822bedf9c8d5bd4cad8cd2
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 88c6bcbc41156729c3c38937c8a4adebc66f1ccb
Original-Change-Id: I0653a4f6a02c02498210a70ffdda9d986592813b
Original-Signed-off-by: Julius Werner <jwerner@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/284175
Original-Tested-by: Nicolas Boichat <drinkcat@chromium.org>
Original-Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: http://review.coreboot.org/10957
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-07-18 09:40:32 +02:00
..
TODO
dwc2.c libpayload: usb: dwc2: support split transaction 2015-07-16 22:39:59 +02:00
dwc2.h Remove address from GPLv2 headers 2015-05-21 20:50:25 +02:00
dwc2_private.h libpayload: usb: dwc2: support split transaction 2015-07-16 22:39:59 +02:00
dwc2_rh.c Remove address from GPLv2 headers 2015-05-21 20:50:25 +02:00
ehci.c libpayload: usb: dwc2: support split transaction 2015-07-16 22:39:59 +02:00
ehci.h
ehci_private.h libpayload: EHCI: Support root-hub TT feature 2015-03-23 17:57:40 +01:00
ehci_rh.c libpayload: EHCI: Support root-hub TT feature 2015-03-23 17:57:40 +01:00
generic_hub.c
generic_hub.h
ohci.c libpayload: Make Kconfig bools use IS_ENABLED() 2015-06-30 18:55:15 +02:00
ohci.h
ohci_private.h
ohci_rh.c
quirks.c Remove empty lines at end of file 2015-06-08 00:55:07 +02:00
uhci.c
uhci.h
uhci_private.h
uhci_rh.c
usb.c libpayload: usb: dwc2: support split transaction 2015-07-16 22:39:59 +02:00
usb_dev.c
usbhid.c libpayload: Make Kconfig bools use IS_ENABLED() 2015-06-30 18:55:15 +02:00
usbhub.c
usbinit.c libpayload: Make Kconfig bools use IS_ENABLED() 2015-06-30 18:55:15 +02:00
usbmsc.c
xhci.c libpayload: Make Kconfig bools use IS_ENABLED() 2015-06-30 18:55:15 +02:00
xhci.h
xhci_commands.c libpayload: usb: Support MTK xHCI host controller 2015-06-03 11:11:59 +02:00
xhci_debug.c libpayload: usb: fix compilation error in debug fuction 2015-04-22 08:44:37 +02:00
xhci_devconf.c libpayload: usb: xhci: Prevent address reuse 2015-07-18 09:40:32 +02:00
xhci_events.c
xhci_private.h libpayload: usb: xhci: Prevent address reuse 2015-07-18 09:40:32 +02:00
xhci_rh.c libpayload: usb: Support MTK xHCI host controller 2015-06-03 11:11:59 +02:00