On Wed, 23 Mar 2005 10:58:56 -0500 (EST) Alan Stern <[EMAIL PROTECTED]> wrote:

> > However, the fact that usblp_check_status() ignores -ENODEV and returns
> > 0 (OK) to usblp_write() is not really a hit.  Imho usblp_write() should
> > get -ENODEV, release usblp->sem, drop everything and let the driver
> > clean up.
> 
> Does this patch solve the problem?

>               down (&usblp->sem);
> -             if (!usblp->present) {
> +             if (!usblp->present || usblp->writeurb->status == -ENODEV) {
>                       up (&usblp->sem);
>                       return -ENODEV;

I do not expect this to work. Although Joachim was right in overall analysis,
he never claimed that -ENODEV actually happened. In reality, a panopy of
errors can be returned in this case. A comprehensive set includes
-ESHUTDOWN (formal unplug), -EILSEQ (uhci can throw this one, I saw it),
-ENOENT, -EPERM. But not -ENODEV.

The fact that the return value from usblp_check_status is not used for
anything suggests careless janitoring, but it's not related. It must
be fixed, however.

-- Pete


-------------------------------------------------------
This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005
Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows
Embedded(r) & Windows Mobile(tm) platforms, applications & content.  Register
by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to