Re: [linux-usb-devel] ehci calling put_device from irq handler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 18, 2006 at 04:54:04PM -0500, Alan Stern wrote:
> On Wed, 18 Jan 2006, Greg KH wrote:
> 
> > We can not call put_device() from irq context :(
> > 
> > I added a "might_sleep()" to the driver core and get the following from
> > the ehci driver.  Any thoughts?
> 
> In principle the put_device and corresponding get_device calls aren't
> needed.  We don't release a usb_device structure until after disabling all
> its endpoints, and disabling an endpoint will wait until all the URBs for
> that endpoint have completed.  So there's no reason to keep a reference to
> the device structure for each URB.
> 
> I see that uhci-hcd is guilty of the same thing (reference acquired for 
> each QH, released while holding a spinlock).  Probably each of the 
> host controller drivers is.

Great, care to make up a patch to fix this?

:)

thanks,

greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux