WSL2-Linux-Kernel/drivers/usb/musb
Thomas Petazzoni b65ba0c362 usb: musb: fix MUSB_QUIRK_B_DISCONNECT_99 handling
In commit 92af4fc6ec ("usb: musb: Fix suspend with devices
connected for a64"), the logic to support the
MUSB_QUIRK_B_DISCONNECT_99 quirk was modified to only conditionally
schedule the musb->irq_work delayed work.

This commit badly breaks ECM Gadget on AM335X. Indeed, with this
commit, one can observe massive packet loss:

$ ping 192.168.0.100
...
15 packets transmitted, 3 received, 80% packet loss, time 14316ms

Reverting this commit brings back a properly functioning ECM
Gadget. An analysis of the commit seems to indicate that a mistake was
made: the previous code was not falling through into the
MUSB_QUIRK_B_INVALID_VBUS_91, but now it is, unless the condition is
taken.

Changing the logic to be as it was before the problematic commit *and*
only conditionally scheduling musb->irq_work resolves the regression:

$ ping 192.168.0.100
...
64 packets transmitted, 64 received, 0% packet loss, time 64475ms

Fixes: 92af4fc6ec ("usb: musb: Fix suspend with devices connected for a64")
Cc: stable@vger.kernel.org
Tested-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Tested-by: Drew Fustini <drew@beagleboard.org>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Link: https://lore.kernel.org/r/20210528140446.278076-1-thomas.petazzoni@bootlin.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-02 16:58:08 +02:00
..
Kconfig
Makefile
am35x.c
cppi_dma.c
cppi_dma.h
da8xx.c
davinci.c
davinci.h
jz4740.c
mediatek.c usb: musb: Fix an error message 2021-05-10 16:17:57 +02:00
musb_core.c usb: musb: fix MUSB_QUIRK_B_DISCONNECT_99 handling 2021-06-02 16:58:08 +02:00
musb_core.h usb: musb: musb_core: Add space after that ',' 2021-04-22 10:49:22 +02:00
musb_cppi41.c
musb_debug.h
musb_debugfs.c
musb_dma.h
musb_dsps.c
musb_gadget.c
musb_gadget.h
musb_gadget_ep0.c
musb_host.c
musb_host.h
musb_io.h
musb_regs.h
musb_trace.c
musb_trace.h
musb_virthub.c
musbhsdma.c
omap2430.c
omap2430.h
sunxi.c
tusb6010.c
tusb6010.h
tusb6010_omap.c
ux500.c
ux500_dma.c