Clemens Ladisch <[EMAIL PROTECTED]> wrote: > > [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 ... >
OK, so this is yet another bug whose plot I have lost. Did we fix it? If not, and if we're not hot on its trail could I ask Colin to raise a bugzilla.kernel.org entry for this so we can keep tabs on it? Thanks. ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel