Linux-USB Archive on lore.kernel.org
 help / color / Atom feed
From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: Bernhard Gebetsberger <bernhard.gebetsberger@gmx.at>,
	linux-usb@vger.kernel.org
Subject: Re: Regression xhci_hcd cmd failed due to incorrect slot or ep state
Date: Tue, 9 Apr 2019 17:36:51 +0300
Message-ID: <520462de-9a7f-d3f3-2cce-e4be045cf8b2@linux.intel.com> (raw)
In-Reply-To: <0d300c86-4aaa-28d4-cb37-5bc62fa67a9a@gmx.at>

On 7.4.2019 13.32, Bernhard Gebetsberger wrote:
> When using  the kernel version 4.20 or above my usb wifi stick doesn't
> work until I reboot my system, dmesg shows this message when the issue
> occurs:
> 
> xhci_hcd 0000:15:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state
> 
> I've found that the problem is caused by this commit:
> 
> commit f8f80be501aa2f10669585c3e328fad079d8cb3a
> Author: Mathias Nyman <mathias.nyman@linux.intel.com  <mailto:mathias.nyman@linux.intel.com>>
> Date:   Thu Sep 20 19:13:37 2018 +0300
> 
>      xhci: Use soft retry to recover faster from transaction errors
> 
> It looks like it only affects wifi sticks(various models) on specific
> hardware configurations(I have this issue on my Ryzen pc, my Intel pc
> isn´t affected, but someone in the kernel bug tracker mentioned that he
> has this issue on an Intel notebook as well (only with USB 3.0 ports
> though)).

Thanks for the report.

I can see how these would be related, setting a new Transfer Ring dequeue pointer
requires the ep ring to be in Error or stopped state, otherwise you see the above message.

The soft retry patch will automatically restart a ring from stopped to running state.

But to know the details where the issue exactly is, or how we ended up there, I would need to
look at logs and traces.

Logs and traces can be taken with:

mount -t debugfs none /sys/kernel/debug
echo 'module xhci_hcd =p' >/sys/kernel/debug/dynamic_debug/control
echo 'module usbcore =p' >/sys/kernel/debug/dynamic_debug/control
echo 81920 > /sys/kernel/debug/tracing/buffer_size_kb
echo 1 > /sys/kernel/debug/tracing/events/xhci-hcd/enable

< trigger failure >

Send output of dmesg to me, and
copy /sys/kernel/debug/tracing/trace to me.

-Mathias

   

      reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-07 10:32 Bernhard Gebetsberger
2019-04-09 14:36 ` Mathias Nyman [this message]

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=520462de-9a7f-d3f3-2cce-e4be045cf8b2@linux.intel.com \
    --to=mathias.nyman@linux.intel.com \
    --cc=bernhard.gebetsberger@gmx.at \
    --cc=linux-usb@vger.kernel.org \
    /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

Linux-USB Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-usb/0 linux-usb/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-usb linux-usb/ https://lore.kernel.org/linux-usb \
		linux-usb@vger.kernel.org
	public-inbox-index linux-usb

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-usb


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git