mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: Paul Menzel <pmenzel@molgen.mpg.de>,
	Mathias Nyman <mathias.nyman@intel.com>,
	Michal Pecio <michal.pecio@gmail.com>
Cc: 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: Fri, 4 Apr 2025 17:26:40 +0300	[thread overview]
Message-ID: <b356f743-44b5-4f48-a289-fae0afe106ff@linux.intel.com> (raw)
In-Reply-To: <c279bd85-3069-4841-b1be-20507ac9f2d7@molgen.mpg.de>

On 3.4.2025 21.02, Paul Menzel wrote:
> Dear Linux folks,
> 
> 
> Just a heads-up, that connecting an LMP USB-C mini Dock [1] to the Intel Kaby Lake Dell XPS 13 9360 with
> 
>      00:14.0 USB controller [0c03]: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller [8086:9d2f] (rev 21)
> 
> resulted in Linux 6.14.0-12966-ga2cc6ff5ec8f logging the warning and trace below.
> 
> ```
> [   74.898485] usb 4-1.4: reset SuperSpeed USB device number 5 using xhci_hcd
> [   74.916241] sd 0:0:0:0: [sda] Media removed, stopped polling
> [   74.916634] sd 0:0:0:0: [sda] Attached SCSI removable disk
> [   98.803081] PM: suspend entry (deep)
> [   98.813999] Filesystems sync: 0.010 seconds
> [   98.819226] Freezing user space processes
> [  105.534176] xhci_hcd 0000:39:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
> [  105.606437] usb 4-1.4: reset SuperSpeed USB device number 5 using xhci_hcd
> [  118.822270] Freezing user space processes failed after 20.003 seconds (2 tasks refusing to freeze, wq_busy=0):

Thanks for the report.

Looks like it's triggered during system suspend.

"The Set TR Deq" command that fails here is queued when
- endpoint stops to remove cancelled transfers.
- endpoint resets to clear STALL or other halt due to transfer error.
- canceling a transfer while endpoint is mid stall or tt clearing.

Looks like there are at least some gaps in verifying endpoint state in endpoint
reset handler  before queuing the "Set TR Deq" command,
this could be a possible reason.

If this case could be reproduces with xhci dynamic debug enabled it would help
narrowing down the real cause.

echo 'module xhci_hcd =p' >/sys/kernel/debug/dynamic_debug/control

Thanks
Mathias

  reply	other threads:[~2025-04-04 14:25 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-03 18:02 Paul Menzel
2025-04-04 14:26 ` Mathias Nyman [this message]
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
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=b356f743-44b5-4f48-a289-fae0afe106ff@linux.intel.com \
    --to=mathias.nyman@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    --cc=michal.pecio@gmail.com \
    --cc=pmenzel@molgen.mpg.de \
    /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

all inboxes | Powered by JetHome®