mirror-linux/drivers/usb/core
Kai-Heng Feng 59bfeaf545 USB: core: Disable LPM only for non-suspended ports
There's USB error when tegra board is shutting down:
[  180.919315] usb 2-3: Failed to set U1 timeout to 0x0,error code -113
[  180.919995] usb 2-3: Failed to set U1 timeout to 0xa,error code -113
[  180.920512] usb 2-3: Failed to set U2 timeout to 0x4,error code -113
[  186.157172] tegra-xusb 3610000.usb: xHCI host controller not responding, assume dead
[  186.157858] tegra-xusb 3610000.usb: HC died; cleaning up
[  186.317280] tegra-xusb 3610000.usb: Timeout while waiting for evaluate context command

The issue is caused by disabling LPM on already suspended ports.

For USB2 LPM, the LPM is already disabled during port suspend. For USB3
LPM, port won't transit to U1/U2 when it's already suspended in U3,
hence disabling LPM is only needed for ports that are not suspended.

Cc: Wayne Chang <waynec@nvidia.com>
Cc: stable <stable@kernel.org>
Fixes: d920a2ed86 ("usb: Disable USB3 LPM at shutdown")
Signed-off-by: Kai-Heng Feng <kaihengf@nvidia.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Link: https://lore.kernel.org/r/20241206074817.89189-1-kaihengf@nvidia.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-12-23 18:54:20 +01:00
..
Kconfig usb: core: Kconfig: Improve USB authorization mode help 2024-02-17 16:38:35 +01:00
Makefile usb: misc: onboard_hub: rename to onboard_dev 2024-03-27 07:57:16 +01:00
buffer.c
config.c drivers/usb/core: refactor max with max_t 2024-11-13 15:09:50 +01:00
devices.c
devio.c USB: core: remove dead code in do_proc_bulk() 2024-11-13 07:06:41 +01:00
driver.c USB: make to_usb_device_driver() use container_of_const() 2024-11-14 17:57:33 +01:00
endpoint.c usb: core: use sysfs_emit() instead of sprintf() 2024-10-29 04:33:49 +01:00
file.c
generic.c
hcd-pci.c usb: hcd-pci: Use PCI_IRQ_INTX instead of PCI_IRQ_LEGACY 2024-04-25 12:53:30 -05:00
hcd.c usb: core: hcd: only check primary hcd skip_phy_initialization 2024-12-04 16:26:44 +01:00
hub.c usb: fix reference leak in usb_new_device() 2024-12-23 18:54:04 +01:00
hub.h Merge 6.9-rc2 into usb-next 2024-04-01 17:02:18 +02:00
ledtrig-usbport.c usb: core: use sysfs_emit() instead of sprintf() 2024-10-29 04:33:49 +01:00
message.c USB: document some API requirements on disconnection 2024-03-02 20:37:14 +01:00
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 USB: core: Disable LPM only for non-suspended ports 2024-12-23 18:54:20 +01:00
quirks.c USB: Add USB_QUIRK_NO_SET_INTF quirk for START BP-850k 2024-07-03 16:03:40 +02:00
sysfs.c sysfs: treewide: constify attribute callback of bin_is_visible() 2024-11-05 14:00:28 +01: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 USB: make to_usb_device_driver() use container_of_const() 2024-11-14 17:57:33 +01:00