Re: [RFC/PATCH] USB reset on atomic context

Alan Stern <stern-nwvwT67g6+6dFdvTe/[email protected]> Wed, 13 Aug 2008 15:24:26 -0400 (EDT)
Newsgroups gmane.linux.usb.general,gmane.linux.usb.devel
Message-ID <[email protected]>
On Wed, 13 Aug 2008, Inaky Perez-Gonzalez wrote:

> I don't see we are gaining anything from this--it was my first implementation
> try though. However, resets are device-wide. It doesn't matter who is resetting
> the device, an interface driver or a device-wide driver, the whole thing is 
> going down. This is how it is now when you call usb_reset_device().
> 
> So if an interface driver calls usb_*_reset_device(), the rest of the intefaces
> will have to suck it up, because they are going to be reset. We can't do anything
> about it (other than hooking up the pre calls). 

I think Oliver is concerned about this possibility (which can occur 
even for devices having only one interface):

	A driver binds to an interface.

	The driver queues a delayed-reset request.

	Before the reset is carried out, the driver gets unbound from 
	the interface.

	Another driver binds to that interface, or usbfs claims it.

	The reset finally occurs, messing up the new driver.

If the delayed-reset request was stored in the usb_interface structure
then the core would know to cancel it when the interface was unbound.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html