public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: kernel-lts@openela.org
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	stable@vger.kernel.org,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Drew Fustini <drew@beagleboard.org>,
	Tony Lindgren <tony@atomide.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Sasha Levin <sashal@kernel.org>
Subject: [PATCH 4.14-openela 049/190] usb: musb: fix MUSB_QUIRK_B_DISCONNECT_99 handling
Date: Mon, 15 Apr 2024 06:49:39 -0400	[thread overview]
Message-ID: <20240415105208.3137874-50-sashal@kernel.org> (raw)
In-Reply-To: <20240415105208.3137874-1-sashal@kernel.org>

From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

[ Upstream commit b65ba0c362be665192381cc59e3ac3ef6f0dd1e1 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/usb/musb/musb_core.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 9ed604ddbb585..580f4c12eada3 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -1869,9 +1869,8 @@ static void musb_pm_runtime_check_session(struct musb *musb)
 			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,
-- 
2.43.0


      parent reply	other threads:[~2024-04-15 13:39 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20240415105208.3137874-1-sashal@kernel.org>
2024-04-15 10:48 ` [PATCH 4.14-openela 003/190] ALSA: jack: Fix mutex call in snd_jack_report() Sasha Levin
2024-04-15 10:48 ` [PATCH 4.14-openela 004/190] pinctrl: amd: Detect internal GPIO0 debounce handling Sasha Levin
2024-04-15 10:48 ` [PATCH 4.14-openela 005/190] btrfs: fix extent buffer leak after tree mod log failure at split_node() Sasha Levin
2024-04-15 10:48 ` [PATCH 4.14-openela 007/190] IMA: allow/fix UML builds Sasha Levin
2024-04-15 10:48 ` [PATCH 4.14-openela 008/190] iio: addac: stx104: Fix race condition for stx104_write_raw() Sasha Levin
2024-04-15 10:48 ` [PATCH 4.14-openela 009/190] block: fix signed int overflow in Amiga partition support Sasha Levin
2024-04-15 13:58   ` Geert Uytterhoeven
2024-04-15 10:49 ` [PATCH 4.14-openela 012/190] selftests/ftrace: Add new test case which checks non unique symbol Sasha Levin
2024-04-15 10:49 ` [PATCH 4.14-openela 013/190] iio: exynos-adc: request second interupt only when touchscreen mode is used Sasha Levin
2024-04-15 10:49 ` [PATCH 4.14-openela 021/190] MIPS: KVM: Fix a build warning about variable set but not used Sasha Levin
2024-04-15 10:49 ` [PATCH 4.14-openela 022/190] smb3: fix touch -h of symlink Sasha Levin
2024-04-15 10:49 ` [PATCH 4.14-openela 023/190] fbdev: stifb: Make the STI next font pointer a 32-bit signed offset Sasha Levin
2024-04-15 10:49 ` [PATCH 4.14-openela 025/190] arm64: dts: mediatek: mt8173-evb: Fix regulator-fixed node names Sasha Levin
2024-04-15 10:49 ` [PATCH 4.14-openela 028/190] btrfs: do not allow non subvolume root targets for snapshot Sasha Levin
2024-04-15 10:49 ` [PATCH 4.14-openela 029/190] smb: client: fix OOB in smbCalcSize() Sasha Levin
2024-04-15 10:49 ` [PATCH 4.14-openela 031/190] IB/hfi1: Fix sdma.h tx->num_descs off-by-one error Sasha Levin
2024-04-15 10:49 ` [PATCH 4.14-openela 032/190] pinctrl: amd: Only use special debounce behavior for GPIO 0 Sasha Levin
2024-04-15 10:49 ` [PATCH 4.14-openela 033/190] PCI: qcom: Disable write access to read only registers for IP v2.3.3 Sasha Levin
2024-04-15 10:49 ` [PATCH 4.14-openela 034/190] ASoC: cs42l51: fix driver to properly autoload with automatic module loading Sasha Levin
2024-04-15 10:49 ` [PATCH 4.14-openela 044/190] PCI: keystone: Don't discard .remove() callback Sasha Levin
2024-04-15 10:49 ` [PATCH 4.14-openela 045/190] PCI: keystone: Don't discard .probe() callback Sasha Levin
2024-04-15 10:49 ` [PATCH 4.14-openela 046/190] ksmbd: fix wrong name of SMB2_CREATE_ALLOCATION_SIZE Sasha Levin
2024-04-15 10:49 ` Sasha Levin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240415105208.3137874-50-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=alexandre.belloni@bootlin.com \
    --cc=drew@beagleboard.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel-lts@openela.org \
    --cc=stable@vger.kernel.org \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox