mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 00:48:50 +00:00
448116bfa8
During quick plug/removal of OTG adapter during dual-role testing it can happen that xhci_alloc_device() is called for the newly detected device after the DRD library has called xhci_stop to remove the HCD. If that is the case, just fail early to prevent the following warning. [ 154.732649] hub 4-0:1.0: USB hub found [ 154.742204] hub 4-0:1.0: 1 port detected [ 154.824458] hub 3-0:1.0: state 7 ports 1 chg 0002 evt 0000 [ 154.854609] hub 4-0:1.0: state 7 ports 1 chg 0000 evt 0000 [ 154.944430] usb 3-1: new high-speed USB device number 2 using xhci-hcd [ 154.951009] xhci-hcd xhci-hcd.0.auto: xhci_setup_device [ 155.038191] xhci-hcd xhci-hcd.0.auto: remove, state 4 [ 155.043315] usb usb4: USB disconnect, device number 1 [ 155.055270] xhci-hcd xhci-hcd.0.auto: xhci_stop [ 155.060094] xhci-hcd xhci-hcd.0.auto: USB bus 4 deregistered [ 155.066576] xhci-hcd xhci-hcd.0.auto: remove, state 1 [ 155.071710] usb usb3: USB disconnect, device number 1 [ 155.077124] xhci-hcd xhci-hcd.0.auto: xhci_setup_device [ 155.082389] ------------[ cut here ]------------ [ 155.087690] WARNING: CPU: 0 PID: 72 at drivers/usb/host/xhci.c:3800 xhci_setup_device+0x410/0x484 [xhci_hcd]() [ 155.097861] Modules linked in: sd_mod usb_storage scsi_mod usb_f_ss_lb g_zero libcomposite ipv6 xhci_plat_hcd xhci_hcd usbcore dwc3 udc_core evdev ti_am335x_adc joydev kfifo_buf industrialio snd_soc_simple_cc [ 155.146734] CPU: 0 PID: 72 Comm: kworker/0:3 Tainted: G W 4.1.4-00834-gcd9380b-dirty #50 [ 155.156073] Hardware name: Generic AM43 (Flattened Device Tree) [ 155.162117] Workqueue: usb_hub_wq hub_event [usbcore] [ 155.167249] Backtrace: [ 155.169751] [<c0012af0>] (dump_backtrace) from [<c0012c8c>] (show_stack+0x18/0x1c) [ 155.177390] r6:c089d4a4 r5:ffffffff r4:00000000 r3:ee46c000 [ 155.183137] [<c0012c74>] (show_stack) from [<c05f7c14>] (dump_stack+0x84/0xd0) [ 155.190446] [<c05f7b90>] (dump_stack) from [<c00439ac>] (warn_slowpath_common+0x80/0xbc) [ 155.198605] r7:00000009 r6:00000ed8 r5:bf27eb70 r4:00000000 [ 155.204348] [<c004392c>] (warn_slowpath_common) from [<c0043a0c>] (warn_slowpath_null+0x24/0x2c) [ 155.213202] r8:ee49f000 r7:ee7c0004 r6:00000000 r5:ee7c0158 r4:ee7c0000 [ 155.220051] [<c00439e8>] (warn_slowpath_null) from [<bf27eb70>] (xhci_setup_device+0x410/0x484 [xhci_hcd]) [ 155.229816] [<bf27e760>] (xhci_setup_device [xhci_hcd]) from [<bf27ec10>] (xhci_address_device+0x14/0x18 [xhci_hcd]) [ 155.240415] r10:ee598200 r9:00000001 r8:00000002 r7:00000001 r6:00000003 r5:00000002 [ 155.248363] r4:ee49f000 [ 155.250978] [<bf27ebfc>] (xhci_address_device [xhci_hcd]) from [<bf20cb94>] (hub_port_init+0x1b8/0xa9c [usbcore]) [ 155.261403] [<bf20c9dc>] (hub_port_init [usbcore]) from [<bf2101e0>] (hub_event+0x738/0x1020 [usbcore]) [ 155.270874] r10:ee598200 r9:ee7c0000 r8:ee7c0038 r7:ee518800 r6:ee49f000 r5:00000001 [ 155.278822] r4:00000000 [ 155.281426] [<bf20faa8>] (hub_event [usbcore]) from [<c005754c>] (process_one_work+0x128/0x340) [ 155.290196] r10:00000000 r9:00000003 r8:00000000 r7:fedfa000 r6:eeec5400 r5:ee598314 [ 155.298151] r4:ee434380 [ 155.300718] [<c0057424>] (process_one_work) from [<c00578f8>] (worker_thread+0x158/0x49c) [ 155.308963] r10:ee434380 r9:00000003 r8:eeec5400 r7:00000008 r6:ee434398 r5:eeec5400 [ 155.316913] r4:eeec5414 [ 155.319482] [<c00577a0>] (worker_thread) from [<c005cc40>] (kthread+0xdc/0xf8) [ 155.326765] r10:00000000 r9:00000000 r8:00000000 r7:c00577a0 r6:ee434380 r5:ee4441c0 [ 155.334713] r4:00000000 r3:00000000 [ 155.338341] [<c005cb64>] (kthread) from [<c000fc08>] (ret_from_fork+0x14/0x2c) [ 155.345626] r7:00000000 r6:00000000 r5:c005cb64 r4:ee4441c0 [ 155.356108] ---[ end trace a58d34c223b190e6 ]--- [ 155.360783] xhci-hcd xhci-hcd.0.auto: Virt dev invalid for slot_id 0x1! [ 155.574404] xhci-hcd xhci-hcd.0.auto: xhci_setup_device [ 155.579667] ------------[ cut here ]------------ Cc: <stable@vger.kernel.org> Signed-off-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
||
---|---|---|
.. | ||
whci | ||
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-sead3.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 | ||
fusbh200-hcd.c | ||
fusbh200.h | ||
hwa-hc.c | ||
imx21-dbg.c | ||
imx21-hcd.c | ||
imx21-hcd.h | ||
isp116x-hcd.c | ||
isp116x.h | ||
isp1362-hcd.c | ||
isp1362.h | ||
Kconfig | ||
Makefile | ||
max3421-hcd.c | ||
ohci-at91.c | ||
ohci-da8xx.c | ||
ohci-dbg.c | ||
ohci-exynos.c | ||
ohci-hcd.c | ||
ohci-hub.c | ||
ohci-jz4740.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-mvebu.c | ||
xhci-mvebu.h | ||
xhci-pci.c | ||
xhci-plat.c | ||
xhci-rcar.c | ||
xhci-rcar.h | ||
xhci-ring.c | ||
xhci-trace.c | ||
xhci-trace.h | ||
xhci.c | ||
xhci.h |