[EMAIL PROTECTED] wrote:
> >     but it got into an
> > infinite loop as soon as I turn off the UA-1000, repeatedly outputting
> > these four lines:
> >
> > ehci_hcd 0000:00:03.3: devpath 5 ep3in 3strikes
> > ALSA sound/usb/usbmidi.c:176: urb status -71
> > usb 3-5: unlink qh0-00ff/c91dc100 start 0 [17/0 us]
> > usb 3-5: link qh0-00ff/c91dc100 start 0 [17/0 us]
>
> ... see below
>
> > Out of curiosity, I tried the following change, to treat -71 (-EPROTO)
> > as a terminal error in sound/usb/usbmidi.c, and I can now turn the
> > UA-1000 off and on to my heart's content.
> >
> > --- sound/usb/usbmidi.c     2005-08-01 11:25:06.000000000 +0100
> > +++ sound/usb/usbmidi.orig.c        2005-07-29 09:52:23.000000000 +0100
> > @@ -171,8 +171,7 @@ static int snd_usbmidi_urb_error(int sta
> >             return status; /* killed */
> >     if (status == -EILSEQ ||
> >         status == -ECONNRESET ||
> > -       status == -ETIMEDOUT ||
> > -       status == -EPROTO)
> > +       status == -ETIMEDOUT)
> >             return -ENODEV; /* device removed/shutdown */
> >     snd_printk(KERN_ERR "urb status %d\n", status);
> >     return 0; /* continue */
> >
> >
> > I have no idea whether this is the right thing to do: I expect it's
> > almost certainly not...

Well, it now handles this error consistent with similar errors from
other host controllers.  But that handling certainly wasn't the right
thing to do in the first place ...

> The different controllers have different ways of reporting the disconnect
> faults.  In the case of EHCI, EPROTO is indeed one of the faults that will
> sometimes indicate "device disconnected but khubd hasn't reported it yet".
> In other cases it will indicate a temporary hardware glitch.

And I already got a complaint that the driver aborts reading when
there is a real error (e.g., CRC error due to noise).

> See drivers/usb/net/usbnet.c in rx_complete() for one way to cope with
> those problems.  EPROTO is used there as a hint to throttle down resubmits.

Yup.  I'm adding similar code to the ALSA CVS now ...


Regards,
Clemens



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
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