diff options
author | david-b@pacbell.net <david-b@pacbell.net> | 2005-08-14 03:44:58 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-09-09 01:28:36 +0200 |
commit | d0384200f6b608e77fb5ddf7dfae1bf0e42c1c6e (patch) | |
tree | 4ab0d9bcf70a42a2c75b7a4aca7a757e7085ee94 /drivers/usb/host/ehci-q.c | |
parent | [PATCH] ehci: add think_time (diff) | |
download | linux-d0384200f6b608e77fb5ddf7dfae1bf0e42c1c6e.tar.xz linux-d0384200f6b608e77fb5ddf7dfae1bf0e42c1c6e.zip |
[PATCH] ehci: add tt_usecs
This adds the field tt_usecs to ehci_qh and ehci_iso_stream, and sets it
appropriately when setting them up as periodic endpoints. It records
the transation translator's think_time (added in last patch) plus the
downstream (i.e. low or full speed) bustime of the transfer associated
with each interrupt or iso frame, as calculated by usb_calc_bus_time.
Signed-off-by: Dan Streetman <ddstreet@ieee.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/ehci-q.c')
-rw-r--r-- | drivers/usb/host/ehci-q.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c index 20df01a79b2e..940d38ca7d91 100644 --- a/drivers/usb/host/ehci-q.c +++ b/drivers/usb/host/ehci-q.c @@ -677,6 +677,9 @@ qh_make ( goto done; } } else { + struct usb_tt *tt = urb->dev->tt; + int think_time; + /* gap is f(FS/LS transfer times) */ qh->gap_uf = 1 + usb_calc_bus_time (urb->dev->speed, is_input, 0, maxp) / (125 * 1000); @@ -690,6 +693,10 @@ qh_make ( qh->c_usecs = HS_USECS (0); } + think_time = tt ? tt->think_time : 0; + qh->tt_usecs = NS_TO_US (think_time + + usb_calc_bus_time (urb->dev->speed, + is_input, 0, max_packet (maxp))); qh->period = urb->interval; } } |