linux-stable/drivers/usb/core
Kishon Vijay Abraham I 129714f773 usb: core: hcd: Add support for deferring roothub registration
commit a44623d927 upstream.

It has been observed with certain PCIe USB cards (like Inateck connected
to AM64 EVM or J7200 EVM) that as soon as the primary roothub is
registered, port status change is handled even before xHC is running
leading to cold plug USB devices not detected. For such cases, registering
both the root hubs along with the second HCD is required. Add support for
deferring roothub registration in usb_add_hcd(), so that both primary and
secondary roothubs are registered along with the second HCD.

This patch has been added and reverted earier as it triggered a race
in usb device enumeration.
That race is now fixed in 5.16-rc3, and in stable back to 5.4
commit 6cca13de26 ("usb: hub: Fix locking issues with address0_mutex")
commit 6ae6dc22d2 ("usb: hub: Fix usb enumeration issue due to address0
race")

CC: stable@vger.kernel.org # 5.4+
Suggested-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Tested-by: Chris Chiu <chris.chiu@canonical.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Link: https://lore.kernel.org/r/20220510091630.16564-2-kishon@ti.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-09 10:25:14 +02:00
..
buffer.c
config.c usb: core: config: using bit mask instead of individual bits 2021-12-12 13:06:39 +01:00
devices.c
devio.c usb: core: Don't hold the device lock while sleeping in do_proc_control() 2022-05-09 09:16:13 +02:00
driver.c usb: core: Export usb_device_match_id 2021-12-17 17:02:04 +01:00
endpoint.c
file.c
generic.c
hcd-pci.c
hcd.c usb: core: hcd: Add support for deferring roothub registration 2022-06-09 10:25:14 +02:00
hub.c USB: core: Fix bug in resuming hub's handling of wakeup requests 2022-01-03 14:40:39 +01:00
hub.h
Kconfig
ledtrig-usbport.c
Makefile
message.c
notify.c
of.c
otg_productlist.h
phy.c
phy.h
port.c usb: core: Unregister device on component_add() failure 2022-02-11 10:57:21 +01:00
quirks.c USB: new quirk for Dell Gen 2 devices 2022-06-09 10:25:14 +02:00
sysfs.c
urb.c USB: core: Fix hang in usb_kill_urb by adding memory barriers 2022-01-25 18:43:19 +01:00
usb-acpi.c
usb.c usb: Remove usb_for_each_port() 2021-12-30 12:13:04 +01:00
usb.h