From: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
To: Li Haifeng <omycle@gmail.com>
Cc: Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
Greg KH <gregkh@linuxfoundation.org>,
"Felipe.Balbi@microsoft.com" <Felipe.Balbi@microsoft.com>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>
Subject: Re: Issue with DWC3 Gadget Driver: Stall After Transmitting Only 2KB Using Scatter-Gather and TRB Chaining
Date: Tue, 4 Nov 2025 01:16:10 +0000 [thread overview]
Message-ID: <20251104011607.jixamckrfphh3ktx@synopsys.com> (raw)
In-Reply-To: <CAFNq8R6tk2VVpsmG-5dS0UPWRQF3TgVH-nhJ+6bbR1yYSS3UAQ@mail.gmail.com>
On Mon, Nov 03, 2025, Li Haifeng wrote:
> Dear Thinh,
>
> Thank you for your detailed analysis and suggestions.
>
> Using a logic analyzer, I did not observe any NRDY or flow control
> events on the device side for the corresponding endpoint. I reviewed
> the handling logic in the USB ECM host module from the latest Linux
> kernel. It allocates the receive buffer based on wMaxSegmentSize,
> which is 1514 bytes, so if the data sent from the device exceeds this
> value (as the previous 2KB size did), the host's behavior might become
> abnormal. I will conduct an experiment to observe this phenomenon.
>
> What puzzles me is why the device's endpoint does not generate an NRDY
> event in this scenario.
>
The host drives the device. The device would respond with NRDY if the
host requests for data. If not, then probably host didn't request for
it. You should be able to confirm that in the USB traffic trace. This is
correspond to what you noted that host prepared and likely requested
1514 bytes only. There's a mismatch in the communication at the gadget
driver protocol. I'm not familiar with the Ethernet protocol, check
that. The device should not send more than what the host asks for.
BR,
Thinh
next prev parent reply other threads:[~2025-11-04 1:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-30 8:49 Issue with DWC3 Gadget Driver: Stall After Transmitting Only 2KB Using Scatter-Gather and TRB Chaining Li Haifeng
2025-10-30 9:39 ` Greg KH
2025-10-30 12:47 ` Li Haifeng
2025-10-31 22:41 ` Thinh Nguyen
2025-11-03 6:22 ` Li Haifeng
2025-11-04 1:16 ` Thinh Nguyen [this message]
2025-11-04 1:20 ` Thinh Nguyen
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=20251104011607.jixamckrfphh3ktx@synopsys.com \
--to=thinh.nguyen@synopsys.com \
--cc=Felipe.Balbi@microsoft.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-usb@vger.kernel.org \
--cc=omycle@gmail.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