summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-q.c
diff options
context:
space:
mode:
authorDan Streetman <ddstreet@ieee.org>2005-07-29 21:18:28 +0200
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-29 22:12:54 +0200
commit498f78e6fcf558d0dec31f5648f43426ae16433f (patch)
tree8f07affd9ffd2324e5dcfa665aed8cb68e0ef88d /drivers/usb/host/ehci-q.c
parent[PATCH] USB: fix Bug in usb-skeleton.c (diff)
downloadlinux-498f78e6fcf558d0dec31f5648f43426ae16433f.tar.xz
linux-498f78e6fcf558d0dec31f5648f43426ae16433f.zip
[PATCH] USB: fix in usb_calc_bus_time
This patch does the same swap, i.e. use the ISO macro if (isoc). Additionally, it fixes the return value - the usb_calc_bus_time function returns the time in nanoseconds (I didn't notice that before) while the HS_USECS and HS_USECS_ISO are microseconds. This fixes the function to return nanoseconds always, and adjusts ehci-q.c (the only high-speed caller of the function) to wrap the call in NS_TO_US(). Signed-off-by: Dan Streetman <ddstreet@ieee.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/usb/host/ehci-q.c')
-rw-r--r--drivers/usb/host/ehci-q.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c
index d74b2d68a50e..4f97a4ad1ed3 100644
--- a/drivers/usb/host/ehci-q.c
+++ b/drivers/usb/host/ehci-q.c
@@ -657,8 +657,8 @@ qh_make (
* For control/bulk requests, the HC or TT handles these.
*/
if (type == PIPE_INTERRUPT) {
- qh->usecs = usb_calc_bus_time (USB_SPEED_HIGH, is_input, 0,
- hb_mult (maxp) * max_packet (maxp));
+ qh->usecs = NS_TO_US (usb_calc_bus_time (USB_SPEED_HIGH, is_input, 0,
+ hb_mult (maxp) * max_packet (maxp)));
qh->start = NO_FRAME;
if (urb->dev->speed == USB_SPEED_HIGH) {