Re: Disabling interrupts during IRQ in ohci-hcd

2007-12-06 Thread Alan Stern
On Thu, 6 Dec 2007, Pete Zaitcev wrote: > On Wed, 5 Dec 2007 17:31:20 -0500 (EST), Alan Stern <[EMAIL PROTECTED]> wrote: > > > [...] In fact every HCD _must_ keep interrupts disabled > > while doing most of its IRQ processing. This is because an interrupt > > could cause some random driver to

Re: Disabling interrupts during IRQ in ohci-hcd

2007-12-06 Thread Pete Zaitcev
On Wed, 5 Dec 2007 17:31:20 -0500 (EST), Alan Stern <[EMAIL PROTECTED]> wrote: > [...] In fact every HCD _must_ keep interrupts disabled > while doing most of its IRQ processing. This is because an interrupt > could cause some random driver to submit an URB -- and URB submission > can't be don

Re: Disabling interrupts during IRQ in ohci-hcd

2007-12-06 Thread David Brownell
On Wednesday 05 December 2007, Alan Stern wrote: > On Wed, 5 Dec 2007, David Brownell wrote: > > > On Wednesday 05 December 2007, Alan Stern wrote: > > > But it will be easy enough to add IRQF_DISABLED in.  Only a few drivers > > > omit it. > > > > I forgot that the flags are passed in to usb_ad

Re: Disabling interrupts during IRQ in ohci-hcd

2007-12-05 Thread Alan Stern
On Wed, 5 Dec 2007, Pete Zaitcev wrote: > On Wed, 5 Dec 2007 16:35:26 -0500 (EST), Alan Stern <[EMAIL PROTECTED]> wrote: > > > Host controller IRQs are supposed to be serviced with interrupts > > disabled. This patch (as1025) adds an IRQF_DISABLED flag to all the > > controller drivers that lack

Re: Disabling interrupts during IRQ in ohci-hcd

2007-12-05 Thread Alan Stern
On Wed, 5 Dec 2007, Pete Zaitcev wrote: > On Wed, 5 Dec 2007 10:15:44 -0500 (EST), Alan Stern <[EMAIL PROTECTED]> wrote: > > > 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

Re: Disabling interrupts during IRQ in ohci-hcd

2007-12-05 Thread Pete Zaitcev
On Wed, 5 Dec 2007 16:35:26 -0500 (EST), Alan Stern <[EMAIL PROTECTED]> wrote: > Host controller IRQs are supposed to be serviced with interrupts > disabled. This patch (as1025) adds an IRQF_DISABLED flag to all the > controller drivers that lack it. OK, if you prefer to use a crew-fired weapon

Re: Disabling interrupts during IRQ in ohci-hcd

2007-12-05 Thread Pete Zaitcev
On Wed, 5 Dec 2007 10:15:44 -0500 (EST), Alan Stern <[EMAIL PROTECTED]> wrote: > 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 becaus

Re: Disabling interrupts during IRQ in ohci-hcd

2007-12-05 Thread Alan Stern
On Wed, 5 Dec 2007, David Brownell wrote: > On Wednesday 05 December 2007, Alan Stern wrote: > > But it will be easy enough to add IRQF_DISABLED in.  Only a few drivers > > omit it. > > I forgot that the flags are passed in to usb_add_hcd()... if we > go that route, the drivers that don't pass i

Re: Disabling interrupts during IRQ in ohci-hcd

2007-12-05 Thread David Brownell
On Wednesday 05 December 2007, Alan Stern wrote: > But it will be easy enough to add IRQF_DISABLED in.  Only a few drivers > omit it. I forgot that the flags are passed in to usb_add_hcd()... if we go that route, the drivers that don't pass it should be updated and so should hcd-pci.c; that seems

Re: Disabling interrupts during IRQ in ohci-hcd

2007-12-05 Thread Alan Stern
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

Re: Disabling interrupts during IRQ in ohci-hcd

2007-12-05 Thread David Brownell
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 interru