Linux USB
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Elvira Khabirova" <lineprinter0@gmail.com>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH v4 2/2] usb: musb: gadget: don't flush a waiting RX packet when queueing a request
Date: Sat, 07 Nov 2026 22:37:48 +0000	[thread overview]
Message-ID: <sashiko-outbox-203369@kernel.org> (raw)
In-Reply-To: <20261107221904.82487-3-lineprinter0@gmail.com>

> Since commit 3fc137386c46 ("usb: musb: Fix hardware lockup on first Rx
> endpoint request"), musb_ep_restart() flushes the RX FIFO instead of
> calling rxstate(), with the premise that in case of Ethernet, dropping
> a couple of packets during gadget initialization is not an issue,
> because it will only happen when the software is not yet ready.
> 
> But when using other functions with musb, for example, f_mass_storage
> or f_acm, this code path will be used not only when the software is not
> yet ready, but also mid-communication, and it will cause data loss.
> Data loss happens on gadgets that don't always have requests queued
> for an ep.
> 
> The timeline of a data loss:
> 
> 1. A function that does not have a lot of requests pre-queued
> [ ... ]
> This patch was also tested with suspend to RAM on the Pine A64+,
> both idle and during a transfer.
> 
> Fixes: 3fc137386c46 ("usb: musb: Fix hardware lockup on first Rx endpoint request")
> Signed-off-by: Elvira Khabirova <lineprinter0@gmail.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261107221904.82487-1-lineprinter0@gmail.com?part=2


      reply	other threads:[~2026-11-07 22:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-07 22:19 [PATCH v4 0/2] usb: musb: gadget: don't flush a waiting RX packet Elvira Khabirova
2026-11-07 22:19 ` [PATCH v4 1/2] usb: musb: gadget: count givebacks in busy Elvira Khabirova
2026-11-07 22:35   ` sashiko-bot
2026-11-07 23:08     ` Elvira Khabirova
2026-11-07 22:19 ` [PATCH v4 2/2] usb: musb: gadget: don't flush a waiting RX packet when queueing a request Elvira Khabirova
2026-11-07 22:37   ` sashiko-bot [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=sashiko-outbox-203369@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=lineprinter0@gmail.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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