[Bug 88746] Re: ehci_hcd module causes I/O errors in USB 2.0 devices

Toby Dickenson toby at tarind.com
Sat Aug 30 10:06:37 UTC 2008


I previously reported that USB devices were not working on my nforce2
system when connected via hub after a dapper to hardy upgrade. I had
tried the suggested workarounds here and nothing helped *except*
blacklisting ehci_hcd, So Ive been living with usb 1 speeds for a month
:-( But now I have a fix...

Robert North has describes two implementations of the autosuspend
workaround in this bug report. Firstly at
https://bugs.launchpad.net/ubuntu/hardy/+source/linux/+bug/88746/comments/188
he suggests setting /sys/module/usbcore/parameters/autosuspend to -1 and
reloading ehci-hcd. This is what I tested, and it did not help. After
further debugging I independantly found a working solution which is
identical to his second suggestion at
https://bugs.launchpad.net/ubuntu/+source/linux-
source-2.6.20/+bug/88746/comments/209. This involves including the
setting in modprobe.d and rebooting.

The first solution was insufficient in my case because the value in
/sys/module/usbcore/parameters/autosuspend is a default which is applied
to newly detected devices, but reloading echi-hcd was insufficent to
force the redetection of all my usb devices. A transcript of the first
workaround:

root at dumpet:~# rmmod ehci_hcd
root at dumpet:~# echo -1>/sys/module/usbcore/parameters/autosuspend
root at dumpet:~# cat /sys/module/usbcore/parameters/autosuspend
-1
root at dumpet:~# modprobe ehci_hcd
root at dumpet:~# cat /sys/module/usbcore/parameters/autosuspend
-1
root at dumpet:~# find /sys/ -name "autosuspend"
/sys/devices/pci0000:00/0000:00:02.0/usb1/power/autosuspend
/sys/devices/pci0000:00/0000:00:02.1/usb2/power/autosuspend
/sys/devices/pci0000:00/0000:00:02.2/usb3/power/autosuspend
/sys/devices/pci0000:00/0000:00:02.2/usb3/3-2/power/autosuspend
/sys/module/usbcore/parameters/autosuspend
root at dumpet:~# cat `find /sys/ -name "autosuspend"`
2
2
-1
-1
-1

Two devices were left using autosuspend. I can patch them manually to
get a working system:

root at dumpet:~# echo -1 > /sys/devices/pci0000:00/0000:00:02.0/usb1/power/autosuspend
root at dumpet:~# echo -1 > /sys/devices/pci0000:00/0000:00:02.1/usb2/power/autosuspend
root at dumpet:~# cat `find /sys/ -name "autosuspend"`
-1
-1
-1
-1
-1

Setting it in modprobe.d is much better because the option will be set sufficiently early that no devices ever have autosuspend turned on. That link again:
https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.20/+bug/88746/comments/209

Robert described that second workaround as "to apply the workaround
permanently", but it is obviously deeper than that.


I guess the default 2 second timeout on autosuspend may explain the various posts which say it _sometimes_ works.... I works if the device is inserted within 2 seconds of other usb activity.

-- 
ehci_hcd module causes I/O errors in USB 2.0 devices
https://bugs.launchpad.net/bugs/88746
You received this bug notification because you are a member of Kernel
Bugs, which is subscribed to Linux.




More information about the kernel-bugs mailing list