From: "Alex Kononov" <alex@albefly.com>
To: "'Mathias Nyman'" <mathias.nyman@intel.com>
Cc: <linux-usb@vger.kernel.org>, "'Takashi Iwai'" <tiwai@suse.com>,
<linux-sound@vger.kernel.org>
Subject: xhci: unratelimited "buffer overrun event" warning floods log (~7000/s) with USB S/PDIF capture device
Date: Sat, 21 Nov 2026 01:58:44 -0500 [thread overview]
Message-ID: <001801dd7985$c068fc60$413af520$@albefly.com> (raw)
Good day Mathias,
With a USB S/PDIF TX/RX adapter (Savitech, 262a:9123, UAC2, high speed), the
xHCI driver logs an isochronous buffer overrun warning for nearly
every microframe while the adapter's S/PDIF input has no signal:
xhci_hcd 0000:00:14.0: WARN: buffer overrun event for slot 2 ep 4 on
endpoint
Rate measured: ~433,000 messages per minute (~7,200/s). systemd-journald
sits at 100% of one core and reports "Missed N kernel messages".
Setup:
- Intel N100 (PCH xHCI 0000:00:14.0), Debian 13
- Kernel: 6.12.117+deb13-amd64 (same code in mainline 7.4-rc3)
- Capture stream open continuously (CamillaDSP), 48 kHz S16_LE,
EP 0x82 IN isochronous, adaptive, 125 us interval
- TV feeding the S/PDIF input goes idle -> no input signal -> flood.
With a valid input signal the count is 0.
The device is clearly misbehaving (it sends more data than requested when
the S/PDIF receiver is unlocked; it also reports its clock source
as valid while unlocked). The driver handles the events correctly and audio
recovers fine. The problem is only the logging: the warning in
handle_tx_event() for COMP_ISOCH_BUFFER_OVERRUN is not rate-limited, so a
single misbehaving isoc device can generate thousands of lines per second.
Locally I changed that xhci_warn() to dev_warn_ratelimited() and the rate
dropped to ~100/min with no functional change.
Would a patch rate-limiting this message (or demoting it to xhci_dbg) be
acceptable?
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ handle_tx_event()
case COMP_ISOCH_BUFFER_OVERRUN:
- xhci_warn(xhci,
- "WARN: buffer overrun event for slot %u ep %u on
endpoint",
- slot_id, ep_index);
+ dev_warn_ratelimited(xhci_to_hcd(xhci)->self.controller,
+ "WARN: buffer overrun event for slot %u
ep %u on endpoint\n",
+ slot_id, ep_index);
break;
or
case COMP_ISOCH_BUFFER_OVERRUN:
- xhci_warn(xhci,
- "WARN: buffer overrun event for slot %u ep %u on
endpoint",
- slot_id, ep_index);
+ xhci_dbg(xhci, "Buffer overrun event for slot %u ep %u\n",
+ slot_id, ep_index);
break;
Endpoint descriptor:
Endpoint 0x82 (capture), from lsusb -v:
altset 1 (S16_LE): Isochronous, Adaptive, wMaxPacketSize 104, bInterval 1
altset 2 (S24_3LE): Isochronous, Adaptive, wMaxPacketSize 156, bInterval 1
/proc/asound/card0/stream0 while flooding:
Capture: Status: Running, Interface 3, Altset 1,
Packet Size = 36, Momentary freq = 48000 Hz
Thank you,
Alex.
reply other threads:[~2026-11-21 6:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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='001801dd7985$c068fc60$413af520$@albefly.com' \
--to=alex@albefly.com \
--cc=linux-sound@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@intel.com \
--cc=tiwai@suse.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