aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2006-01-20 16:49:10 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-03-20 17:49:55 -0500
commit469d02293d494d30dba81895cd3d34b0a3a6d51a (patch)
treea05096eed2144bcaa8918ce961d959761763c33e /drivers/usb
parentf8aeb3bb8657b207895aa10f75e63f2c48d08985 (diff)
[PATCH] USB: EHCI full speed ISO bugfixes
This patch replaces the split ISO raw_mask calculation code in the iso_stream_init() function that computed incorrect numbers of high speed transactions for both input and output transfers. In the output case, it added a superfluous start-split transaction for all maxmimum packet sizes that are a multiple of 188. In the input case, it forgot to add complete-split transactions for all microframes covered by the full speed transaction, and the additional complete-split transaction needed for the case when full speed data starts arriving near the end of a microframe. These changes don't affect the lack of full speed bandwidth, but at least it removes the MMF errors that the HC raised with some input streams. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/host/ehci-sched.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c
index ebcca9700671..88419c6823a8 100644
--- a/drivers/usb/host/ehci-sched.c
+++ b/drivers/usb/host/ehci-sched.c
@@ -707,6 +707,7 @@ iso_stream_init (
707 } else { 707 } else {
708 u32 addr; 708 u32 addr;
709 int think_time; 709 int think_time;
710 int hs_transfers;
710 711
711 addr = dev->ttport << 24; 712 addr = dev->ttport << 24;
712 if (!ehci_is_TDI(ehci) 713 if (!ehci_is_TDI(ehci)
@@ -719,6 +720,7 @@ iso_stream_init (
719 think_time = dev->tt ? dev->tt->think_time : 0; 720 think_time = dev->tt ? dev->tt->think_time : 0;
720 stream->tt_usecs = NS_TO_US (think_time + usb_calc_bus_time ( 721 stream->tt_usecs = NS_TO_US (think_time + usb_calc_bus_time (
721 dev->speed, is_input, 1, maxp)); 722 dev->speed, is_input, 1, maxp));
723 hs_transfers = max (1u, (maxp + 187) / 188);
722 if (is_input) { 724 if (is_input) {
723 u32 tmp; 725 u32 tmp;
724 726
@@ -727,12 +729,11 @@ iso_stream_init (
727 stream->usecs = HS_USECS_ISO (1); 729 stream->usecs = HS_USECS_ISO (1);
728 stream->raw_mask = 1; 730 stream->raw_mask = 1;
729 731
730 /* pessimistic c-mask */ 732 /* c-mask as specified in USB 2.0 11.18.4 3.c */
731 tmp = usb_calc_bus_time (USB_SPEED_FULL, 1, 0, maxp) 733 tmp = (1 << (hs_transfers + 2)) - 1;
732 / (125 * 1000); 734 stream->raw_mask |= tmp << (8 + 2);
733 stream->raw_mask |= 3 << (tmp + 9);
734 } else 735 } else
735 stream->raw_mask = smask_out [maxp / 188]; 736 stream->raw_mask = smask_out [hs_transfers - 1];
736 bandwidth = stream->usecs + stream->c_usecs; 737 bandwidth = stream->usecs + stream->c_usecs;
737 bandwidth /= 1 << (interval + 2); 738 bandwidth /= 1 << (interval + 2);
738 739