diff options
author | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2009-10-27 13:54:49 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-12-11 14:55:17 -0500 |
commit | d7e055f1975cac560427c924d2bff4b5d41fe442 (patch) | |
tree | ce59cb74b4479ef9f1659899d4e5c560faac0eaf /drivers/usb/host/ehci-sched.c | |
parent | 3c67d899cde32099bfc484f6ccc9b90c2e0c9fc8 (diff) |
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>
Diffstat (limited to 'drivers/usb/host/ehci-sched.c')
-rw-r--r-- | drivers/usb/host/ehci-sched.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c index a5535b5e3fe2..84079ebbe656 100644 --- a/drivers/usb/host/ehci-sched.c +++ b/drivers/usb/host/ehci-sched.c | |||
@@ -1385,7 +1385,7 @@ sitd_slot_ok ( | |||
1385 | * given EHCI_TUNE_FLS and the slop). Or, write a smarter scheduler! | 1385 | * given EHCI_TUNE_FLS and the slop). Or, write a smarter scheduler! |
1386 | */ | 1386 | */ |
1387 | 1387 | ||
1388 | #define SCHEDULE_SLOP 10 /* frames */ | 1388 | #define SCHEDULE_SLOP 80 /* microframes */ |
1389 | 1389 | ||
1390 | static int | 1390 | static int |
1391 | iso_stream_schedule ( | 1391 | iso_stream_schedule ( |
@@ -1399,7 +1399,7 @@ iso_stream_schedule ( | |||
1399 | unsigned mod = ehci->periodic_size << 3; | 1399 | unsigned mod = ehci->periodic_size << 3; |
1400 | struct ehci_iso_sched *sched = urb->hcpriv; | 1400 | struct ehci_iso_sched *sched = urb->hcpriv; |
1401 | 1401 | ||
1402 | if (sched->span > (mod - 8 * SCHEDULE_SLOP)) { | 1402 | if (sched->span > (mod - SCHEDULE_SLOP)) { |
1403 | ehci_dbg (ehci, "iso request %p too long\n", urb); | 1403 | ehci_dbg (ehci, "iso request %p too long\n", urb); |
1404 | status = -EFBIG; | 1404 | status = -EFBIG; |
1405 | goto fail; | 1405 | goto fail; |
@@ -1432,7 +1432,7 @@ iso_stream_schedule ( | |||
1432 | start += mod; | 1432 | start += mod; |
1433 | 1433 | ||
1434 | /* Fell behind (by up to twice the slop amount)? */ | 1434 | /* Fell behind (by up to twice the slop amount)? */ |
1435 | if (start >= max - 2 * 8 * SCHEDULE_SLOP) | 1435 | if (start >= max - 2 * SCHEDULE_SLOP) |
1436 | start += period * DIV_ROUND_UP( | 1436 | start += period * DIV_ROUND_UP( |
1437 | max - start, period) - mod; | 1437 | max - start, period) - mod; |
1438 | 1438 | ||
@@ -1451,7 +1451,7 @@ iso_stream_schedule ( | |||
1451 | * can also help high bandwidth if the dma and irq loads don't | 1451 | * can also help high bandwidth if the dma and irq loads don't |
1452 | * jump until after the queue is primed. | 1452 | * jump until after the queue is primed. |
1453 | */ | 1453 | */ |
1454 | start = SCHEDULE_SLOP * 8 + (now & ~0x07); | 1454 | start = SCHEDULE_SLOP + (now & ~0x07); |
1455 | start %= mod; | 1455 | start %= mod; |
1456 | stream->next_uframe = start; | 1456 | stream->next_uframe = start; |
1457 | 1457 | ||