linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bernhard Gebetsberger <bernhard.gebetsberger@gmx.at>
To: Mathias Nyman <mathias.nyman@linux.intel.com>, linux-usb@vger.kernel.org
Subject: Re: Regression: USB/xhci issues on some systems with newer kernel versions
Date: Fri, 11 Oct 2019 03:55:04 +0200	[thread overview]
Message-ID: <a5217250-cbef-1713-0518-16e28e1ed1ad@gmx.at> (raw)
In-Reply-To: <485bd962-2a2d-1e15-54c6-3685fb7597a3@gmx.at>

I've just noticed that this problem also occurs when unplugging an affected device.
When unplugging the device the error
    "WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state"
gets shown, even though I don't get this error when plugging the device in.

Here is a link to the dmesg and trace logs:
https://gist.github.com/Brn9hrd7/011405276fdf7a699dcc5cb83c67d276
maybe there is something useful in there that was missing in the previous logs.

- Bernhard


Am 03.10.19 um 17:13 schrieb Bernhard Gebetsberger:
> I sent the instructions to one of the users in the bug tracker.
> Here is the download link for his logs: https://www.sendspace.com/file/413hlj
>
> - Bernhard
>
> Am 03.10.19 um 12:23 schrieb Mathias Nyman:
>> On 2.10.2019 15.28, Bernhard Gebetsberger wrote:
>>> Hi,
>>>
>>> There has been a regression in the xhci driver since kernel version 4.20, on some systems some usb devices won't work until the system gets rebooted.
>>> The error message in dmesg is "WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state", although for some reason there are some usb devices that are affected by this issue but don't throw the error message(including the device I'm using, I got the error in previous kernel versions though).
>>> It seems like this bug can also lead to system instability, one user reported in the bug tracker(https://bugzilla.kernel.org/show_bug.cgi?id=202541#c58) that he got a system freeze because of this when using kernel 5.3.1.
>>>
>> Ok, lets take a look at this.
>> Some of the symptoms vary a bit in the report, so lets focus on ones that
>> show: "WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state"
>>
>>> When looking at the responses in the bug tracker, it looks like it mostly affects Ryzen based systems with 300 series motherboards, although there are some other affected systems as well. It doesn't only affect wifi/bluetooth sticks, some users even got this issue when connecting their smartphone or their external hard drive to their PC.
>>> I have uploaded the whole dmesg file and the tracing file to transfer.sh: https://transfer.sh/zYohl/dmesg and https://transfer.sh/KNbFL/xhci-trace
>> Hmm, trying to download these just shows "Not Found"
>>
>> Could someone with a affected system enable tracing and dynamic debug on a
>> recent kernel, take logs and traces of one failing instance where the message
>> "WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state" is seen.
>>
>> 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 the issue >
>>
>> Send output of dmesg
>> Send content of /sys/kernel/debug/tracing/trace
>>
>>> The issues occur since commit f8f80be501aa2f10669585c3e328fad079d8cb3a "xhci: Use soft retry to recover faster from transaction errors". I think this commit should be reverted at least until a workaround has been found, especially since the next two kernel versions will be used by a lot of distributions(5.4 because it's a LTS kernel and 5.5 will probably be used in Ubuntu 20.04) so more users would be affected by this.
>>>
>> There some time left before 5.4 is out, lets see if we can find the root cause first.
>>
>> -Mathias
>>

  reply	other threads:[~2019-10-11  1:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-02 12:28 Regression: USB/xhci issues on some systems with newer kernel versions Bernhard Gebetsberger
2019-10-03 10:23 ` Mathias Nyman
2019-10-03 15:13   ` Bernhard Gebetsberger
2019-10-11  1:55     ` Bernhard Gebetsberger [this message]
2019-10-14 13:03     ` Mathias Nyman
2019-12-05 20:34       ` Prashant Malani
2019-12-05 22:49         ` Prashant Malani
2019-12-05 23:19         ` Bernhard Gebetsberger
2019-12-05 23:23           ` Prashant Malani
2019-12-16 13:29         ` Mathias Nyman
2020-01-04  0:58           ` Prashant Malani

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=a5217250-cbef-1713-0518-16e28e1ed1ad@gmx.at \
    --to=bernhard.gebetsberger@gmx.at \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@linux.intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).