From: sashiko-bot@kernel.org
To: "Ingo Rohloff" <ingo.rohloff@lauterbach.com>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH v2 1/1] usb: gadget: f_fs: Fix synchronous read() behavior
Date: Fri, 20 Nov 2026 15:09:42 +0000 [thread overview]
Message-ID: <sashiko-outbox-225436@kernel.org> (raw)
In-Reply-To: <20261120145937.39772-2-ingo.rohloff@lauterbach.com>
> Some UDCs (USB Device Controllers) require, that USB OUT requests (host ->
> device), have a size which is a multiple of the USB OUT Endpoint
> MaxPacketSize.
>
> If this is the case, then the flag "quirk_ep_out_aligned_size" in
> "struct usb_gadget" is set.
>
> The current implementation in "f_fs.c" for synchronous reads, behaves
> differently for UDCs which have this flag set to UDCs which have this flag
> NOT set, because ffs_epfile_io() uses usb_ep_align_maybe() and this
> function then aligns the request size if the flag is set.
>
> Example:
> Userspace executes a read() with 128 bytes. For a HighSpeed OUT transfer
> (MaxPacketSize == 512), usb_ep_align_maybe() transforms this into a 512
> [ ... ]
> away). This patch enforces the first behavior (code buffers extra data),
> by **always** aligning the USB OUT request size to the Endpoints
> MaxPacketSize.
>
> Signed-off-by: Ingo Rohloff <ingo.rohloff@lauterbach.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261120145937.39772-1-ingo.rohloff@lauterbach.com?part=1
prev parent reply other threads:[~2026-11-20 15:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 14:59 [PATCH v2 0/1] usb: gadget: f_fs: Fix synchronous read() behavior Ingo Rohloff
2026-11-20 14:59 ` [PATCH v2 1/1] " Ingo Rohloff
2026-11-20 15:09 ` 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-225436@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=ingo.rohloff@lauterbach.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