Hello !
I'm Nicolas DET. And I've a patch for the Linux 2.6.6 UHCI driver.
Some users complain that our computers (Pegasos II http://www.pegasosppc.com/) are instable (systems hangs) when stressing the USB (we use a VIA-8231 SouthBridge) on Linux 2.6.x (2.4.x is fine).
Then we started some investigations (like Mulder !) After some debugging, we found a bug inside the UHCI driver (drivers/usb/host/uhci-hcd.* from Linux 2.6.6). The problem is the hardware part and the software part of the "qh" structure may reside in the same cache line or be in the "target" of a burst-write. Then as a result, if for some reason the the USB chip decide do burst write to that descriptor it can likely overwrite some on the software part structure, and then we lead to problems.
The patch (for 2.6.6) includes fix that problem by taking care to align the hardware part and the software part. This driver survived well to a 24h test (non stop filesystem check on a full 64Mb USB key) whereas normal kernel crash in 0 min to 30 min if you are lucky. We also tested 2 keys in the same time during several hours.
-------------------- Also, we replace spin_lock_irqxxx/spin_unlock_irq by spin_lock/unlock (for SMP/PREEMPT kernel) + stop/start_interrupt. stop/start_interrupt takes care of the UHCI chip interrupts, and only them. This way, we do not disable the whole interrupt line (other devices which are on the same interrupt would have no more interrupt too).
It's likely that the same problem appears in the ehci and ohci, but OHCI/FireWire looks fine.
That's all folks. Bye
uhci-hcd.patched_2.6.6.tar.bz2
Description: application/bzip
