summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-sched.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2013-10-11 17:28:21 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-12 01:37:46 +0200
commit2b90f01b219e390e1f1bf68dd7a2333efb3e3eff (patch)
tree77d664254c0376ea68850e86ba6c2df5aa1dabfd /drivers/usb/host/ehci-sched.c
parentUSB: EHCI: check the right uframes for CSPLIT (diff)
downloadlinux-2b90f01b219e390e1f1bf68dd7a2333efb3e3eff.tar.xz
linux-2b90f01b219e390e1f1bf68dd7a2333efb3e3eff.zip
USB: EHCI: compute full-speed bandwidth usage correctly
Although the bandwidth statistics maintained by ehci-hcd show up only in the /sys/kernel/debug/usb/devices file, they ought to be calculated correctly. The calculation for full-speed isochronous endpoints is wrong; it mistakenly yields bytes per microframe instead of bytes per frame. The "interval" value, which is in frames, should not be converted to microframes. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/ehci-sched.c')
-rw-r--r--drivers/usb/host/ehci-sched.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c
index 34b5945fafa5..4b0903c6c616 100644
--- a/drivers/usb/host/ehci-sched.c
+++ b/drivers/usb/host/ehci-sched.c
@@ -1055,7 +1055,7 @@ iso_stream_init (
} else
stream->raw_mask = smask_out [hs_transfers - 1];
bandwidth = stream->usecs + stream->c_usecs;
- bandwidth /= interval << 3;
+ bandwidth /= interval;
/* stream->splits gets created from raw_mask later */
stream->address = cpu_to_hc32(ehci, addr);