From: Rik van Riel <riel@surriel.com>
To: Mathias Nyman <mathias.nyman@linux.intel.com>,
Alan Stern <stern@rowland.harvard.edu>
Cc: linux-usb <linux-usb@vger.kernel.org>,
alsa-devel@alsa-project.org,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Mathias Nyman <mathias.nyman@intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>
Subject: Re: XHCI vs PCM2903B/PCM2904 part 2
Date: Tue, 30 Jun 2020 14:52:01 -0400 [thread overview]
Message-ID: <d1afa4db34ab5c25646c4823d6de6b6c8b1caa26.camel@surriel.com> (raw)
In-Reply-To: <4a463fe0-f1af-a0f9-af2e-e36c060e8105@linux.intel.com>
[-- Attachment #1: Type: text/plain, Size: 2651 bytes --]
On Tue, 2020-06-30 at 17:27 +0300, Mathias Nyman wrote:
> On 30.6.2020 16.08, Rik van Riel wrote:
> > I misread the code, it's not a bitfield, so state 1 means an
> > endpoint marked with running state. The next urb is never getting a
> > response, though.
> >
> > However, the xhci spec says an endpoint is halted upon a babble
> > error.
>
> I was looking at the same, so according to specs this state shouldn't
> be possible.
The PCM2903B chip, and potentially the hub it is behind,
are USB2 devices, though. Does USB2 know about halted
endpoints?
> > The code right above the babble handling case adds halted into the
> > endpoint state itself. Does the code handling the babble error need
> > to do something similar to trigger cleanup elsewhere?
>
> It's a flag to prevent ringing the doorbell for a halted endpoint.
> Anyway, reset endpoint is meant to recover an endpoint in a halted
> state.
> Resetting non-halted endpoints will just lead to a context state
> error, and
> besides, isoc endpoints shouldn't halt.
>
> Anyways, I haven't got any better idea at the moment.
> You can try and see what a forced reset does with:
So close. Looks like something in the XHCI/USB stack isn't
doing the reset because something is in an unexpected state?
[ 51.706798] xhci_hcd 0000:00:14.0: WARN Set TR Deq Ptr cmd failed
due to incorrect slot or ep state.
[ 51.706802] got overflow, ep->flags = 2
[ 51.932550] usb 3-9.7.5: reset high-speed USB device number 18 using
xhci_hcd
[ 68.830396] xhci_hcd 0000:00:14.0: WARN Set TR Deq Ptr cmd failed
due to incorrect slot or ep state.
[ 68.830409] got overflow, ep->flags = 2
[ 70.077981] rfkill: input handler disabled
[ 157.992374] got overflow, ep->flags = 2
[ 157.992406] xhci_hcd 0000:00:14.0: WARN Set TR Deq Ptr cmd failed
due to incorrect slot or ep state.
> diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-
> ring.c
> index 2c255d0620b0..d79aca0df6d4 100644
> --- a/drivers/usb/host/xhci-ring.c
> +++ b/drivers/usb/host/xhci-ring.c
> @@ -1900,8 +1900,7 @@ static int
> xhci_requires_manual_halt_cleanup(struct xhci_hcd *xhci,
> * endpoint anyway. Check if a babble halted the
> * endpoint.
> */
> - if (GET_EP_CTX_STATE(ep_ctx) == EP_STATE_HALTED)
> - return 1;
> + return 1;
>
> return 0;
> }
>
> Traces also showed thet endpoint doorbell was rang after th babble
> error, so
> we know that didn't help restarting the endpoint.
>
> -Mathias
>
--
All Rights Reversed.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2020-06-30 18:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-20 11:26 XHCI vs PCM2903B/PCM2904 part 2 Rik van Riel
2020-05-20 11:41 ` Takashi Iwai
2020-05-20 13:50 ` Mathias Nyman
2020-05-20 19:53 ` Rik van Riel
2020-05-20 16:38 ` Alan Stern
2020-05-20 19:21 ` Rik van Riel
2020-05-20 20:34 ` Alan Stern
2020-05-21 3:45 ` Rik van Riel
2020-05-25 9:37 ` Mathias Nyman
2020-06-30 3:21 ` Rik van Riel
2020-06-30 3:55 ` Rik van Riel
[not found] ` <90D456E4-328F-49F7-99C4-D729E38FA04E@surriel.com>
2020-06-30 14:27 ` Mathias Nyman
2020-06-30 18:52 ` Rik van Riel [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=d1afa4db34ab5c25646c4823d6de6b6c8b1caa26.camel@surriel.com \
--to=riel@surriel.com \
--cc=alsa-devel@alsa-project.org \
--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=perex@perex.cz \
--cc=stern@rowland.harvard.edu \
--cc=tiwai@suse.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).