On Fri, 11 May 2007, Oliver Neukum wrote:

> You are asking drivers to do something what some of them cannot do
> in principle. To restore state from scratch you need to know the state
> the device was in. Many drivers cannot know that.
>  
> > Now perhaps you would like to add a subroutine to the core, which a driver 
> > could call to request that it be unbound.  This could be done, although to 
> > be safe you'd probably want the actual unbind to occur in a different 
> > process context.  But I doubt that such a routine would get used.  So 
> > far nobody seems to have needed it.
> 
> On the contrary. This propblem usually occurs during probe() where it is
> handled exactly this way. You return an error.

The situations aren't parallel.  During probe() the driver is supposed to 
test the device to make sure it really can manage it.  Hence it makes 
sense to return an error.  But post_reset() informs the driver that the 
device has finished being reset.  The driver isn't asked to do anything, 
so it shouldn't return anything.

If you wish, I will write a usb_rebind_interface() routine -- provided you
can give an example of a driver (other than usb-skeleton) which will use
it!

Alan Stern


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to