[PATCH 3/11] USB: EHCI: compute full-speed bandwidth usage correctly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxx>

---

[as1716]

 drivers/usb/host/ehci-sched.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: usb-3.11/drivers/usb/host/ehci-sched.c
===================================================================
--- usb-3.11.orig/drivers/usb/host/ehci-sched.c
+++ usb-3.11/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);


--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux