From db@adsl-69-107-32-110.dsl.pltn13.pacbell.net Thu Aug 11 19:39:52 2005 Date: Thu, 11 Aug 2005 19:37:01 -0700 From: david-b@pacbell.net To: greg@kroah.com Subject: USB: tweak highspeed timing calculations Message-Id: <20050812023701.DB06FD9697@adsl-69-107-32-110.dsl.pltn13.pacbell.net> Use a more correct calculation for highspeed bit times. http://bugzilla.kernel.org/show_bug.cgi?id=3604 This sort if thing might start to make a difference now that the high speed periodic scheduler is more complete -- and even getting used. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman --- drivers/usb/core/hcd.h | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) --- gregkh-2.6.orig/drivers/usb/core/hcd.h 2005-08-02 13:41:29.000000000 -0700 +++ gregkh-2.6/drivers/usb/core/hcd.h 2005-08-12 14:48:32.000000000 -0700 @@ -339,11 +339,11 @@ * to preallocate bandwidth) */ #define USB2_HOST_DELAY 5 /* nsec, guess */ -#define HS_NSECS(bytes) ( ((55 * 8 * 2083)/1000) \ - + ((2083UL * (3167 + BitTime (bytes)))/1000) \ +#define HS_NSECS(bytes) ( ((55 * 8 * 2083) \ + + (2083UL * (3 + BitTime(bytes))))/1000 \ + USB2_HOST_DELAY) -#define HS_NSECS_ISO(bytes) ( ((38 * 8 * 2083)/1000) \ - + ((2083UL * (3167 + BitTime (bytes)))/1000) \ +#define HS_NSECS_ISO(bytes) ( ((38 * 8 * 2083) \ + + (2083UL * (3 + BitTime(bytes))))/1000 \ + USB2_HOST_DELAY) #define HS_USECS(bytes) NS_TO_US (HS_NSECS(bytes)) #define HS_USECS_ISO(bytes) NS_TO_US (HS_NSECS_ISO(bytes))