summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/uhub.c
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2014-03-08 11:52:02 +0000
committermpi <mpi@openbsd.org>2014-03-08 11:52:02 +0000
commit1ddbc1872b791a31c79c12c1af73d6d2bb67f45c (patch)
tree8da78196d0257849634791064ba6b0857311e9ee /sys/dev/usb/uhub.c
parentAttach to host controller drivers advertising USB 3.0 support and assign (diff)
downloadwireguard-openbsd-1ddbc1872b791a31c79c12c1af73d6d2bb67f45c.tar.xz
wireguard-openbsd-1ddbc1872b791a31c79c12c1af73d6d2bb67f45c.zip
Recognize super speed devices, note that this driver sill uses
non-superspeed hub descriptors. This is the minimal change I came with to be able to properly attach and use USB 3.0 devices attached to a xHCI root hub, uhub(4) clearly needs some love.
Diffstat (limited to 'sys/dev/usb/uhub.c')
-rw-r--r--sys/dev/usb/uhub.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/usb/uhub.c b/sys/dev/usb/uhub.c
index e656b07898b..a0b1df5f204 100644
--- a/sys/dev/usb/uhub.c
+++ b/sys/dev/usb/uhub.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhub.c,v 1.64 2014/03/07 18:57:23 mpi Exp $ */
+/* $OpenBSD: uhub.c,v 1.65 2014/03/08 11:52:02 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 $ */
@@ -439,7 +439,9 @@ uhub_explore(struct usbd_device *dev)
}
/* Figure out device speed */
- if (status & UPS_HIGH_SPEED)
+ if (status & UPS_SUPER_SPEED)
+ speed = USB_SPEED_SUPER;
+ else if (status & UPS_HIGH_SPEED)
speed = USB_SPEED_HIGH;
else if (status & UPS_LOW_SPEED)
speed = USB_SPEED_LOW;