mirror of
https://github.com/adulau/aha.git
synced 2024-12-30 12:46:17 +00:00
USB: ehci: Minor constant fix for SCHEDULE_SLOP.
Change the constant SCHEDULE_SLOP to be 80 microframes, instead of 10 frames. It was always multiplied by 8 to convert frames to microframes. SCHEDULE_SLOP is only used in ehci-sched.c. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Cc: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
3c67d899cd
commit
d7e055f197
1 changed files with 4 additions and 4 deletions
|
@ -1385,7 +1385,7 @@ sitd_slot_ok (
|
||||||
* given EHCI_TUNE_FLS and the slop). Or, write a smarter scheduler!
|
* given EHCI_TUNE_FLS and the slop). Or, write a smarter scheduler!
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define SCHEDULE_SLOP 10 /* frames */
|
#define SCHEDULE_SLOP 80 /* microframes */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
iso_stream_schedule (
|
iso_stream_schedule (
|
||||||
|
@ -1399,7 +1399,7 @@ iso_stream_schedule (
|
||||||
unsigned mod = ehci->periodic_size << 3;
|
unsigned mod = ehci->periodic_size << 3;
|
||||||
struct ehci_iso_sched *sched = urb->hcpriv;
|
struct ehci_iso_sched *sched = urb->hcpriv;
|
||||||
|
|
||||||
if (sched->span > (mod - 8 * SCHEDULE_SLOP)) {
|
if (sched->span > (mod - SCHEDULE_SLOP)) {
|
||||||
ehci_dbg (ehci, "iso request %p too long\n", urb);
|
ehci_dbg (ehci, "iso request %p too long\n", urb);
|
||||||
status = -EFBIG;
|
status = -EFBIG;
|
||||||
goto fail;
|
goto fail;
|
||||||
|
@ -1432,7 +1432,7 @@ iso_stream_schedule (
|
||||||
start += mod;
|
start += mod;
|
||||||
|
|
||||||
/* Fell behind (by up to twice the slop amount)? */
|
/* Fell behind (by up to twice the slop amount)? */
|
||||||
if (start >= max - 2 * 8 * SCHEDULE_SLOP)
|
if (start >= max - 2 * SCHEDULE_SLOP)
|
||||||
start += period * DIV_ROUND_UP(
|
start += period * DIV_ROUND_UP(
|
||||||
max - start, period) - mod;
|
max - start, period) - mod;
|
||||||
|
|
||||||
|
@ -1451,7 +1451,7 @@ iso_stream_schedule (
|
||||||
* can also help high bandwidth if the dma and irq loads don't
|
* can also help high bandwidth if the dma and irq loads don't
|
||||||
* jump until after the queue is primed.
|
* jump until after the queue is primed.
|
||||||
*/
|
*/
|
||||||
start = SCHEDULE_SLOP * 8 + (now & ~0x07);
|
start = SCHEDULE_SLOP + (now & ~0x07);
|
||||||
start %= mod;
|
start %= mod;
|
||||||
stream->next_uframe = start;
|
stream->next_uframe = start;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue