kernel-fxtec-pro1x/drivers/usb/host
Ding Hui dc52d19b77 xhci: Always restore EP_SOFT_CLEAR_TOGGLE even if ep reset failed
commit f1ec7ae6c9f8c016db320e204cb519a1da1581b8 upstream.

Some device drivers call libusb_clear_halt when target ep queue
is not empty. (eg. spice client connected to qemu for usb redir)

Before commit f5249461b5 ("xhci: Clear the host side toggle
manually when endpoint is soft reset"), that works well.
But now, we got the error log:

    EP not empty, refuse reset

xhci_endpoint_reset failed and left ep_state's EP_SOFT_CLEAR_TOGGLE
bit still set

So all the subsequent urb sumbits to the ep will fail with the
warn log:

    Can't enqueue URB while manually clearing toggle

We need to clear ep_state EP_SOFT_CLEAR_TOGGLE bit after
xhci_endpoint_reset, even if it failed.

Fixes: f5249461b5 ("xhci: Clear the host side toggle manually when endpoint is soft reset")
Cc: stable <stable@vger.kernel.org> # v4.17+
Signed-off-by: Ding Hui <dinghui@sangfor.com.cn>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20200821091549.20556-4-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-09-03 11:24:28 +02:00
..
whci USB: host: whci: remove redundant variable t 2018-07-13 15:41:56 +02:00
bcma-hcd.c
ehci-atmel.c
ehci-dbg.c USB: ehci-hcd: no need to check return value of debugfs_create functions 2018-05-31 12:54:22 +02:00
ehci-exynos.c usb: host: ehci-exynos: Fix error check in exynos_ehci_probe() 2020-06-30 23:17:08 -04:00
ehci-fsl.c
ehci-fsl.h
ehci-grlib.c
ehci-hcd.c USB: ehci-hcd: Add get_resuming_ports method 2018-06-25 21:44:43 +08:00
ehci-hub.c USB: ehci-hcd: Add get_resuming_ports method 2018-06-25 21:44:43 +08:00
ehci-mem.c Revert "usb: host: ehci: Use dma_pool_zalloc()" 2018-05-04 14:35:12 -07:00
ehci-mv.c
ehci-mxc.c USB: host: ehci-mxc: Add error handling in ehci_mxc_drv_probe() 2020-06-25 15:32:57 +02:00
ehci-npcm7xx.c USB: host: ehci-npcm7xx: Fix some error codes in probe 2018-06-28 19:32:42 +09:00
ehci-omap.c usb: ehci-omap: Fix deferred probe for phy handling 2019-12-05 09:20:20 +01:00
ehci-orion.c
ehci-pci.c USB: ehci: reopen solution for Synopsys HC bug 2020-06-30 23:17:07 -04:00
ehci-platform.c Revert "usb/ehci-platform: Set PM runtime as active on resume" 2020-07-22 09:32:03 +02:00
ehci-pmcmsp.c
ehci-ppc-of.c
ehci-ps3.c powerpc/ps3: Set driver coherent_dma_mask 2018-07-20 12:50:37 +10:00
ehci-q.c USB: EHCI: Do not return -EPIPE when hub is disconnected 2019-12-31 16:36:23 +01:00
ehci-sched.c usb: host: ehci-sched: remove redundant pointer dev 2018-07-13 15:41:56 +02:00
ehci-sh.c
ehci-spear.c
ehci-st.c
ehci-sysfs.c
ehci-tegra.c usb: tegra: Move utmi-pads reset from ehci-tegra to tegra-phy 2018-04-23 09:50:57 +02:00
ehci-timer.c
ehci-w90x900.c
ehci-xilinx-of.c
ehci.h
fhci-dbg.c USB: fhci-hcd: no need to check return value of debugfs_create functions 2018-05-31 12:54:22 +02:00
fhci-hcd.c
fhci-hub.c
fhci-mem.c
fhci-q.c
fhci-sched.c
fhci-tds.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
fhci.h USB: fhci-hcd: no need to check return value of debugfs_create functions 2018-05-31 12:54:22 +02:00
fotg210-hcd.c usb: host: fotg2: restart hcd after port reset 2019-09-06 10:21:59 +02:00
fotg210.h
fsl-mph-dr-of.c
hwa-hc.c usb: wusbcore: fix unbalanced get/put cluster_id 2019-07-31 07:27:10 +02:00
imx21-dbg.c USB: imx21-hcd: no need to check return value of debugfs_create functions 2018-05-31 12:54:22 +02:00
imx21-hcd.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
imx21-hcd.h
isp116x-hcd.c USB: isp116x-hcd: no need to check return value of debugfs_create functions 2018-05-31 12:54:21 +02:00
isp116x.h
isp1362-hcd.c
isp1362.h
Kconfig USB host: Add USB ehci support for nuvoton npcm7xx platform 2018-06-25 21:59:15 +08:00
Makefile USB host: Add USB ehci support for nuvoton npcm7xx platform 2018-06-25 21:59:15 +08:00
max3421-hcd.c
ohci-at91.c usb: host: ohci-at91: fix request of irq for optional gpio 2018-11-13 11:08:33 -08:00
ohci-da8xx.c
ohci-dbg.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
ohci-exynos.c usb: host: exynos: Remove support for Exynos5440 2018-07-24 18:44:00 +02:00
ohci-hcd.c usb: host: ohci: fix a race condition between shutdown and irq 2019-09-06 10:22:15 +02:00
ohci-hub.c
ohci-mem.c
ohci-nxp.c
ohci-omap.c
ohci-pci.c
ohci-platform.c Revert "usb/ohci-platform: Fix a warning when hibernating" 2020-07-22 09:32:03 +02:00
ohci-ppc-of.c
ohci-ps3.c powerpc/ps3: Set driver coherent_dma_mask 2018-07-20 12:50:37 +10:00
ohci-pxa27x.c
ohci-q.c
ohci-s3c2410.c
ohci-sa1111.c
ohci-sm501.c USB: ohci-sm501: Add missed iounmap() in remove 2020-06-30 23:17:07 -04:00
ohci-spear.c
ohci-st.c
ohci-tmio.c
ohci.h USB: ohci: no need to check return value of debugfs_create functions 2018-05-31 12:54:21 +02:00
oxu210hp-hcd.c
oxu210hp.h
pci-quirks.c usb: pci-quirks: Correct AMD PLL quirk detection 2019-07-31 07:27:10 +02:00
pci-quirks.h Revert "xhci: Reset Renesas uPD72020x USB controller for 32-bit DMA issue" 2018-06-01 13:24:51 +02:00
r8a66597-hcd.c usb: r8a66597: Fix a possible concurrency use-after-free bug in r8a66597_endpoint_disable() 2019-01-09 17:38:39 +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 09:20:21 +02:00
uhci-debug.c
uhci-grlib.c
uhci-hcd.c USB: uhci: no need to check return value of debugfs_create functions 2018-05-31 12:54:21 +02:00
uhci-hcd.h
uhci-hub.c
uhci-pci.c
uhci-platform.c
uhci-q.c
xhci-dbg.c
xhci-dbgcap.c usb: xhci: dbc: Don't free all memory with spinlock held 2019-04-03 06:26:27 +02:00
xhci-dbgcap.h usb: xhci: dbc: Add SPDX identifiers to dbc files 2018-05-24 18:03:07 +02:00
xhci-dbgtty.c usb: xhci: dbc: Add SPDX identifiers to dbc files 2018-05-24 18:03:07 +02:00
xhci-debugfs.c usb: host: xhci: fix ep context print mismatch in debugfs 2020-09-03 11:24:28 +02:00
xhci-debugfs.h
xhci-ext-caps.c
xhci-ext-caps.h
xhci-histb.c xhci: Fix leaking USB3 shared_hcd at xhci removal 2018-12-01 09:37:25 +01:00
xhci-hub.c xhci: Do warm-reset when both CAS and XDEV_RESUME are set 2020-09-03 11:24:28 +02:00
xhci-mem.c xhci: Fix memory leak when caching protocol extended capability PSI tables - take 2 2020-02-28 16:38:46 +01:00
xhci-mtk-sch.c usb: xhci-mtk: fix the failure of bandwidth allocation 2020-07-29 10:16:55 +02:00
xhci-mtk.c usb: host: xhci-mtk: avoid runtime suspend when removing hcd 2020-06-30 23:17:07 -04:00
xhci-mtk.h
xhci-mvebu.c
xhci-mvebu.h
xhci-pci.c usb: xhci: Fix ASMedia ASM1142 DMA addressing 2020-08-11 15:32:30 +02:00
xhci-plat.c Revert "usb/xhci-plat: Set PM runtime as active on resume" 2020-07-22 09:32:03 +02:00
xhci-plat.h
xhci-rcar.c usb: host: xhci: rcar: Fix typo in compatible string matching 2019-09-06 10:22:16 +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:18:48 +02:00
xhci-tegra.c usb: host: xhci-tegra: Set DMA mask correctly 2019-09-21 07:17:04 +02:00
xhci-trace.c
xhci-trace.h xhci: Do not open code __print_symbolic() in xhci trace events 2020-03-25 08:06:12 +01:00
xhci.c xhci: Always restore EP_SOFT_CLEAR_TOGGLE even if ep reset failed 2020-09-03 11:24:28 +02:00
xhci.h xhci: Fix incorrect EP_STATE_MASK 2020-06-30 23:17:08 -04:00