summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2015-01-02 11:58:33 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2015-01-02 11:58:33 +0000
commit287084c1584dfafbc120a8c350c35c2122b9b7f2 (patch)
treeb2c5cc8da9eef5df1109eaad0390316a2ae26fe2 /sys
parent197734c439e785589f89c67f0394513eaf1c0e2b (diff)
Report the TT Think Time of USB2.0 Hubs.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/usb/uhub.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/usb/uhub.c b/sys/dev/usb/uhub.c
index 593ea693a8f..86c722c8748 100644
--- a/sys/dev/usb/uhub.c
+++ b/sys/dev/usb/uhub.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhub.c,v 1.81 2014/12/09 07:05:06 doug Exp $ */
+/* $OpenBSD: uhub.c,v 1.82 2015/01/02 11:58:32 mpi Exp $ */
/* $NetBSD: uhub.c,v 1.64 2003/02/08 03:32:51 ichiro Exp $ */
/* $FreeBSD: src/sys/dev/usb/uhub.c,v 1.18 1999/11/17 22:33:43 n_hibma Exp $ */
@@ -167,6 +167,7 @@ uhub_attach(struct device *parent, struct device *self, void *aux)
err = usbd_get_hub_descriptor(dev, &hd.hs, 1);
nports = hd.hs.bNbrPorts;
powerdelay = (hd.hs.bPwrOn2PwrGood * UHD_PWRON_FACTOR);
+ ttthink = UGETW(hd.hs.wHubCharacteristics) & UHD_TT_THINK;
if (!err && nports > 7)
usbd_get_hub_descriptor(dev, &hd.hs, nports);
}
@@ -220,7 +221,7 @@ uhub_attach(struct device *parent, struct device *self, void *aux)
hub->explore = uhub_explore;
hub->nports = nports;
hub->powerdelay = powerdelay;
- hub->ttthink = ttthink;
+ hub->ttthink = ttthink >> 5;
if (!dev->self_powered && dev->powersrc->parent != NULL &&
!dev->powersrc->parent->self_powered) {