From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: Seth Bollinger <seth.boll@gmail.com>
Cc: Alan Stern <stern@rowland.harvard.edu>,
linux-usb@vger.kernel.org, sethb@digi.com
Subject: Re: HC died
Date: Mon, 27 Feb 2023 15:07:35 +0200 [thread overview]
Message-ID: <d86ca3b6-6d02-6312-6e45-4ef954ff36f6@linux.intel.com> (raw)
In-Reply-To: <CA+JN8xPjqCaHLvh5v9y3pFC0DxNWjBj-3jF0DJ=B1YSddvYGNg@mail.gmail.com>
On 24.2.2023 15.16, Seth Bollinger wrote:
>> xhci driver does exactly this, but fails to stop the command ring while
>> trying to abort the command TRB.
>>
>> Does increasing the timeout for stopping command ring help?
>>
>> diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
>> index f5b0e1ce22af..6cecbca34cca 100644
>> --- a/drivers/usb/host/xhci-ring.c
>> +++ b/drivers/usb/host/xhci-ring.c
>> @@ -397,7 +397,7 @@ static int xhci_abort_cmd_ring(struct xhci_hcd *xhci, unsigned long flags)
>> * and try to recover a -ETIMEDOUT with a host controller reset.
>> */
>> ret = xhci_handshake(&xhci->op_regs->cmd_ring,
>> - CMD_RING_RUNNING, 0, 5 * 1000 * 1000);
>> + CMD_RING_RUNNING, 0, 10 * 1000 * 1000);
>> if (ret < 0) {
>> xhci_err(xhci, "Abort failed to stop command ring: %d\n", ret);
>> xhci_halt(xhci);
>
> Well, for us it doesn't really help as it still ends the life of the
> HC, but it doesn't solve the issue either (you can see the 10 second
> timeout here).
Ok, thanks, seems that aborting the ring does not work either.
When you earlier bumped the command ring timeout did you notice if
transfer TRBs for other devices were completing normally while waiting
for the address device command TRB to complete?
If so then it could make sense to just increase the XHCI_CMD_DEFAULT_TIMEOUT
for the address device commands to 10 seconds
This can probably be quickly tested by moving a USB mouse while triggering the
address device timeout.
Thanks
Mathias
next prev parent reply other threads:[~2023-02-27 13:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-17 14:21 HC died Seth Bollinger
2023-02-21 16:26 ` Mathias Nyman
2023-02-23 15:31 ` Seth Bollinger
2023-02-23 15:48 ` Alan Stern
2023-02-23 16:05 ` Seth Bollinger
2023-02-24 12:24 ` Mathias Nyman
2023-02-24 13:16 ` Seth Bollinger
2023-02-27 13:07 ` Mathias Nyman [this message]
2023-02-28 14:27 ` Seth Bollinger
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=d86ca3b6-6d02-6312-6e45-4ef954ff36f6@linux.intel.com \
--to=mathias.nyman@linux.intel.com \
--cc=linux-usb@vger.kernel.org \
--cc=seth.boll@gmail.com \
--cc=sethb@digi.com \
--cc=stern@rowland.harvard.edu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.