On Mon, 14 Jun 2004, Nicolas DET wrote:

> 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.

That's very interesting and looks like it might be an important change.  
Can you post your patch to the mailing list?

> --------------------
> 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).

I don't think this will make a large difference.  When the interrupt
handler is running, of course all devices on the same interrupt line will
be unable to interrupt.  The places where the driver disables interrupts
outside of the handler usually execute rapidly, so it doesn't matter if
other devices and interrupts are blocked.

By the way, what is start_interrupt?

Alan Stern



-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to