Kai-Heng Feng
dfa2cacd9f
xhci: Poll for U0 after disabling USB2 LPM
...
[ Upstream commit b3d71abd135e6919ca0b6cab463738472653ddfb ]
USB2 devices with LPM enabled may interrupt the system suspend:
[ 932.510475] usb 1-7: usb suspend, wakeup 0
[ 932.510549] hub 1-0:1.0: hub_suspend
[ 932.510581] usb usb1: bus suspend, wakeup 0
[ 932.510590] xhci_hcd 0000:00:14.0: port 9 not suspended
[ 932.510593] xhci_hcd 0000:00:14.0: port 8 not suspended
..
[ 932.520323] xhci_hcd 0000:00:14.0: Port change event, 1-7, id 7, portsc: 0x400e03
..
[ 932.591405] PM: pci_pm_suspend(): hcd_pci_suspend+0x0/0x30 returns -16
[ 932.591414] PM: dpm_run_callback(): pci_pm_suspend+0x0/0x160 returns -16
[ 932.591418] PM: Device 0000:00:14.0 failed to suspend async: error -16
During system suspend, USB core will let HC suspends the device if it
doesn't have remote wakeup enabled and doesn't have any children.
However, from the log above we can see that the usb 1-7 doesn't get bus
suspended due to not in U0. After a while the port finished U2 -> U0
transition, interrupts the suspend process.
The observation is that after disabling LPM, port doesn't transit to U0
immediately and can linger in U2. xHCI spec 4.23.5.2 states that the
maximum exit latency for USB2 LPM should be BESL + 10us. The BESL for
the affected device is advertised as 400us, which is still not enough
based on my testing result.
So let's use the maximum permitted latency, 10000, to poll for U0
status to solve the issue.
Cc: stable@vger.kernel.org
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20200624135949.22611-6-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-06-30 15:38:41 -04:00
..
whci
whci: Remove deprecated create_singlethread_workqueue
2016-08-15 16:25:58 +02:00
bcma-hcd.c
USB: bcma: drop Northstar PHY 2.0 initialization code
2016-09-27 12:20:17 +02:00
ehci-atmel.c
usb: ehci-atmel: use __maybe_unused to hide pm functions
2016-03-03 20:37:41 -08:00
ehci-dbg.c
usb: host: fix incorrect updating of offset
2017-12-09 22:01:57 +01:00
ehci-exynos.c
usb: host: ehci-exynos: Fix error check in exynos_ehci_probe()
2020-06-30 15:38:40 -04:00
ehci-fsl.c
drivers/usb/host/fsl: Port USB EHCI host driver for LS102xA
2016-01-24 20:37:47 -08:00
ehci-fsl.h
ehci-grlib.c
ehci-hcd.c
USB: host: ehci-sead3: Remove SEAD-3 EHCI code
2016-10-05 01:31:20 +02:00
ehci-hub.c
USB: EHCI: avoid undefined pointer arithmetic and placate UBSAN
2016-06-01 14:56:24 -07:00
ehci-mem.c
ehci-msm.c
usb: host: ehci-msm: Conditionally call ehci suspend/resume
2016-06-07 22:15:25 -07:00
ehci-mv.c
ehci-mxc.c
USB: host: ehci-mxc: Add error handling in ehci_mxc_drv_probe()
2020-06-30 15:38:26 -04:00
ehci-omap.c
usb/host/: const data must use __initconst not __initdata
2016-04-28 12:35:36 -07:00
ehci-orion.c
ehci-pci.c
USB: ehci: reopen solution for Synopsys HC bug
2020-06-30 15:38:40 -04:00
ehci-platform.c
usb/ehci-platform: Set PM runtime as active on resume
2020-06-30 15:38:30 -04:00
ehci-pmcmsp.c
ehci-ppc-of.c
ehci-ps3.c
ehci-q.c
USB: EHCI: Do not return -EPIPE when hub is disconnected
2020-01-04 13:40:20 +01:00
ehci-sched.c
usb: host: ehci-sched: remove unnecessary braces
2016-02-03 13:44:05 -08:00
ehci-sh.c
ehci-spear.c
usb/host/: const data must use __initconst not __initdata
2016-04-28 12:35:36 -07:00
ehci-st.c
usb: host: ehci-st: Inform the reset framework that our reset line may be shared
2016-06-30 07:44:21 +01:00
ehci-sysfs.c
ehci-tegra.c
usb: host: ehci-tegra: Avoid getting the same reset twice
2016-06-07 22:15:25 -07:00
ehci-tilegx.c
ehci-timer.c
USB: EHCI: add a delay when unlinking an active QH
2016-02-03 13:14:52 -08:00
ehci-w90x900.c
ehci-xilinx-of.c
ehci.h
usb: host: unhide suspend/resume declarations
2016-03-03 20:37:41 -08:00
fhci-dbg.c
fhci-hcd.c
usb: host: fhci-hcd: don't print on ENOMEM
2016-08-30 19:17:37 +02:00
fhci-hub.c
QE: Move QE from arch/powerpc to drivers/soc
2015-12-22 17:12:56 -06:00
fhci-mem.c
fhci-q.c
fhci-sched.c
USB: FHCI: avoid redundant condition
2016-05-09 13:08:46 +02:00
fhci-tds.c
fhci.h
QE: Move QE from arch/powerpc to drivers/soc
2015-12-22 17:12:56 -06:00
fotg210-hcd.c
usb: host: fotg2: restart hcd after port reset
2019-09-06 10:19:43 +02:00
fotg210.h
fsl-mph-dr-of.c
usb: host: fsl-mph-dr-of: use of_property_read_bool
2016-08-09 15:49:01 +02:00
hwa-hc.c
usb: wusbcore: fix unbalanced get/put cluster_id
2019-08-04 09:33:42 +02:00
imx21-dbg.c
imx21-hcd.c
imx21-hcd.h
isp116x-hcd.c
isp116x.h
isp1362-hcd.c
isp1362.h
Kconfig
usb: Move USB_UHCI_BIG_ENDIAN_* out of USB_SUPPORT
2018-02-22 15:43:51 +01:00
Makefile
usb: xhci: Add NVIDIA Tegra XUSB controller driver
2016-04-29 16:48:58 +02:00
max3421-hcd.c
usb: host: max3421-hcd: don't print on ENOMEM
2016-08-30 19:17:37 +02:00
ohci-at91.c
usb: ohci-at91: Do not drop unhandled USB suspend control requests
2017-03-18 19:14:31 +08:00
ohci-da8xx.c
ohci-dbg.c
ohci-exynos.c
usb: host: ohci-exynos: Decrese node refcount on exynos_ehci_get_phy() error paths
2017-05-14 14:00:18 +02:00
ohci-hcd.c
usb: host: ohci: fix a race condition between shutdown and irq
2019-09-06 10:19:49 +02:00
ohci-hub.c
ohci-hcd: Fix race condition caused by ohci_urb_enqueue() and io_watchdog_func()
2018-02-28 10:18:31 +01:00
ohci-mem.c
ohci-nxp.c
usb: ohci: nxp: remove USB PLL and USB OTG clock management
2016-03-03 20:38:53 -08:00
ohci-omap.c
USB: ohci-omap - avoid including mach/irqs.h
2016-08-30 19:31:33 +02:00
ohci-omap3.c
ohci-pci.c
ohci-pci: add qemu quirk
2017-05-25 15:44:36 +02:00
ohci-platform.c
usb/ohci-platform: Fix a warning when hibernating
2020-06-30 15:38:25 -04:00
ohci-ppc-of.c
ohci-ps3.c
ohci-pxa27x.c
usb: host: ohci-pxa27x: propagate the irq error code
2016-02-14 17:06:43 -08:00
ohci-q.c
usb: ohci: Proper handling of ed_rm_list to handle race condition between usb_kill_urb() and finish_unlinks()
2018-02-28 10:18:31 +01:00
ohci-s3c2410.c
ohci-sa1111.c
usb: ohci-sa1111: remove mach/hardware.h include
2016-08-30 19:24:59 +02:00
ohci-sm501.c
USB: ohci-sm501: Add missed iounmap() in remove
2020-06-30 15:38:40 -04:00
ohci-spear.c
ohci-st.c
usb: host: ohci-st: Inform the reset framework that our reset line may be shared
2016-06-30 07:44:20 +01:00
ohci-tilegx.c
ohci-tmio.c
ohci.h
ohci-pci: add qemu quirk
2017-05-25 15:44:36 +02:00
oxu210hp-hcd.c
usb: host: oxu210hp-hcd: use list_for_each_entry_safe
2016-01-24 20:55:33 -08:00
oxu210hp.h
pci-quirks.c
usb: pci-quirks: Correct AMD PLL quirk detection
2019-08-04 09:33:42 +02:00
pci-quirks.h
xhci: Bad Ethernet performance plugged in ASM1042A host
2017-07-27 15:08:01 -07:00
r8a66597-hcd.c
usb: r8a66597: Fix a possible concurrency use-after-free bug in r8a66597_endpoint_disable()
2019-01-09 16:16:43 +01:00
r8a66597.h
sl811-hcd.c
sl811.h
sl811_cs.c
ssb-hcd.c
u132-hcd.c
usb: u132-hcd: fix resource leak
2019-05-04 08:49:09 +02:00
uhci-debug.c
new helpers: no_seek_end_llseek{,_size}()
2015-12-23 10:41:31 -05:00
uhci-grlib.c
uhci-hcd.c
usb: host: uhci-hcd: don't print on ENOMEM
2016-08-30 19:17:37 +02:00
uhci-hcd.h
uhci-hub.c
uhci-pci.c
USB: UHCI: report non-PME wakeup signalling for Intel hardware
2017-01-06 10:40:11 +01:00
uhci-platform.c
uhci-q.c
xhci-dbg.c
usb: host: xhci-dbg: HCIVERSION should be a binary number
2017-03-18 19:14:32 +08:00
xhci-ext-caps.h
xhci: harden xhci_find_next_ext_cap against device removal
2016-02-04 17:00:10 -08:00
xhci-hub.c
usb: host: xhci-hub: fix extra endianness conversion
2020-01-29 10:24:28 +01:00
xhci-mem.c
xhci: Force Maximum Packet size for Full-speed bulk devices to valid range.
2020-02-28 15:42:46 +01:00
xhci-mtk-sch.c
usb: xhci-mtk: fix ISOC error when interval is zero
2019-11-25 09:53:07 +01:00
xhci-mtk.c
usb: xhci-mtk: resume USB3 roothub first
2018-10-13 09:18:55 +02:00
xhci-mtk.h
xhci-mvebu.c
usb: host: xhci: plat: change type of mvebu init_quirk()
2016-04-26 16:08:02 -07:00
xhci-mvebu.h
usb: host: xhci: plat: change type of mvebu init_quirk()
2016-04-26 16:08:02 -07:00
xhci-pci.c
xhci: apply XHCI_PME_STUCK_QUIRK to Intel Comet Lake platforms
2020-02-28 15:42:49 +01:00
xhci-plat.c
usb/xhci-plat: Set PM runtime as active on resume
2020-06-30 15:38:30 -04:00
xhci-plat.h
usb: host: xhci: plat: finally get rid of xhci_plat_type_is()
2016-04-26 16:08:02 -07:00
xhci-rcar.c
usb: host: xhci: rcar: Fix typo in compatible string matching
2019-09-06 10:19:49 +02:00
xhci-rcar.h
xhci-ring.c
usb: xhci: Fix NULL pointer dereference when enqueuing trbs from urb sg list
2020-05-20 08:15:41 +02:00
xhci-tegra.c
usb: xhci: remove the code build warning
2018-08-24 13:12:32 +02:00
xhci-trace.c
xhci-trace.h
xhci.c
xhci: Poll for U0 after disabling USB2 LPM
2020-06-30 15:38:41 -04:00
xhci.h
xhci: Fix incorrect EP_STATE_MASK
2020-06-30 15:38:41 -04:00