On Thu, 5 Jun 2003, David Brownell wrote:

> Oliver Neukum wrote:
> > Am Donnerstag, 5. Juni 2003 22:16 schrieb David Brownell:
> >>In short, usb_set_configuration() now does what
> >>it's supposed to do:  it changes the device config,
> >>and all usbcore state depending on it.
> > 
> > 
> > Way cool.
> > 
> > A few points.
> > 1. We need a special function for devices that just reset
> > the current config. It seems that there are really buggy devices
> > which need this.
> 
> Yes, something like usb_reset_config(dev) call is needed.
> As well as converting code to use it, instead of the
> current calls to usb_set_configuration() in drivers.

I want to echo Oliver's sentiment; this is a great patch.

Implementing usb_reset_config(dev) will be tricky.  Since it is called
from within probe() it can't call usb_set_configuration() directly because
the sysfs lock is already held.  Somehow it needs to tell the process 
that's registering the interfaces to stop -- no point binding any more 
drivers when you're just going to change the configuration anyway -- and 
then do the set_config.

Your current scheme of unbinding the drivers before changing the 
configuration doesn't lend itself easily to invoking a callback in the 
driver once the set_config is complete.  How do you propose to let the 
driver know whether the call succeeded or failed?

Come to think of it, what use could the driver make of that information?  
If the call failed there's nothing the driver can do, and if it succeeded
the driver will be probed again anyway.

Alan Stern



-------------------------------------------------------
This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to