linux/drivers/usb/core
Mathias Nyman 623dae3e70 usb: acpi: fix boot hang due to early incorrect 'tunneled' USB3 device links
Fix a boot hang issue triggered when a USB3 device is incorrectly assumed
to be tunneled over USB4, thus attempting to create a device link between
the USB3 "consumer" device and the USB4 "supplier" Host Interface before
the USB4 side is properly bound to a driver.

This could happen if xhci isn't capable of detecting tunneled devices,
but ACPI tables contain all info needed to assume device is tunneled.
i.e. udev->tunnel_mode == USB_LINK_UNKNOWN.

It turns out that even for actual tunneled USB3 devices it can't be
assumed that the thunderbolt driver providing the tunnel is loaded
before the tunneled USB3 device is created.
The tunnel can be created by BIOS and remain in use by thunderbolt/USB4
host driver once it loads.

Solve this by making the device link "stateless", which doesn't create
a driver presence order dependency between the supplier and consumer
drivers.
It still guarantees correct suspend/resume and shutdown ordering.

cc: Mario Limonciello <mario.limonciello@amd.com>
Fixes: f1bfb4a6fe ("usb: acpi: add device link between tunneled USB3 device and USB4 Host Interface")
Tested-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Tested-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20241024131355.3836538-1-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-10-29 04:26:26 +01:00
..
buffer.c
config.c USB: core: Fix duplicate endpoint bug by clearing reserved bits in the descriptor 2024-07-03 16:03:25 +02:00
devices.c
devio.c
driver.c Driver core changes for 6.11-rc1 2024-07-25 10:42:22 -07:00
endpoint.c
file.c
generic.c
hcd-pci.c
hcd.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
hub.c Linux 6.9-rc7 2024-05-10 09:38:01 +01:00
hub.h
Kconfig
ledtrig-usbport.c
Makefile
message.c
notify.c
of.c usb: core: add missing of_node_put() in usb_of_has_devices_or_graph 2024-07-03 16:04:10 +02:00
otg_productlist.h
phy.c
phy.h
port.c
quirks.c USB: Add USB_QUIRK_NO_SET_INTF quirk for START BP-850k 2024-07-03 16:03:40 +02:00
sysfs.c usb: core: sysfs: Unmerge @usb3_hardware_lpm_attr_group in remove_power_attributes() 2024-08-22 17:29:50 +08:00
urb.c
usb-acpi.c usb: acpi: fix boot hang due to early incorrect 'tunneled' USB3 device links 2024-10-29 04:26:26 +01:00
usb.c usb: add missing MODULE_DESCRIPTION() macros 2024-06-20 19:18:52 +02:00
usb.h