linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Regression xhci_hcd cmd failed due to incorrect slot or ep state
@ 2019-04-07 10:32 Bernhard Gebetsberger
  2019-04-09 14:36 ` Mathias Nyman
  0 siblings, 1 reply; 2+ messages in thread
From: Bernhard Gebetsberger @ 2019-04-07 10:32 UTC (permalink / raw)
  To: linux-usb; +Cc: mathias.nyman

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)).

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Regression xhci_hcd cmd failed due to incorrect slot or ep state
  2019-04-07 10:32 Regression xhci_hcd cmd failed due to incorrect slot or ep state Bernhard Gebetsberger
@ 2019-04-09 14:36 ` Mathias Nyman
  0 siblings, 0 replies; 2+ messages in thread
From: Mathias Nyman @ 2019-04-09 14:36 UTC (permalink / raw)
  To: Bernhard Gebetsberger, linux-usb

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

   

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-04-09 14:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-07 10:32 Regression xhci_hcd cmd failed due to incorrect slot or ep state Bernhard Gebetsberger
2019-04-09 14:36 ` Mathias Nyman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).