linux_dsm_epyc7002/drivers/usb/musb
Thomas Petazzoni 199af8a06d usb: musb: fix MUSB_QUIRK_B_DISCONNECT_99 handling
commit b65ba0c362be665192381cc59e3ac3ef6f0dd1e1 upstream.

In commit 92af4fc6ec33 ("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: 92af4fc6ec33 ("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-16 12:01:41 +02:00
..
am35x.c
cppi_dma.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
cppi_dma.h
da8xx.c
davinci.c
davinci.h USB: musb: Use the correct style for SPDX License Identifier 2020-04-16 14:32:47 +02:00
jz4740.c usb: musb: jz4740: Prevent lockup when CONFIG_SMP is set 2020-05-25 13:36:30 +02:00
Kconfig USB: rename USB OTG hub configuration option 2020-06-19 08:58:42 +02:00
Makefile
mediatek.c usb: musb: Fix an error message 2021-05-19 10:13:13 +02:00
musb_core.c usb: musb: fix MUSB_QUIRK_B_DISCONNECT_99 handling 2021-06-16 12:01:41 +02:00
musb_core.h USB: musb: Use the correct style for SPDX License Identifier 2020-04-16 14:32:47 +02:00
musb_cppi41.c
musb_debug.h USB: musb: Use the correct style for SPDX License Identifier 2020-04-16 14:32:47 +02:00
musb_debugfs.c usb: musb: Fix runtime PM imbalance on error 2020-05-25 13:36:31 +02:00
musb_dma.h USB: musb: Use the correct style for SPDX License Identifier 2020-04-16 14:32:47 +02:00
musb_dsps.c Revert "usb: musb: convert to devm_platform_ioremap_resource_byname" 2020-11-13 14:30:23 +01:00
musb_gadget_ep0.c usb: musb: gadget: Use fallthrough pseudo-keyword 2020-10-10 12:32:29 +02:00
musb_gadget.c
musb_gadget.h USB: musb: Use the correct style for SPDX License Identifier 2020-04-16 14:32:47 +02:00
musb_host.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
musb_host.h USB: musb: Remove unused inline function 2020-07-15 16:48:10 +02:00
musb_io.h USB: musb: Use the correct style for SPDX License Identifier 2020-04-16 14:32:47 +02:00
musb_regs.h USB: musb: Use the correct style for SPDX License Identifier 2020-04-16 14:32:47 +02:00
musb_trace.c
musb_trace.h USB: musb: Use the correct style for SPDX License Identifier 2020-04-16 14:32:47 +02:00
musb_virthub.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
musbhsdma.c
omap2430.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
omap2430.h USB: musb: Use the correct style for SPDX License Identifier 2020-04-16 14:32:47 +02:00
sunxi.c
tusb6010_omap.c
tusb6010.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
tusb6010.h USB: musb: Use the correct style for SPDX License Identifier 2020-04-16 14:32:47 +02:00
ux500_dma.c
ux500.c