diff options
Diffstat (limited to 'drivers/usb/host/ehci-sched.c')
-rw-r--r-- | drivers/usb/host/ehci-sched.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c index e113fd73aeae..f9a332775c47 100644 --- a/drivers/usb/host/ehci-sched.c +++ b/drivers/usb/host/ehci-sched.c | |||
@@ -1581,6 +1581,10 @@ iso_stream_schedule ( | |||
1581 | else | 1581 | else |
1582 | next = (now + 2 + 7) & ~0x07; /* full frame cache */ | 1582 | next = (now + 2 + 7) & ~0x07; /* full frame cache */ |
1583 | 1583 | ||
1584 | /* If needed, initialize last_iso_frame so that this URB will be seen */ | ||
1585 | if (ehci->isoc_count == 0) | ||
1586 | ehci->last_iso_frame = now >> 3; | ||
1587 | |||
1584 | /* | 1588 | /* |
1585 | * Use ehci->last_iso_frame as the base. There can't be any | 1589 | * Use ehci->last_iso_frame as the base. There can't be any |
1586 | * TDs scheduled for earlier than that. | 1590 | * TDs scheduled for earlier than that. |
@@ -1600,11 +1604,11 @@ iso_stream_schedule ( | |||
1600 | */ | 1604 | */ |
1601 | now2 = (now - base) & (mod - 1); | 1605 | now2 = (now - base) & (mod - 1); |
1602 | 1606 | ||
1603 | /* Is the schedule already full? */ | 1607 | /* Is the schedule about to wrap around? */ |
1604 | if (unlikely(!empty && start < period)) { | 1608 | if (unlikely(!empty && start < period)) { |
1605 | ehci_dbg(ehci, "iso sched full %p (%u-%u < %u mod %u)\n", | 1609 | ehci_dbg(ehci, "request %p would overflow (%u-%u < %u mod %u)\n", |
1606 | urb, stream->next_uframe, base, period, mod); | 1610 | urb, stream->next_uframe, base, period, mod); |
1607 | status = -ENOSPC; | 1611 | status = -EFBIG; |
1608 | goto fail; | 1612 | goto fail; |
1609 | } | 1613 | } |
1610 | 1614 | ||
@@ -1671,10 +1675,6 @@ iso_stream_schedule ( | |||
1671 | urb->start_frame = start & (mod - 1); | 1675 | urb->start_frame = start & (mod - 1); |
1672 | if (!stream->highspeed) | 1676 | if (!stream->highspeed) |
1673 | urb->start_frame >>= 3; | 1677 | urb->start_frame >>= 3; |
1674 | |||
1675 | /* Make sure scan_isoc() sees these */ | ||
1676 | if (ehci->isoc_count == 0) | ||
1677 | ehci->last_iso_frame = now >> 3; | ||
1678 | return status; | 1678 | return status; |
1679 | 1679 | ||
1680 | fail: | 1680 | fail: |