public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: Michal Pecio <michal.pecio@gmail.com>,
	Ricardo Ribalda <ribalda@chromium.org>
Cc: JP Hein <jp@jphein.com>, Alan Stern <stern@rowland.harvard.edu>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Hans de Goede <hansg@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-media@vger.kernel.org, linux-usb@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH v5 2/3] media: uvcvideo: add UVC_QUIRK_CTRL_THROTTLE for fragile firmware
Date: Sat, 11 Apr 2026 00:48:05 +0300	[thread overview]
Message-ID: <c4275422-a9b4-4519-95f9-1163a7912709@linux.intel.com> (raw)
In-Reply-To: <20260409221749.5e6bccab.michal.pecio@gmail.com>

On 4/9/26 23:17, Michal Pecio wrote:

> Five seconds later two control URBs are unlinked:
> Mar 30 16:59:21 katana kernel: xhci_hcd 0000:00:14.0: Cancel URB 00000000122aa5e2, dev 3.1, ep 0x0, starting at offset 0x11e227b40
> Mar 30 16:59:21 katana kernel: xhci_hcd 0000:00:14.0: // Ding dong!
> Mar 30 16:59:21 katana kernel: xhci_hcd 0000:00:14.0: Cancel URB 000000008a55bcd3, dev 3.1, ep 0x0, starting at offset 0x11e227b20
> Mar 30 16:59:21 katana kernel: xhci_hcd 0000:00:14.0: Not queuing Stop Endpoint on slot 18 ep 0 in state 0x44

log continues with:
Mar 30 16:59:21 katana kernel: xhci_hcd 0000:00:14.0: Removing canceled TD starting at 0x11e227b40 (dma) in stream 0 URB 00000000122aa5e2
Mar 30 16:59:21 katana kernel: xhci_hcd 0000:00:14.0: Removing canceled TD starting at 0x11e227b20 (dma) in stream 0 URB 000000008a55bcd3
Mar 30 16:59:21 katana kernel: xhci_hcd 0000:00:14.0: Set TR Deq ptr 0x11e227b40, cycle 0

One theory could be that xHC control endpoint refuses to restart when its dequeue
pointer is moved to a no-op TD like in this case (second cancelled URB).

xhci spec section 4.8.3 'Endpoint context state' additional Note states that:
"The Default Control Endpoint shall return to the Running state when the
  Doorbell is rung for the next Setup Stage TD sent to the endpoint."

Here the dequeue pointer will still be on the no-op TRB after queuing a new
control transfer after it. Not on a setup stage TRB

This can happen when we cancel two control URBs at the same time.
We turn the second URB TRBs starting at 0x11e227b40 into no-ops,
then move past the first URB TRBs starting at 0x11e227b20 to the second URB no-op TRB
at 0x11e227b40.

It's possible that disabling LPM helps as it reduces the number of control transfers,
so there is a much smaller risk of cancelling two control URBs in one go.

Thanks
Mathias



  parent reply	other threads:[~2026-04-10 21:48 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260331003806.212565-1-jp@jphein.com>
2026-03-31  0:38 ` [PATCH v5 1/3] USB: core: add NO_LPM quirk for Razer Kiyo Pro webcam JP Hein
2026-03-31  0:38 ` [PATCH v5 2/3] media: uvcvideo: add UVC_QUIRK_CTRL_THROTTLE for fragile firmware JP Hein
2026-04-09  6:45   ` Ricardo Ribalda
     [not found]     ` <CAD5VvzAu8+Qz7hEEBzuKvO11X=YD-wrtX3_Tk77g2Cq5rZZD0Q@mail.gmail.com>
2026-04-09  7:51       ` Jeffrey Hein
2026-04-09  8:02     ` Michal Pecio
2026-04-09  8:15       ` Jeffrey Hein
2026-04-09 20:17       ` Michal Pecio
2026-04-10  0:01         ` Jeffrey Hein
2026-04-10  0:24           ` Jeffrey Hein
2026-04-10  4:47             ` Michal Pecio
2026-04-10 21:48         ` Mathias Nyman [this message]
2026-04-10 23:06           ` Jeffrey Hein
2026-04-11 13:39           ` Michal Pecio
2026-03-31  0:38 ` [PATCH v5 3/3] media: uvcvideo: add quirks for Razer Kiyo Pro webcam JP Hein
2026-04-09  6:49   ` Ricardo Ribalda
2026-04-09  7:38     ` Jeffrey Hein

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=c4275422-a9b4-4519-95f9-1163a7912709@linux.intel.com \
    --to=mathias.nyman@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hansg@kernel.org \
    --cc=jp@jphein.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=michal.pecio@gmail.com \
    --cc=ribalda@chromium.org \
    --cc=stable@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    /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