From: "Michał Pecio" <michal.pecio@gmail.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Paul Menzel <pmenzel@molgen.mpg.de>,
Mathias Nyman <mathias.nyman@linux.intel.com>,
Mathias Nyman <mathias.nyman@intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: xhci: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
Date: Mon, 7 Apr 2025 07:49:05 +0200 [thread overview]
Message-ID: <20250407074905.2d236fb9@foxbook> (raw)
In-Reply-To: <14197657-0a0f-45a8-ac36-dd37b16a1565@rowland.harvard.edu>
On Sun, 6 Apr 2025 15:26:41 -0400, Alan Stern wrote:
> I'd guess that you're seeing the result of the
>
> usb_disable_interface(udev, intf, true);
>
> call in usb_reset_and_verify_device(). This call is made following
> the actual reset, as part of the procedure for putting everything
> back to the way it was before the reset.
Your guess is right. I added dump_stack() to those calls.
The bug is triggered by this function calling usb_disable_interface()
and usb_enable_interface() after usb_hcd_alloc_bandwidth().
These two issue endpoint_disable() and endpoint_reset() to the HCD and
xhci_hcd appears to be confused about the intent of the former, because
it clears host_ep->hcpriv, breaking all future endpoint_reset() calls.
Since 6.15, this call informs xhci_hcd that device endpoint has been
cleared and pending URBs can be started, so this isn't working now.
BTW, that's not a corner of the driver which I'm very familiar with,
but AFAIU this disable/enable sequence is pointless for xHCI if done
on freshly created endpoints. It would only wait for clearing TT to
finish (there should be none) and issue some commands to clear the
toggle/sequence state (which should be blank).
Michal
next prev parent reply other threads:[~2025-04-07 5:49 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-03 18:02 xhci: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state Paul Menzel
2025-04-04 14:26 ` Mathias Nyman
2025-04-04 14:29 ` Paul Menzel
2025-04-05 5:23 ` Paul Menzel
2025-04-05 22:23 ` Michał Pecio
2025-04-06 2:40 ` Alan Stern
2025-04-06 7:50 ` Michał Pecio
2025-04-06 15:50 ` Michał Pecio
2025-04-06 19:26 ` Alan Stern
2025-04-07 5:49 ` Michał Pecio [this message]
2025-04-07 16:11 ` Alan Stern
2025-04-08 10:18 ` [PATCH RFC RFT] usb: hcd: Add a usb_device argument to hc_driver.endpoint_reset() Michał Pecio
2025-04-08 13:55 ` Mathias Nyman
2025-04-09 10:18 ` Michał Pecio
2025-04-09 14:13 ` Alan Stern
2025-04-15 8:38 ` Michał Pecio
2025-04-07 7:15 ` xhci: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state Mathias Nyman
2025-04-05 6:43 ` Michał Pecio
2025-04-05 7:36 ` Paul Menzel
2025-04-05 9:49 ` Michał Pecio
2025-04-05 14:08 ` Paul Menzel
2025-04-05 18:13 ` Paul Menzel
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=20250407074905.2d236fb9@foxbook \
--to=michal.pecio@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@intel.com \
--cc=mathias.nyman@linux.intel.com \
--cc=pmenzel@molgen.mpg.de \
--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