Update the EHCI driver's ISO support: - Update comments about ITD/SITD handling: they're removed from the schedule, and processed, as soon as they finish.
- Change the ITD (high speed ISO) handling to make that true: * If the HCD is no longer running, always clean up the ITD Not doing this was a minor bug, possibly never observed. * Make it look at all microframes, not just some of them. This lets some high speed ISO transfers complete sooner. The problem addressed by that last change has needed workarounds in some drivers, such as by only submitting URBs that take up entire frames. (It's been noted by Karsten Wiese and some others.) When an URB finished mid-frame, its completion would previously have been held off until the next time the EHCI controller received an IRQ ... not at all the quality of service required by ISO! Signed-off-by: David Brownell <[EMAIL PROTECTED]> --- drivers/usb/host/ehci-sched.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) --- g26.orig/drivers/usb/host/ehci-sched.c 2007-12-30 23:03:45.000000000 -0800 +++ g26/drivers/usb/host/ehci-sched.c 2007-12-30 23:36:05.000000000 -0800 @@ -2175,9 +2175,11 @@ restart: q = q.fstn->fstn_next; break; case Q_TYPE_ITD: - /* skip itds for later in the frame */ + /* If this ITD is still active, leave it for + * later processing ... check the next entry. + */ rmb (); - for (uf = live ? uframes : 8; uf < 8; uf++) { + for (uf = 0; uf < 8 && live; uf++) { if (0 == (q.itd->hw_transaction [uf] & ITD_ACTIVE(ehci))) continue; @@ -2188,10 +2190,12 @@ restart: q = *q_p; break; } - if (uf != 8) + if (uf < 8 && live) break; - /* this one's ready ... HC won't cache the + /* Take finished ITDs out of the schedule + * and process them: recycle, maybe report + * URB completion. HC won't cache the * pointer for much longer, if at all. */ *q_p = q.itd->itd_next; @@ -2202,6 +2206,9 @@ restart: q = *q_p; break; case Q_TYPE_SITD: + /* If this ITD is still active, leave it for + * later processing ... check the next entry. + */ if ((q.sitd->hw_results & SITD_ACTIVE(ehci)) && live) { q_p = &q.sitd->sitd_next; @@ -2211,6 +2218,11 @@ restart: q = *q_p; break; } + + /* Take finished SITDs out of the schedule + * and process them: recycle, maybe report + * URB completion. + */ *q_p = q.sitd->sitd_next; *hw_p = q.sitd->hw_next; type = Q_NEXT_TYPE(ehci, q.sitd->hw_next); - To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html