Commit f956e7cd authored by david-b@pacbell.net's avatar david-b@pacbell.net Committed by Greg Kroah-Hartman

[PATCH] USB: tweak highspeed timing calculations

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: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 3b4d7f79
...@@ -339,11 +339,11 @@ extern int usb_check_bandwidth (struct usb_device *dev, struct urb *urb); ...@@ -339,11 +339,11 @@ extern int usb_check_bandwidth (struct usb_device *dev, struct urb *urb);
* to preallocate bandwidth) * to preallocate bandwidth)
*/ */
#define USB2_HOST_DELAY 5 /* nsec, guess */ #define USB2_HOST_DELAY 5 /* nsec, guess */
#define HS_NSECS(bytes) ( ((55 * 8 * 2083)/1000) \ #define HS_NSECS(bytes) ( ((55 * 8 * 2083) \
+ ((2083UL * (3167 + BitTime (bytes)))/1000) \ + (2083UL * (3 + BitTime(bytes))))/1000 \
+ USB2_HOST_DELAY) + USB2_HOST_DELAY)
#define HS_NSECS_ISO(bytes) ( ((38 * 8 * 2083)/1000) \ #define HS_NSECS_ISO(bytes) ( ((38 * 8 * 2083) \
+ ((2083UL * (3167 + BitTime (bytes)))/1000) \ + (2083UL * (3 + BitTime(bytes))))/1000 \
+ USB2_HOST_DELAY) + USB2_HOST_DELAY)
#define HS_USECS(bytes) NS_TO_US (HS_NSECS(bytes)) #define HS_USECS(bytes) NS_TO_US (HS_NSECS(bytes))
#define HS_USECS_ISO(bytes) NS_TO_US (HS_NSECS_ISO(bytes)) #define HS_USECS_ISO(bytes) NS_TO_US (HS_NSECS_ISO(bytes))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment