Linux USB
 help / color / mirror / Atom feed
From: Michal Pecio <michal.pecio@gmail.com>
To: metaphaze <gmhomeier@gmail.com>
Cc: Mathias Nyman <mathias.nyman@intel.com>, linux-usb@vger.kernel.org
Subject: Re: [BUG] xhci: ASM2142 command-abort timeout (-110) kills the host instead of resetting it
Date: Sun, 25 Oct 2026 14:25:27 +0100	[thread overview]
Message-ID: <20261025142527.70b53e9c.michal.pecio@gmail.com> (raw)
In-Reply-To: <1792881094.236072.780250.nullmailer@maynard.pixelexstasy.com>

On Sat, 24 Oct 2026 17:31:34 -0500, metaphaze wrote:
> Hello,
> 
> xhci_abort_cmd_ring() treats a command-abort handshake timeout as a dead
> host. On an ASMedia ASM2142 that timeout happens while a USB 2.0 device
> is failing enumeration, and the whole controller is marked dead.

Yes, this happens sometimes, also on my ASM3142 (same PCI ID, not sure
what the differences are), but I have never had a reproducible case.

Could you record a trace of what happens there?

# disconnect other devices from this controller
cd /sys/kernel/tracing/
echo 1 >events/xhci-hcd/xhci_queue_trb/enable
echo 1 >events/xhci-hcd/xhci_handle_event/enable
echo 1 >events/xhci-hcd/xhci_get_port_status/enable
echo 1 >events/xhci-hcd/xhci_portsc_writel/enable
echo 1 >tracing_on
# connect the device, wait for failure
cp trace /tmp/xhci-trace
# send the trace and dmesg

> The comment above the handshake already says a timeout should be
> recovered with a host controller reset rather than treated as -ENODEV.

Theoretically possible, but resetting the HC would still be somewhat
disruptive and it may be better to just prevent triggering HW bugs.
Usually this happens and then there is little urgency to implement
automatic recovery by reset.

>   A PCI function reset brings the controller back until the next
>   high-speed attach:
> 
>     echo 0000:06:00.0 > /sys/bus/pci/drivers/xhci_hcd/unbind
>     echo 1 > /sys/bus/pci/devices/0000:06:00.0/reset
>     echo 0000:06:00.0 > /sys/bus/pci/drivers/xhci_hcd/bind

Is this PCI reset necessary?

An unbind/bind cycle issues xHCI reset which normally suffices.

Regards,
Michal

      reply	other threads:[~2026-10-25 13:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-24 22:31 [BUG] xhci: ASM2142 command-abort timeout (-110) kills the host instead of resetting it metaphaze
2026-10-25 13:25 ` Michal Pecio [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=20261025142527.70b53e9c.michal.pecio@gmail.com \
    --to=michal.pecio@gmail.com \
    --cc=gmhomeier@gmail.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@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