On Wed, 5 Dec 2007, David Brownell wrote: > On Wednesday 05 December 2007, Alan Stern wrote: > > > > In regard to: > > > > http://bugzilla.kernel.org/show_bug.cgi?id=9335 > > > > The problem appears to be that ohci-hcd (and also ehci-hcd) calls > > spin_lock() in its IRQ handler instead of spin_lock_irqsave(). A > > deadlock occurs because interrupts are not disabled while the handler > > runs. > > > > The patch attached to comment #11 changes those calls. Do you agree > > this is the right way to solve the problem? > > Of all the HCDs in drivers/usb/host, only uhci uses the irqsave/restore > variant. That's because the IRQ handlers were supposed to be registered > in the "leave IRQs disabled" (IRQF_DISABLED) mode. > > Updating usb_add_hcd to use IRQF_DISABLED would restore that original > assumption. I'm not sure when that flag (or its predecessor) got lost, > but that change is surely the root cause of these problems. > > Do you recall why/when that flag got dropped?
I don't; it must have happened before I started working on usbcore. The earliest kernel I have easy access to is 2.5.4-pre3 from the history.git repository at kernel.org. Even then usb_hcd_pci_probe() called request_irq() with only the SA_SHIRQ flag. But it will be easy enough to add IRQF_DISABLED in. Only a few drivers omit it. Alan Stern - To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html