projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
USB: EHCI: adjust error return code
[cascardo/linux.git]
/
drivers
/
usb
/
host
/
ehci-sched.c
diff --git
a/drivers/usb/host/ehci-sched.c
b/drivers/usb/host/ehci-sched.c
index
e113fd7
..
f9a3327
100644
(file)
--- a/
drivers/usb/host/ehci-sched.c
+++ b/
drivers/usb/host/ehci-sched.c
@@
-1581,6
+1581,10
@@
iso_stream_schedule (
else
next = (now + 2 + 7) & ~0x07; /* full frame cache */
else
next = (now + 2 + 7) & ~0x07; /* full frame cache */
+ /* If needed, initialize last_iso_frame so that this URB will be seen */
+ if (ehci->isoc_count == 0)
+ ehci->last_iso_frame = now >> 3;
+
/*
* Use ehci->last_iso_frame as the base. There can't be any
* TDs scheduled for earlier than that.
/*
* Use ehci->last_iso_frame as the base. There can't be any
* TDs scheduled for earlier than that.
@@
-1600,11
+1604,11
@@
iso_stream_schedule (
*/
now2 = (now - base) & (mod - 1);
*/
now2 = (now - base) & (mod - 1);
- /* Is the schedule a
lready full
? */
+ /* Is the schedule a
bout to wrap around
? */
if (unlikely(!empty && start < period)) {
if (unlikely(!empty && start < period)) {
- ehci_dbg(ehci, "
iso sched full %p
(%u-%u < %u mod %u)\n",
+ ehci_dbg(ehci, "
request %p would overflow
(%u-%u < %u mod %u)\n",
urb, stream->next_uframe, base, period, mod);
urb, stream->next_uframe, base, period, mod);
- status = -E
NOSPC
;
+ status = -E
FBIG
;
goto fail;
}
goto fail;
}
@@
-1671,10
+1675,6
@@
iso_stream_schedule (
urb->start_frame = start & (mod - 1);
if (!stream->highspeed)
urb->start_frame >>= 3;
urb->start_frame = start & (mod - 1);
if (!stream->highspeed)
urb->start_frame >>= 3;
-
- /* Make sure scan_isoc() sees these */
- if (ehci->isoc_count == 0)
- ehci->last_iso_frame = now >> 3;
return status;
fail:
return status;
fail: