linux/drivers/usb/host
Mathias Nyman dad67d5f3d xhci: Fix a race in usb2 LPM resume, blocking U3 for usb2 devices
Clear device initiated resume variables once device is fully up and running
in U0 state.

Resume needs to be signaled for 20ms for usb2 devices before they can be
moved to U0 state.

An interrupt is triggered if a device initiates resume. As we handle the
event in interrupt context we can not sleep for 20ms, so we instead set
a resume flag, a timestamp, and start the roothub polling.

The roothub code will later move the port to U0 when it finds a port in
resume state with the resume flag set, and timestamp passed by 20ms.

A host initiated resume is however not done in interrupt context, and
host initiated resume code will directly signal resume, wait 20ms and then
move the port to U0.

These two codepaths can race, if we are in the middle of a host initated
resume, while sleeping for 20ms, we may handle a port event and find the
port in resume state. The port event handling code will assume the resume
was device initiated and set the resume flag and timestamp.

Root hub code will however not catch the port in resume state again as the
host initated resume code has already moved the port to U0.
The resume flag and timestamp will remain set for this port preventing port
from suspending again  (LPM setting port to U3)

Fix this for now by always clearing the device initated resume parameters
once port is in U0

Cc: stable <stable@vger.kernel.org>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-18 09:24:41 -08:00
..
whci whci: drop null test before destroy functions 2015-10-04 10:38:33 +01:00
bcma-hcd.c USB: bcma: add support for controlling bus power through GPIO 2015-07-22 15:43:34 -07:00
ehci-atmel.c
ehci-dbg.c
ehci-exynos.c
ehci-fsl.c drivers: usb: fsl: Workaround for USB erratum-A005275 2015-08-14 16:50:36 -07:00
ehci-fsl.h drivers: usb: fsl: Define usb control register mask for w1c bits 2015-07-22 16:44:35 -07:00
ehci-grlib.c
ehci-hcd.c dma: remove external references to dma_supported 2015-11-09 15:11:24 -08:00
ehci-hub.c drivers: usb: fsl: Workaround for USB erratum-A005275 2015-08-14 16:50:36 -07:00
ehci-mem.c
ehci-msm.c usb: host: ehci-msm: fix handling platform_get_irq result 2015-10-04 10:59:03 +01:00
ehci-mv.c
ehci-mxc.c
ehci-omap.c
ehci-orion.c usb: ehci-orion: fix probe for !GENERIC_PHY 2015-10-04 10:45:08 +01:00
ehci-pci.c
ehci-platform.c USB: ehci-platform: Add ACPI bindings for the EHCI platform driver. 2015-10-04 10:47:13 +01:00
ehci-pmcmsp.c
ehci-ppc-of.c
ehci-ps3.c
ehci-q.c
ehci-sched.c
ehci-sead3.c
ehci-sh.c
ehci-spear.c usb: host: ehci-spear: Fix module autoload for OF platform driver 2015-10-04 10:51:58 +01:00
ehci-st.c usb: host: ehci-st: Simplify return statement 2015-08-05 12:37:21 -07:00
ehci-sysfs.c usb: host: ehci-sys: delete useless bus_to_hcd conversion 2015-08-18 10:05:23 -07:00
ehci-tegra.c
ehci-tilegx.c
ehci-timer.c
ehci-w90x900.c
ehci-xilinx-of.c
ehci.h drivers: usb: fsl: Workaround for USB erratum-A005275 2015-08-14 16:50:36 -07:00
fhci-dbg.c
fhci-hcd.c
fhci-hub.c
fhci-mem.c
fhci-q.c
fhci-sched.c
fhci-tds.c
fhci.h
fotg210-hcd.c dma: remove external references to dma_supported 2015-11-09 15:11:24 -08:00
fotg210.h usb/host/fotg210: Fix coding style issues 2015-10-16 23:46:22 -07:00
fsl-mph-dr-of.c usb: host: fsl-mph-dr-of: Fix module autoload for OF platform driver 2015-10-04 10:51:58 +01:00
hwa-hc.c
imx21-dbg.c
imx21-hcd.c
imx21-hcd.h
isp116x-hcd.c
isp116x.h
isp1362-hcd.c
isp1362.h
Kconfig usb-host: Remove fusbh200 driver 2015-10-16 23:44:33 -07:00
Makefile usb-host: Remove fusbh200 driver 2015-10-16 23:44:33 -07:00
max3421-hcd.c spi: Drop owner assignment from spi_drivers 2015-10-28 10:30:17 +09:00
ohci-at91.c USB: host: ohci-at91: merge loops in ohci_hcd_at91_drv_probe 2015-08-14 16:57:43 -07:00
ohci-da8xx.c
ohci-dbg.c
ohci-exynos.c
ohci-hcd.c
ohci-hub.c
ohci-jz4740.c
ohci-mem.c
ohci-nxp.c usb: host: lpc32xx: don't unregister phy device 2015-10-24 19:53:53 -07:00
ohci-omap.c
ohci-omap3.c
ohci-pci.c
ohci-platform.c
ohci-ppc-of.c
ohci-ps3.c
ohci-pxa27x.c
ohci-q.c
ohci-s3c2410.c
ohci-sa1111.c
ohci-sm501.c
ohci-spear.c usb: host: ohci-spear: Fix module autoload for OF platform driver 2015-10-04 10:51:58 +01:00
ohci-st.c
ohci-tilegx.c
ohci-tmio.c
ohci.h
oxu210hp-hcd.c dma: remove external references to dma_supported 2015-11-09 15:11:24 -08:00
oxu210hp.h
pci-quirks.c
pci-quirks.h
r8a66597-hcd.c
r8a66597.h
sl811-hcd.c
sl811.h
sl811_cs.c
ssb-hcd.c
u132-hcd.c mm, page_alloc: distinguish between being unable to sleep, unwilling to sleep and avoiding waking kswapd 2015-11-06 17:50:42 -08:00
uhci-debug.c
uhci-grlib.c
uhci-hcd.c
uhci-hcd.h
uhci-hub.c
uhci-pci.c
uhci-platform.c usb: host: uhci-platform: Fix module autoload for OF platform driver 2015-10-04 10:51:58 +01:00
uhci-q.c
xhci-dbg.c xhci: Read and parse new xhci 1.1 capability register 2015-10-04 10:34:17 +01:00
xhci-ext-caps.h
xhci-hub.c xhci: Fix a race in usb2 LPM resume, blocking U3 for usb2 devices 2015-11-18 09:24:41 -08:00
xhci-mem.c xhci: drop null test before destroy functions 2015-10-04 10:38:33 +01:00
xhci-mvebu.c
xhci-mvebu.h
xhci-pci.c Merge 4.3-rc7 into usb-next 2015-10-26 06:39:46 +09:00
xhci-plat.c usb: Add support for ACPI identification to xhci-platform 2015-10-16 23:34:22 -07:00
xhci-rcar.c
xhci-rcar.h
xhci-ring.c usb: xhci: fix checking ep busy for CFC 2015-11-18 09:24:41 -08:00
xhci-trace.c
xhci-trace.h
xhci.c xhci: Workaround to get Intel xHCI reset working more reliably 2015-11-18 09:24:41 -08:00
xhci.h asm-generic cleanups 2015-11-06 14:22:15 -08:00