From: Greg Kroah-Hartman Date: Sat, 30 Dec 2023 11:45:29 +0000 (+0000) Subject: 4.19-stable patches X-Git-Tag: v6.1.70~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6a57bf733a61590157bdc207798f9ccc7a656b6a;p=thirdparty%2Fkernel%2Fstable-queue.git 4.19-stable patches added patches: usb-musb-fix-musb_quirk_b_disconnect_99-handling.patch --- diff --git a/queue-4.19/series b/queue-4.19/series index f9ee9181314..4413ef71810 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -34,3 +34,4 @@ bluetooth-hci_event-fix-not-checking-if-hci_op_inquiry-has-been-sent.patch net-9p-avoid-freeing-uninit-memory-in-p9pdu_vreadf.patch net-rfkill-gpio-set-gpio-direction.patch x86-alternatives-sync-core-before-enabling-interrupts.patch +usb-musb-fix-musb_quirk_b_disconnect_99-handling.patch diff --git a/queue-4.19/usb-musb-fix-musb_quirk_b_disconnect_99-handling.patch b/queue-4.19/usb-musb-fix-musb_quirk_b_disconnect_99-handling.patch new file mode 100644 index 00000000000..98abfd282e9 --- /dev/null +++ b/queue-4.19/usb-musb-fix-musb_quirk_b_disconnect_99-handling.patch @@ -0,0 +1,60 @@ +From b65ba0c362be665192381cc59e3ac3ef6f0dd1e1 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Fri, 28 May 2021 16:04:46 +0200 +Subject: usb: musb: fix MUSB_QUIRK_B_DISCONNECT_99 handling + +From: Thomas Petazzoni + +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 +Tested-by: Drew Fustini +Acked-by: Tony Lindgren +Signed-off-by: Thomas Petazzoni +Link: https://lore.kernel.org/r/20210528140446.278076-1-thomas.petazzoni@bootlin.com +Signed-off-by: Fabian Godehardt +Signed-off-by: Greg Kroah-Hartman +--- + drivers/usb/musb/musb_core.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- a/drivers/usb/musb/musb_core.c ++++ b/drivers/usb/musb/musb_core.c +@@ -1873,9 +1873,8 @@ static void musb_pm_runtime_check_sessio + schedule_delayed_work(&musb->irq_work, + msecs_to_jiffies(1000)); + musb->quirk_retries--; +- break; + } +- /* fall through */ ++ break; + case MUSB_QUIRK_B_INVALID_VBUS_91: + if (musb->quirk_retries && !musb->flush_irq_work) { + musb_dbg(musb,