Skip to content

Commit

Permalink
EHCI : Fix a regression in the ISO scheduler
Browse files Browse the repository at this point in the history
Fix a regression that was introduced by commit
811c926 (USB: EHCI: fix HUB TT scheduling
issue with iso transfer).

We detect an error if next == start, but this means uframe 0 can't be allocated
anymore for iso transfer...

Reported-by: Sander Eikelenboom <linux@eikelenboom.it>
Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Matthieu CASTET authored and Greg Kroah-Hartman committed Nov 29, 2011
1 parent df711fc commit e342090
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions drivers/usb/host/ehci-sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -1475,6 +1475,7 @@ iso_stream_schedule (
* jump until after the queue is primed.
*/
else {
int done = 0;
start = SCHEDULE_SLOP + (now & ~0x07);

/* NOTE: assumes URB_ISO_ASAP, to limit complexity/bugs */
Expand All @@ -1492,18 +1493,18 @@ iso_stream_schedule (
if (stream->highspeed) {
if (itd_slot_ok(ehci, mod, start,
stream->usecs, period))
break;
done = 1;
} else {
if ((start % 8) >= 6)
continue;
if (sitd_slot_ok(ehci, mod, stream,
start, sched, period))
break;
done = 1;
}
} while (start > next);
} while (start > next && !done);

/* no room in the schedule */
if (start == next) {
if (!done) {
ehci_dbg(ehci, "iso resched full %p (now %d max %d)\n",
urb, now, now + mod);
status = -ENOSPC;
Expand Down

0 comments on commit e342090

Please sign in to comment.