path: root/drivers/usb
diff options
authorThomas Petazzoni <>2021-05-28 16:04:46 +0200
committerGreg Kroah-Hartman <>2021-06-02 16:58:08 +0200
commitb65ba0c362be665192381cc59e3ac3ef6f0dd1e1 (patch)
tree84fd8c04387b5deb11cc897218a63f52f06ca1ec /drivers/usb
parent03715ea2e3dbbc56947137ce3b4ac18a726b2f87 (diff)
usb: musb: fix MUSB_QUIRK_B_DISCONNECT_99 handling
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 ... 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 ... 64 packets transmitted, 64 received, 0% packet loss, time 64475ms Fixes: 92af4fc6ec33 ("usb: musb: Fix suspend with devices connected for a64") Cc: Tested-by: Alexandre Belloni <> Tested-by: Drew Fustini <> Acked-by: Tony Lindgren <> Signed-off-by: Thomas Petazzoni <> Link: Signed-off-by: Greg Kroah-Hartman <>
Diffstat (limited to 'drivers/usb')
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 8f09a387b773..4c8f0112481f 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -2009,9 +2009,8 @@ static void musb_pm_runtime_check_session(struct musb *musb)
- break;
- fallthrough;
+ break;
if (musb->quirk_retries && !musb->flush_irq_work) {