On Tuesday 26 September 2006 10:00 pm, Christopher "Monty" Montgomery wrote:
> --- a/sound/usb/usbaudio.c 2006-09-26 22:10:24.000000000 -0400
> +++ b/sound/usb/usbaudio.c 2006-09-26 22:35:43.000000000 -0400
> @@ -838,6 +838,9 @@ static int start_urbs(struct snd_usb_sub
> subs->running = 1;
> for (i = 0; i < subs->nurbs; i++) {
> err = usb_submit_urb(subs->dataurb[i].urb, GFP_ATOMIC);
> + if (err == -EL2NSYNC)
> + err = usb_submit_urb(subs->dataurb[i].urb, GFP_ATOMIC);
> +
Hmm, in the current EHCI scheduler, the place which returns EL2NSYNC is
arguably just a bug that should get fixed ... it even includes the
comment "someday, try to reschedule".
The problem scenario was, ISTR, that sometimes there would be iso URB(s)
still in that stream's queue so that the recorded start point for the
next URB (that is, scheduler state) was invalid. Why were they still in
the queue? From what I remember, it was quite likely that the transfers
in that URB were completed by the controller, but the IRQ handler had not
yet cleaned them up ... either it had not yet been called, or more often
it was currently _doing_ that cleanup, and this URB was being submitted
from the completion handler of a previous URB.
That is, in at least some of the common cases I had observed, the issue
could have been resolved by using a more precise test: "are there ITDs
that are still active?" (looking for ITD_ACTIVE/SITD_ACTIVE) rather than
the quicker-but-sometimes-wrong "are there ITDs that haven't completed".
So I guess I'm strongly inclined to NAK patch 15/15 ... although maybe
something in one of the earlier patches changed the El2NSYNC behavior.
- Dave
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel