android_kernel_samsung_a7y1.../drivers/usb/host
Erkka Talvitie 8732b22aa0 USB: EHCI: Do not return -EPIPE when hub is disconnected
commit 64cc3f12d1c7dd054a215bc1ff9cc2abcfe35832 upstream.

When disconnecting a USB hub that has some child device(s) connected to it
(such as a USB mouse), then the stack tries to clear halt and
reset device(s) which are _already_ physically disconnected.

The issue has been reproduced with:

CPU: IMX6D5EYM10AD or MCIMX6D5EYM10AE.
SW: U-Boot 2019.07 and kernel 4.19.40.

CPU: HP Proliant Microserver Gen8.
SW: Linux version 4.2.3-300.fc23.x86_64

In this situation there will be error bit for MMF active yet the
CERR equals EHCI_TUNE_CERR + halt. Existing implementation
interprets this as a stall [1] (chapter 8.4.5).

The possible conditions when the MMF will be active + halt
can be found from [2] (Table 4-13).

Fix for the issue is to check whether MMF is active and PID Code is
IN before checking for the stall. If these conditions are true then
it is not a stall.

What happens after the fix is that when disconnecting a hub with
attached device(s) the situation is not interpret as a stall.

[1] [https://www.usb.org/document-library/usb-20-specification, usb_20.pdf]
[2] [https://www.intel.com/content/dam/www/public/us/en/documents/
     technical-specifications/ehci-specification-for-usb.pdf]

Signed-off-by: Erkka Talvitie <erkka.talvitie@vincit.fi>
Reviewed-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/ef70941d5f349767f19c0ed26b0dd9eed8ad81bb.1576050523.git.erkka.talvitie@vincit.fi
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-07 13:22:26 +02:00
..
whci A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
bcma-hcd.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ehci-atmel.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ehci-dbg.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ehci-exynos.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ehci-fsl.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ehci-fsl.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ehci-grlib.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ehci-hcd.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ehci-hub.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ehci-mem.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ehci-msm.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ehci-mv.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ehci-mxc.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ehci-omap.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ehci-orion.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ehci-pci.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ehci-platform.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ehci-pmcmsp.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ehci-ppc-of.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ehci-ps3.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ehci-q.c USB: EHCI: Do not return -EPIPE when hub is disconnected 2020-04-07 13:22:26 +02:00
ehci-sched.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ehci-sead3.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ehci-sh.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ehci-spear.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ehci-st.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ehci-sysfs.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ehci-tegra.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ehci-tilegx.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ehci-timer.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ehci-w90x900.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ehci-xilinx-of.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ehci.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
fhci-dbg.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
fhci-hcd.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
fhci-hub.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
fhci-mem.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
fhci-q.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
fhci-sched.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
fhci-tds.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
fhci.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
fotg210-hcd.c usb: host: fotg2: restart hcd after port reset 2020-04-06 21:33:10 +02:00
fotg210.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
fsl-mph-dr-of.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hwa-hc.c usb: wusbcore: fix unbalanced get/put cluster_id 2020-04-06 20:16:34 +02:00
imx21-dbg.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
imx21-hcd.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
imx21-hcd.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
isp116x-hcd.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
isp116x.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
isp1362-hcd.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
isp1362.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Kconfig A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Makefile A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
max3421-hcd.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ohci-at91.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ohci-da8xx.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ohci-dbg.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ohci-exynos.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ohci-hcd.c usb: host: ohci: fix a race condition between shutdown and irq 2020-04-06 21:33:36 +02:00
ohci-hub.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ohci-jz4740.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ohci-mem.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ohci-nxp.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ohci-omap.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ohci-omap3.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ohci-pci.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ohci-platform.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ohci-ppc-of.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ohci-ps3.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ohci-pxa27x.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ohci-q.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ohci-s3c2410.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ohci-sa1111.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ohci-sm501.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ohci-spear.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ohci-st.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ohci-tilegx.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ohci-tmio.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ohci.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
oxu210hp-hcd.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
oxu210hp.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
pci-quirks.c usb: pci-quirks: Correct AMD PLL quirk detection 2020-04-06 20:16:36 +02:00
pci-quirks.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
r8a66597-hcd.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
r8a66597.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sl811_cs.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sl811-hcd.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sl811.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ssb-hcd.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
u132-hcd.c usb: u132-hcd: fix resource leak 2020-04-06 16:41:37 +02:00
uhci-debug.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
uhci-grlib.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
uhci-hcd.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
uhci-hcd.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
uhci-hub.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
uhci-pci.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
uhci-platform.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
uhci-q.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
xhci-dbg.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
xhci-ext-caps.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
xhci-hub.c xhci: fix USB3 device initiated resume race with roothub autosuspend 2020-04-07 13:12:59 +02:00
xhci-mem.c xhci: Fix memory leak in xhci_add_in_port() 2020-04-07 13:07:41 +02:00
xhci-mvebu.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
xhci-mvebu.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
xhci-pci.c usb: xhci: Fix build warning seen with CONFIG_PM=n 2020-04-07 13:21:56 +02:00
xhci-plat.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
xhci-rcar.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
xhci-rcar.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
xhci-ring.c xhci: fix USB3 device initiated resume race with roothub autosuspend 2020-04-07 13:12:59 +02:00
xhci-trace.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
xhci-trace.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
xhci.c usb: xhci: only set D3hot for pci device 2020-04-07 13:07:39 +02:00
xhci.h xhci: fix USB3 device initiated resume race with roothub autosuspend 2020-04-07 13:12:59 +02:00