diff options
| author | 2014-11-07 13:56:29 +0000 | |
|---|---|---|
| committer | 2014-11-07 13:56:29 +0000 | |
| commit | 7af21e63aedc7bf141a1ed5d3e03dc6b776f77c1 (patch) | |
| tree | 8835b0fd4340c02150560fdab60febb9531eef61 /sys/dev/usb/usbdi_util.c | |
| parent | Remove the sslv2 option since LibreSSL has no SSLv2 support (however retain (diff) | |
| download | wireguard-openbsd-7af21e63aedc7bf141a1ed5d3e03dc6b776f77c1.tar.xz wireguard-openbsd-7af21e63aedc7bf141a1ed5d3e03dc6b776f77c1.zip | |
Give Super-Speed hubs a chance to route USB 3.0 transfers.
Without knowing their depth, hubs couldn't find the bits correspdonding
to their downstream port in the route-string. Now USB 3.0 devices just
work(tm) anywhere in your hub chain.
This commit would not have been possible without the cheese provided by
miod@ at #HAMoween.
Diffstat (limited to 'sys/dev/usb/usbdi_util.c')
| -rw-r--r-- | sys/dev/usb/usbdi_util.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/sys/dev/usb/usbdi_util.c b/sys/dev/usb/usbdi_util.c index ba5d8e5bad2..bc8c8d29c84 100644 --- a/sys/dev/usb/usbdi_util.c +++ b/sys/dev/usb/usbdi_util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: usbdi_util.c,v 1.38 2014/08/08 14:20:05 mpi Exp $ */ +/* $OpenBSD: usbdi_util.c,v 1.39 2014/11/07 13:56:29 mpi Exp $ */ /* $NetBSD: usbdi_util.c,v 1.40 2002/07/11 21:14:36 augustss Exp $ */ /* $FreeBSD: src/sys/dev/usb/usbdi_util.c,v 1.14 1999/11/17 22:33:50 n_hibma Exp $ */ @@ -168,6 +168,19 @@ usbd_set_hub_feature(struct usbd_device *dev, int sel) } usbd_status +usbd_set_hub_depth(struct usbd_device *dev, int depth) +{ + usb_device_request_t req; + + req.bmRequestType = UT_WRITE_CLASS_DEVICE; + req.bRequest = UR_SET_DEPTH; + USETW(req.wValue, depth); + USETW(req.wIndex, 0); + USETW(req.wLength, 0); + return usbd_do_request(dev, &req, 0); +} + +usbd_status usbd_clear_port_feature(struct usbd_device *dev, int port, int sel) { usb_device_request_t req; |
