From: sashiko-bot@kernel.org
To: "Kyle Farrell" <kaf@nwlink.com>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH] usb: gadget: u_audio: don't exceed maxpacket when adding a residue frame
Date: Mon, 26 Oct 2026 23:15:13 +0000 [thread overview]
Message-ID: <sashiko-outbox-185829@kernel.org> (raw)
In-Reply-To: <20261026231026.721536-1-kaf@nwlink.com>
> u_audio_iso_complete() clamps the base packet size to ep->maxpacket
> and accumulates fractional-frame residue in p_residue_mil. Once a
> whole frame has accumulated, it is appended to the packet without
> checking whether it fits within ep->maxpacket.
>
> Only append the extra frame if it fits. Consume the accumulated
> residue whether or not the frame is sent, preventing it from growing
> when the additional frame cannot fit. When the frame fits, behavior
> is unchanged. Otherwise, the stream cannot sustain the requested
> sample rate.
>
> For example, with 27 channels of 32-bit samples at 19200 Hz on a
> high-speed link with p_hs_bint=3, the required packet size of 1080
> bytes is capped at 1024. The base packet is 972 bytes, but appending
> a residue frame increases it to 1080 bytes, exceeding the allocated
> request buffer by 56 bytes.
>
> Fixes: 9bb87f168931 ("usb: gadget: f_uac2: send reasonably sized packets")
> Link: https://lore.kernel.org/linux-usb/sashiko-outbox-174688@kernel.org/
> Signed-off-by: Kyle Farrell <kaf@nwlink.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261026231026.721536-1-kaf@nwlink.com?part=1
prev parent reply other threads:[~2026-10-26 23:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-26 23:10 [PATCH] usb: gadget: u_audio: don't exceed maxpacket when adding a residue frame Kyle Farrell
2026-10-26 23:15 ` 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-185829@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=kaf@nwlink.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.