From: Ondrej Zary <linux@zary.sk>
To: linux-usb@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: Resetting dead USB controllers automatically?
Date: Tue, 12 Mar 2019 15:20:08 +0100 [thread overview]
Message-ID: <201903121520.08430.linux@zary.sk> (raw)
Hello,
my USB controller sometimes dies when plugging a device (maybe because of static):
[11197.529334] ehci-pci 0000:00:09.2: HC died; cleaning up
[11197.529883] uhci_hcd 0000:00:09.0: host system error, PCI problems?
[11197.529893] uhci_hcd 0000:00:09.0: host controller process error, something bad happened!
[11197.530568] usb 1-1: USB disconnect, device number 7
[11197.531224] uhci_hcd 0000:00:09.0: host system error, PCI problems?
[11197.531278] uhci_hcd 0000:00:09.0: host controller process error, something bad happened!
[11197.532155] uhci_hcd 0000:00:09.0: host system error, PCI problems?
[11197.532203] uhci_hcd 0000:00:09.0: host controller process error, something bad happened!
[11197.539798] uhci_hcd 0000:00:09.0: host system error, PCI problems?
[11197.539865] uhci_hcd 0000:00:09.0: host controller process error, something bad happened!
[11197.540092] uhci_hcd 0000:00:09.0: host system error, PCI problems?
[11197.540109] uhci_hcd 0000:00:09.0: host controller process error, something bad happened!
[11197.541210] uhci_hcd 0000:00:09.0: host system error, PCI problems?
[11197.541285] uhci_hcd 0000:00:09.0: host controller process error, something bad happened!
[11197.553179] usb 1-2: USB disconnect, device number 3
[11197.554087] usb 1-4: USB disconnect, device number 4
[11197.580154] uhci_hcd 0000:00:09.0: FGR not stopped yet!
[11197.943554] uhci_hcd 0000:00:09.0: host system error, PCI problems?
[11197.943717] uhci_hcd 0000:00:09.0: host controller process error, something bad happened!
[11197.943735] uhci_hcd 0000:00:09.0: host controller halted, very bad!
[11197.943794] uhci_hcd 0000:00:09.0: HCRESET not completed yet!
[11197.943809] uhci_hcd 0000:00:09.0: HC died; cleaning up
rmmod & modprobe isn't enough to fix it. Reboot is needed to make it work again.
Or something like this:
#!/bin/sh
rmmod ehci-pci
rmmod uhci-hcd
echo 1 >"/sys/bus/pci/devices/0000:00:09.0/remove"
echo 1 >"/sys/bus/pci/devices/0000:00:09.1/remove"
echo 1 >"/sys/bus/pci/devices/0000:00:09.2/remove"
echo 1 >/sys/bus/pci/rescan
modprobe uhci-hcd
I'm not the only one affected by this problem:
http://www.google.com/search?q=%22HC+died%3B+cleaning+up%22
Maybe the uhci/ehci drivers (or the USB core?) could reset the controller automatically to improve reliability.
Looks like someone thought about this before but it was never implemented.
There's a comment in ehci_handle_controller_death() function in drivers/usb/host/ehci-timer.c:
/* Not in process context, so don't try to reset the controller */
The controller is:
00:09.0 USB controller [0c03]: VIA Technologies, Inc. VT82xx/62xx UHCI USB 1.1 Controller [1106:3038] (rev 62)
00:09.1 USB controller [0c03]: VIA Technologies, Inc. VT82xx/62xx UHCI USB 1.1 Controller [1106:3038] (rev 62)
00:09.2 USB controller [0c03]: VIA Technologies, Inc. USB 2.0 [1106:3104] (rev 65)
--
Ondrej Zary
next reply other threads:[~2019-03-12 14:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-12 14:20 Ondrej Zary [this message]
2019-03-12 19:46 ` Resetting dead USB controllers automatically? Alan Stern
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=201903121520.08430.linux@zary.sk \
--to=linux@zary.sk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/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