On Mon, 21 May 2007, Oliver Neukum wrote:

> Am Montag, 21. Mai 2007 17:15 schrieb Alan Stern:
> > On Mon, 21 May 2007, Oliver Neukum wrote:
>  
> > > How to avoid it? If the original driver fails, I see no alternative but to
> > > yield to other drivers and usbfs.
> > 
> > Well, you don't really want to yield to other drivers and usbfs.
> 
> What else do you do if you cannot "resume" ? This method needs
> to carry out IO to restore the state. Hence it may fail.
>  
> > Remember, we're talking about situations where the only problem is that
> > the device has been reset and the driver doesn't know what to do about
> 
> Who tells you that? Any IO might fail.

The original context for this discussion has been cropped...

We were talking about what to do when a driver doesn't have a
reset_resume method.  So when the core resets a device instead of
resuming it, obviously the core knows there's something wrong when it
sees the reset_resume method pointer is NULL.

> > it.  If the driver was working okay with the device before then it
> > should be kept, not replaced by some other driver which might not work
> 
> If the method fails, we know that the previous driver is not working.

No.  We are discussing what to do when the method doesn't exist, not 
what to do when it fails.  In this situation we must assume the driver 
was working fine and it simply can't cope with a device reset.

> In that case pseudo continuity cannot be preserved. Either the device
> is zombified or renumerated. Which third option exists?
> 
> [..]
> > reset_resume() methods will return void.  Normal resume methods do
> > return a status code, but we ignore it.  So we should be okay.
> 
> That is simply wrong and should not be allowed to infiltrate other
> methods.

You have raised a separate question (what to do when an interface
driver's resume method or post_reset method fails) and it should be
discussed in a separate email thread.

If you're suggesting that the post_reset and reset_resume methods
should return a status, that's okay with me.  For the time being we
will ignore that status, just as we ignore the status from a normal
resume.

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