public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Resetting dead USB controllers automatically?
@ 2019-03-12 14:20 Ondrej Zary
  2019-03-12 19:46 ` Alan Stern
  0 siblings, 1 reply; 2+ messages in thread
From: Ondrej Zary @ 2019-03-12 14:20 UTC (permalink / raw)
  To: linux-usb; +Cc: linux-kernel

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-03-12 19:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-12 14:20 Resetting dead USB controllers automatically? Ondrej Zary
2019-03-12 19:46 ` Alan Stern

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox