linux-stable/drivers/usb
Kishon Vijay Abraham I 829baf398f xhci: Set HCD flag to defer primary roothub registration
[ Upstream commit b7a4f9b5d0 ]

Set "HCD_FLAG_DEFER_RH_REGISTER" to hcd->flags in xhci_run() to defer
registering primary roothub in usb_add_hcd() if xhci has two roothubs.
This will make sure both primary roothub and secondary roothub will be
registered along with the second HCD.
This is required for cold plugged USB devices to be detected in certain
PCIe USB cards (like Inateck USB card connected to AM64 EVM or J7200 EVM).

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")

[minor rebase change, and commit message update -Mathias]

CC: stable@vger.kernel.org # 5.4+
Suggested-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Tested-by: Chris Chiu <chris.chiu@canonical.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Link: https://lore.kernel.org/r/20220510091630.16564-3-kishon@ti.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-07-29 17:25:27 +02:00
..
atm
c67x00
cdns3 usb: cdnsp: Fixed setting last_trb incorrectly 2022-06-22 14:22:03 +02:00
chipidea usb: chipidea: udc: check request status before setting device address 2022-06-29 09:03:27 +02:00
class usb: cdc-wdm: fix reading stuck on device close 2022-05-18 10:26:54 +02:00
common usb: ulpi: Call of_node_put correctly 2022-02-16 12:56:34 +01:00
core USB: hcd-pci: Fully suspend across freeze/thaw cycle 2022-06-14 18:36:21 +02:00
dwc2 usb: dwc2: Fix memory leak in dwc2_hcd_init 2022-06-22 14:22:03 +02:00
dwc3 usb: dwc3: gadget: Fix event pending check 2022-07-21 21:24:42 +02:00
early Revert "usb: early: convert to readl_poll_timeout_atomic()" 2021-12-22 09:32:45 +01:00
gadget USB: gadget: Fix double-free bug in raw_gadget driver 2022-06-29 09:03:27 +02:00
host xhci: Set HCD flag to defer primary roothub registration 2022-07-29 17:25:27 +02:00
image
isp1760 usb: isp1760: Fix out-of-bounds array access 2022-06-09 10:22:27 +02:00
misc usb: misc: fix improper handling of refcount in uss720_probe() 2022-05-09 09:14:28 +02:00
mon
mtu3 usb: mtu3: fix USB 3.0 dual-role-switch from device to host 2022-05-09 09:14:27 +02:00
musb usb: musb: Fix missing of_node_put() in omap2430_probe 2022-06-14 18:36:04 +02:00
phy extcon: Fix extcon_get_extcon_dev() error handling 2022-06-14 18:36:21 +02:00
renesas_usbhs usb: renesas_usbhs: Fix spelling mistake "faile" -> "failed" 2021-08-27 10:29:32 +02:00
roles
serial USB: serial: ftdi_sio: add Belimo device ids 2022-07-21 21:24:42 +02:00
storage USB: storage: karma: fix rio_karma_init return 2022-06-14 18:36:04 +02:00
typec usb: typec: add missing uevent when partner support PD 2022-07-21 21:24:42 +02:00
usbip usb: usbip: add missing device lock on tweak configuration cmd 2022-06-14 18:36:04 +02:00
Kconfig
Makefile
usb-skeleton.c