Linux USB
 help / color / mirror / Atom feed
* [PATCH v2 0/2] usb: musb: gadget: fix lost Rx packet on first OUT request
@ 2026-11-24 15:03 Alexandru Ardelean
  2026-11-24 15:03 ` [PATCH v2 1/2] Revert "usb: musb: Fix hardware lockup on first Rx endpoint request" Alexandru Ardelean
  2026-11-24 15:03 ` [PATCH v2 2/2] usb: musb: gadget: mask the MUSB IRQ while complete() runs Alexandru Ardelean
  0 siblings, 2 replies; 5+ messages in thread
From: Alexandru Ardelean @ 2026-11-24 15:03 UTC (permalink / raw)
  To: linux-usb
  Cc: stable, hubert.wisniewski.25632, gregkh, b-liu,
	Alexandru Ardelean

Commit 3fc137386c46 ("usb: musb: Fix hardware lockup on first Rx
endpoint request") [1] made musb_ep_restart() flush the Rx FIFO instead
of calling rxstate(). A packet received before the first OUT request is
queued is then dropped. With the mass storage gadget that packet is the
first command (CBW): the host times out and resets the device, and the
drive never gets mounted. Seen on 6.12.57; version 6.1.119 (before the
stable backport) works.

Patch 1 reverts that commit. Patch 2 fixes the original lockup the
second way suggested in that commit: the MUSB IRQ is masked while the
request's complete() callback runs.

Changelog v1 -> v2:
- Split the single patch into a revert and a separate fix, as
  requested by Greg [3].
- Reworded both commit messages; no code changes. The combined diff
  is identical to v1.

v1: [2]

[1] https://lore.kernel.org/r/4ee1ead4525f78fb5909a8cbf99513ad0082ad21.camel@gmail.com
[2] https://lore.kernel.org/linux-usb/20261118115435.49748-1-aardelean@taladin.ro/
[3] https://lore.kernel.org/linux-usb/2026112008-dean-crabbing-a331@gregkh/

Alexandru Ardelean (2):
  Revert "usb: musb: Fix hardware lockup on first Rx endpoint request"
  usb: musb: gadget: mask the MUSB IRQ while complete() runs

 drivers/usb/musb/musb_gadget.c | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-11-24 15:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-24 15:03 [PATCH v2 0/2] usb: musb: gadget: fix lost Rx packet on first OUT request Alexandru Ardelean
2026-11-24 15:03 ` [PATCH v2 1/2] Revert "usb: musb: Fix hardware lockup on first Rx endpoint request" Alexandru Ardelean
2026-11-24 15:16   ` sashiko-bot
2026-11-24 15:03 ` [PATCH v2 2/2] usb: musb: gadget: mask the MUSB IRQ while complete() runs Alexandru Ardelean
2026-11-24 15:23   ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox