Google
  Web www.spinics.net

Re: [patch 2.6.24-rc3] usb peripheral controller driver oops avoidance

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


On Monday 19 November 2007, Alan Stern wrote:
> > --- at91.orig/drivers/usb/gadget/dummy_hcd.c	2007-11-19 12:33:33.000000000 -0800
> > +++ at91/drivers/usb/gadget/dummy_hcd.c	2007-11-19 12:36:05.000000000 -0800
> > @@ -830,6 +830,7 @@ usb_gadget_unregister_driver (struct usb
> >  	spin_unlock_irqrestore (&dum->lock, flags);
> >  
> >  	driver->unbind (&dum->gadget);
> > +	dum->gadget.dev.driver = NULL;
> >  	dum->driver = NULL;
> >  
> >  	device_release_driver (&dum->gadget.dev);
> 
> Arghh, no!  Setting dum->gadget.dev.driver to NULL will break the call 
> to device_release_driver() just below.
> 
> net2280 and dummy_hcd are different from the other device controllers 

Maybe dummy_hcd is, but net2280 doesn't do that.  In fact it
already has that dev.driver = NULL line, which is why it did
not get added.


> in that they register the gadget driver with the driver core.  Hence 
> they don't need this extra action when unregistering a gadget driver.

ISTR trying to make net2280 bind to the driver core way way
way back when, but the driver core complained about it since
it demanded that there be some (pointless singleton) bus
associated with the driver, else it'd hijack me to oopsville.

OK, I'll take the dummy_hcd bit out -- but add a comment to
highlight this unique behavior.

- Dave

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
linux-usb-devel@xxxxxxxxxxxxxxxxxxxxx
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

[Home]     [Video for Linux]     [Photo]     [Yosemite Forum]     [Yosemite Photos]    [Video Projectors]     [PDAs]     [Hacking TiVo]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Devices]     [Big List of Linux Books]     [Free Dating]

  Powered by Linux