Thomas Petazzoni b65ba0c362 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 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-02 16:58:08 +02:00
..
2021-05-05 13:24:11 -07:00
2021-04-18 09:36:56 +03:00
2021-05-15 08:52:30 -07:00
2021-04-29 11:57:23 -07:00
2021-04-26 12:11:52 -07:00
2021-05-20 06:31:52 -10:00
2021-04-28 15:59:13 -07:00
2021-05-20 14:46:26 -10:00
2021-04-26 12:11:52 -07:00
2021-04-27 18:09:44 -07:00
2021-05-20 06:31:52 -10:00
2021-05-01 10:14:08 -07:00
2021-05-28 14:42:37 -10:00
2021-04-28 15:59:13 -07:00
2021-05-29 06:41:50 -10:00
2021-05-01 10:14:08 -07:00
2021-04-29 11:57:23 -07:00
2021-05-05 12:53:16 -07:00
2021-04-28 15:59:13 -07:00
2021-05-04 11:13:33 -07:00
2021-05-05 13:24:11 -07:00
2021-05-03 12:15:21 -07:00
2021-05-28 14:47:48 -10:00
2021-05-01 09:33:00 -07:00
2021-05-17 16:06:02 +02:00
2021-05-01 09:33:00 -07:00
2021-05-05 13:31:39 -07:00
2021-04-28 15:59:13 -07:00
2021-05-05 13:31:39 -07:00