On Thu, Dec 20, 2007 at 06:43:23PM +0100, Oliver Neukum wrote:
> Am Donnerstag, 20. Dezember 2007 17:37:49 schrieb Greg KH:
> > On Thu, Dec 20, 2007 at 10:32:50AM -0500, Alan Stern wrote:
> > > On Thu, 20 Dec 2007, Oliver Neukum wrote:
> > > 
> > > > Hi,
> > > > 
> > > > the mos7720 driver sends two commands to the device whenever it is
> > > > closed. It does so unconditionally even if the device has been 
> > > > disconnected.
> > > > It seems to me that this is wrong. Making sure that this does not happen
> > > > for disconnected devices takes a bit of infrastructure in the generic 
> > > > part.
> > > > However I am not sure whether this interfeeres with hanging up the tty.
> > > > What do you think?
> > > 
> > > There's nothing wrong with trying to send those commands if the device 
> > > really is disconnected.  The attempts will fail quickly.
> > > 
> > > The problem arises when the device is still connected but the driver 
> > > has been unbound.  That is illegal; a driver is never supposed to 
> > > access a device once its unbind method has returned.
> > > 
> > > Do other serial drivers suffer from a similar problem?
> > 
> > The io_edgeport-like devices all want to send a "flush" type command
> > when they are closed, and it doesn't look like they check for disconnect
> > either :(
> 
> From a more general angle, perhaps what we provide with usb_kill_urb()
> is not ideally suited to combat this problem. What about a construction like
> this:

That's nice, but it will not solve the issue with devices like the
io-edgeport, which sends a new control message to the device from what I
remember.  Or it will not work for any device that creates new urbs for
every message, a model drivers are moving more toward over time...

thanks,

greg k-h
-
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

Reply via email to