mirror of https://github.com/torvalds/linux.git
xhci needs to take care of four scenarios when asked to cancel a URB. 1 URB is not queued or already given back. usb_hcd_check_unlink_urb() will return an error, we pass the error on 2 We fail to find xhci internal structures from urb private data such as virtual device and endpoint ring. Give back URB immediately, can't do anything about internal structures. 3 URB private data has valid pointers to xhci internal data, but host is not responding. give back URB immedately and remove the URB from the endpoint lists. 4 Everyting is working add URB to cancel list, queue a command to stop the endpoint, after which the URB can be turned to no-op or skipped, removed from lists, and given back. We failed to give back the urb in case 2 where the correct device and endpoint pointers could not be retrieved from URB private data. This caused a hang on Dell Inspiron 5558/0VNM2T at resume from suspend as urb was never returned. [ 245.270505] INFO: task rtsx_usb_ms_1:254 blocked for more than 120 seconds. [ 245.272244] Tainted: G W 4.11.0-rc3-ARCH #2 [ 245.273983] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 245.275737] rtsx_usb_ms_1 D 0 254 2 0x00000000 [ 245.277524] Call Trace: [ 245.279278] __schedule+0x2d3/0x8a0 [ 245.281077] schedule+0x3d/0x90 [ 245.281961] usb_kill_urb.part.3+0x6c/0xa0 [usbcore] [ 245.282861] ? wake_atomic_t_function+0x60/0x60 [ 245.283760] usb_kill_urb+0x21/0x30 [usbcore] [ 245.284649] usb_start_wait_urb+0xe5/0x170 [usbcore] [ 245.285541] ? try_to_del_timer_sync+0x53/0x80 [ 245.286434] usb_bulk_msg+0xbd/0x160 [usbcore] [ 245.287326] rtsx_usb_send_cmd+0x63/0x90 [rtsx_usb] Reported-by: diego.viola@gmail.com Tested-by: diego.viola@gmail.com Cc: stable@vger.kernel.org Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
||
|---|---|---|
| .. | ||
| whci | ||
| Kconfig | ||
| Makefile | ||
| bcma-hcd.c | ||
| ehci-atmel.c | ||
| ehci-dbg.c | ||
| ehci-exynos.c | ||
| ehci-fsl.c | ||
| ehci-fsl.h | ||
| ehci-grlib.c | ||
| ehci-hcd.c | ||
| ehci-hub.c | ||
| ehci-mem.c | ||
| ehci-msm.c | ||
| ehci-mv.c | ||
| ehci-mxc.c | ||
| ehci-omap.c | ||
| ehci-orion.c | ||
| ehci-pci.c | ||
| ehci-platform.c | ||
| ehci-pmcmsp.c | ||
| ehci-ppc-of.c | ||
| ehci-ps3.c | ||
| ehci-q.c | ||
| ehci-sched.c | ||
| ehci-sh.c | ||
| ehci-spear.c | ||
| ehci-st.c | ||
| ehci-sysfs.c | ||
| ehci-tegra.c | ||
| ehci-tilegx.c | ||
| ehci-timer.c | ||
| ehci-w90x900.c | ||
| ehci-xilinx-of.c | ||
| ehci.h | ||
| 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 | ||
| fotg210.h | ||
| fsl-mph-dr-of.c | ||
| hwa-hc.c | ||
| imx21-dbg.c | ||
| imx21-hcd.c | ||
| imx21-hcd.h | ||
| isp116x-hcd.c | ||
| isp116x.h | ||
| isp1362-hcd.c | ||
| isp1362.h | ||
| max3421-hcd.c | ||
| ohci-at91.c | ||
| ohci-da8xx.c | ||
| ohci-dbg.c | ||
| ohci-exynos.c | ||
| ohci-hcd.c | ||
| ohci-hub.c | ||
| ohci-mem.c | ||
| ohci-nxp.c | ||
| 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 | ||
| ohci-st.c | ||
| ohci-tilegx.c | ||
| ohci-tmio.c | ||
| ohci.h | ||
| oxu210hp-hcd.c | ||
| 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 | ||
| uhci-debug.c | ||
| uhci-grlib.c | ||
| uhci-hcd.c | ||
| uhci-hcd.h | ||
| uhci-hub.c | ||
| uhci-pci.c | ||
| uhci-platform.c | ||
| uhci-q.c | ||
| xhci-dbg.c | ||
| xhci-ext-caps.h | ||
| xhci-hub.c | ||
| xhci-mem.c | ||
| xhci-mtk-sch.c | ||
| xhci-mtk.c | ||
| xhci-mtk.h | ||
| xhci-mvebu.c | ||
| xhci-mvebu.h | ||
| xhci-pci.c | ||
| xhci-plat.c | ||
| xhci-plat.h | ||
| xhci-rcar.c | ||
| xhci-rcar.h | ||
| xhci-ring.c | ||
| xhci-tegra.c | ||
| xhci-trace.c | ||
| xhci-trace.h | ||
| xhci.c | ||
| xhci.h | ||