On Mon, 22 Mar 2004, David Brownell wrote: > For the sake of paranoia ... shouldn't this refuse to > do anything if there are any interfaces claimed by > drivers other than usbfs?
Maybe. That's a cleanup for later on. Perhaps even worse, if there are interfaces claimed by usbfs then calling usb_set_configuration() will result in deadlock. Alan Stern > > --- 1.88/drivers/usb/core/devio.c Wed Mar 17 14:16:46 2004 > > +++ edited/drivers/usb/core/devio.c Fri Mar 19 10:41:57 2004 > > @@ -753,7 +753,11 @@ > > > > if (get_user(u, (unsigned int __user *)arg)) > > return -EFAULT; > > - return usb_set_configuration(ps->dev, u); > > + if (ps->dev->actconfig && > > + ps->dev->actconfig->desc.bConfigurationValue == u) > > + return usb_reset_configuration(ps->dev); > > + else > > + return usb_set_configuration(ps->dev, u); > > } > > > > static int proc_submiturb(struct dev_state *ps, void __user *arg) ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel