From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: Martin Maurer <martin.maurer@mmeacs.de>, linux-usb@vger.kernel.org
Subject: Re: Problem hanging Bulk IN, with USB 3.x, perhaps due to wMaxPacketSize = 1024 and wMaxBurst = 6 (OUT) and 2 (IN), tested and reproduceable with i.MX8MP and Raspberry Pi Compute Module 5 (CM5)
Date: Thu, 14 Aug 2025 16:02:46 +0300 [thread overview]
Message-ID: <2c13a7f8-647e-4199-b0e6-451128bdd61e@linux.intel.com> (raw)
In-Reply-To: <64e36d3b-606f-4fa7-bb6a-1dfd8a144de6@mmeacs.de>
On 9.8.2025 0.47, Martin Maurer wrote:
> Hello,
>
> since some time I am fighting against a problem with USB:
>
...
>
> Note beside:
>
> I can query number of sent and received IP packets. I sent the pings (1 every second).
>
> The ping does not display, that it receives an answer, after the hang occured.
>
> But the radio module tells 5 sent and 5 received packets, when querying the statistics every 5 packets via QMI.
>
> So I assume sending (Bulk OUT) is working, packet go to server and back to radio module, but answer is not sent over USB from device to host.
>
I didn't fully understand the complex setup, but the subject, and this section does give a hint it
maybe could be related to missing zero-length bulk packets.
The receiving side, which on host side would be the bulk in endpoint usually knows a transfer
is complete when it receives the exact amount it requested, or if it receives a packet shorter than
maxPacketSize. (short transfer)
But if the sender sends less than expected, and it happens to be exactly maxPacketSize (1024) bytes,
then the sender should send an additinal zero-length packet to let receiver know no more data is coming.
Otherwise the receiving side will be stuck waiting for the next packet.
Thanks
Mathias
next prev parent reply other threads:[~2025-08-14 13:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-08 21:47 Problem hanging Bulk IN, with USB 3.x, perhaps due to wMaxPacketSize = 1024 and wMaxBurst = 6 (OUT) and 2 (IN), tested and reproduceable with i.MX8MP and Raspberry Pi Compute Module 5 (CM5) Martin Maurer
2025-08-14 12:16 ` Michał Pecio
2025-08-14 13:02 ` Mathias Nyman [this message]
2025-08-17 14:58 ` Martin Maurer
2025-08-17 15:07 ` Martin Maurer
2025-08-17 15:22 ` Daniele Palmas
2025-08-17 17:01 ` Martin Maurer
2025-08-18 19:49 ` Daniele Palmas
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=2c13a7f8-647e-4199-b0e6-451128bdd61e@linux.intel.com \
--to=mathias.nyman@linux.intel.com \
--cc=linux-usb@vger.kernel.org \
--cc=martin.maurer@mmeacs.de \
/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