diff options
Diffstat (limited to 'drivers/usb/host/ehci-sched.c')
-rw-r--r-- | drivers/usb/host/ehci-sched.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c index 56a32033adb3..a60679cbbf85 100644 --- a/drivers/usb/host/ehci-sched.c +++ b/drivers/usb/host/ehci-sched.c | |||
@@ -1475,6 +1475,7 @@ iso_stream_schedule ( | |||
1475 | * jump until after the queue is primed. | 1475 | * jump until after the queue is primed. |
1476 | */ | 1476 | */ |
1477 | else { | 1477 | else { |
1478 | int done = 0; | ||
1478 | start = SCHEDULE_SLOP + (now & ~0x07); | 1479 | start = SCHEDULE_SLOP + (now & ~0x07); |
1479 | 1480 | ||
1480 | /* NOTE: assumes URB_ISO_ASAP, to limit complexity/bugs */ | 1481 | /* NOTE: assumes URB_ISO_ASAP, to limit complexity/bugs */ |
@@ -1492,18 +1493,18 @@ iso_stream_schedule ( | |||
1492 | if (stream->highspeed) { | 1493 | if (stream->highspeed) { |
1493 | if (itd_slot_ok(ehci, mod, start, | 1494 | if (itd_slot_ok(ehci, mod, start, |
1494 | stream->usecs, period)) | 1495 | stream->usecs, period)) |
1495 | break; | 1496 | done = 1; |
1496 | } else { | 1497 | } else { |
1497 | if ((start % 8) >= 6) | 1498 | if ((start % 8) >= 6) |
1498 | continue; | 1499 | continue; |
1499 | if (sitd_slot_ok(ehci, mod, stream, | 1500 | if (sitd_slot_ok(ehci, mod, stream, |
1500 | start, sched, period)) | 1501 | start, sched, period)) |
1501 | break; | 1502 | done = 1; |
1502 | } | 1503 | } |
1503 | } while (start > next); | 1504 | } while (start > next && !done); |
1504 | 1505 | ||
1505 | /* no room in the schedule */ | 1506 | /* no room in the schedule */ |
1506 | if (start == next) { | 1507 | if (!done) { |
1507 | ehci_dbg(ehci, "iso resched full %p (now %d max %d)\n", | 1508 | ehci_dbg(ehci, "iso resched full %p (now %d max %d)\n", |
1508 | urb, now, now + mod); | 1509 | urb, now, now + mod); |
1509 | status = -ENOSPC; | 1510 | status = -ENOSPC; |