Linux USB
 help / color / mirror / Atom feed
From: Michal Pecio <michal.pecio@gmail.com>
To: Bart Nagel <bart@tremby.net>
Cc: linux-usb@vger.kernel.org, mathias.nyman@intel.com
Subject: Re: Regression: webcam freezing since Linux 6.15
Date: Thu, 30 Jul 2026 13:08:14 +0200	[thread overview]
Message-ID: <20260730130814.65f7891c.michal.pecio@gmail.com> (raw)
In-Reply-To: <ampPGn-3C9PSEZQz@spiral>

On Wed, 29 Jul 2026 12:37:01 -0700, Bart Nagel wrote:
> I didn't seem to have the "before" blobs your patch indicates in my
> repo and it didn't want to apply where I was (at the first failing
> commit) so I went to 6.18.28 and applied your patch there.

Sorry, forgot to say that the patch was made for 6.15, but if it works
on 6.18 then fine. The alien blob IDs are other (unrelated) patches.

>     [  340.443735] xhci_hcd 0000:00:14.0: Miss service interval error for slot 7 ep 2 ep_trb_dma 10aea6260 td_dma 10aea6270, set skip flag
>     [  340.443740] xhci_hcd 0000:00:14.0: Event 23 for old TD end DMA 10aea6260 after 7us
>     [  340.443743] xhci_hcd 0000:00:14.0: BAILING OUT
>     [  340.443858] xhci_hcd 0000:00:14.0: Miss service interval error for slot 7 ep 2 ep_trb_dma 0 td_dma 10aea6270, set skip flag
>     [  340.443861] xhci_hcd 0000:00:14.0: Miss service interval error for slot 7 ep 2 ep_trb_dma 0 td_dma 10aea6270, set skip flag
>     [  340.444110] xhci_hcd 0000:00:14.0: Found td. Clear skip flag for slot 7 ep 2.

As expected, ep_trb_dma points one entry before the first pending TD.
The driver would throw out all TDs searching for the one which doesn't
exist anymore, but we prevented it and later recovered normally after
getting some event (not logged) which pointed to a valid TD.

So the fix works, maybe with exception of one edge case (see below).
We could potentially use it, or revert the bisected patch (it was only
an optimization, maybe nobody will notice), or add a quirk for this
particular chipset to ignore ep_trb_dma in Missed Service Errors.

Long term solution would be improving detection of events pointing to
completed TDs and/or not skipping when we don't have a sensible TRB
pointer. But we also need a "trivial" fix for stable kernels like 6.18.

> Missed service interval messages do not always lead to a "bailing out"
> message, like this example:

These examples are not interesting because ep_trb_dma is zero. But we
know that it can be non-zero and the driver still works (sometimes).

I'm slightly curious what exactly happens there (probably MSE after
Short Packet on a single-TRB TD), and whether Missed Service Error may
point at a Link TRB, because the current fix wouldn't handle that and
the stream could still hang. So your failure rate may actually be
reduced to 1/255 of what it was, but still not zero.

If possible, please boot the patched kernel again and run it for
a little longer. If it fails, post dmesg starting from the "Miss
service interval error" line which is followed by "All TDs skipped".

And while that is running, also collect another log:

cd /sys/kernel/tracing/
echo 1 > events/xhci-hcd/xhci_handle_event/enable
echo 1 > tracing_on
grep -B5 Missed trace_pipe | tee /tmp/trace

This is supposed to log 6 lines for every Missed Service Error, so it
will grow, but not terribly fast.

Regards,
Michal

  reply	other threads:[~2026-07-30 11:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-21 22:10 Regression: webcam freezing since Linux 6.15 Bart Nagel
2026-07-22 22:22 ` Michal Pecio
2026-07-22 23:23   ` Bart Nagel
2026-07-23  6:14     ` Michal Pecio
2026-07-23  6:19       ` Michal Pecio
2026-07-23 21:02       ` Bart Nagel
2026-07-23 22:45         ` Bart Nagel
2026-07-25  9:59           ` Michal Pecio
2026-07-27 20:23             ` Bart Nagel
2026-07-27 22:31               ` Michal Pecio
2026-07-29 19:37                 ` Bart Nagel
2026-07-30 11:08                   ` Michal Pecio [this message]
2026-07-22 23:30   ` Bart Nagel

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=20260730130814.65f7891c.michal.pecio@gmail.com \
    --to=michal.pecio@gmail.com \
    --cc=bart@tremby.net \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.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