diff options
author | 2015-01-02 11:58:32 +0000 | |
---|---|---|
committer | 2015-01-02 11:58:32 +0000 | |
commit | b803619633b47e09895c24f4cfb35d50a3052141 (patch) | |
tree | 2949d69d9c803efd5a1458cc8fa0e97b3b064cee /sys/dev/usb/uhub.c | |
parent | Remove unused variable. (diff) | |
download | wireguard-openbsd-b803619633b47e09895c24f4cfb35d50a3052141.tar.xz wireguard-openbsd-b803619633b47e09895c24f4cfb35d50a3052141.zip |
Report the TT Think Time of USB2.0 Hubs.
Diffstat (limited to 'sys/dev/usb/uhub.c')
-rw-r--r-- | sys/dev/usb/uhub.c | 5 |
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) { |