summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/uhub.c
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2015-11-29 16:16:35 +0000
committerkettenis <kettenis@openbsd.org>2015-11-29 16:16:35 +0000
commita4e90a861d8e7a8b8d6f76585e2d27508f33e1e0 (patch)
treedf43cfb11f25a3d8bae6e84babab8148487b84e9 /sys/dev/usb/uhub.c
parenttidy here too; (diff)
downloadwireguard-openbsd-a4e90a861d8e7a8b8d6f76585e2d27508f33e1e0.tar.xz
wireguard-openbsd-a4e90a861d8e7a8b8d6f76585e2d27508f33e1e0.zip
Clear the UPS_C_PORT_RESET feature when exploring. Apparently xhci(4) super
speed ports may have the XHCI_PS_PRC bit set after xhci(4) attaches. Just clearing this bit isn't enough though, since the device is already connected and no further connection status change is signalled. So fake one. This makes the integrated SD card reader in the MacBookPro12,1 attach. ok mpi@
Diffstat (limited to 'sys/dev/usb/uhub.c')
-rw-r--r--sys/dev/usb/uhub.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/usb/uhub.c b/sys/dev/usb/uhub.c
index 0057888bf1f..8dac9465acd 100644
--- a/sys/dev/usb/uhub.c
+++ b/sys/dev/usb/uhub.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhub.c,v 1.86 2015/06/29 18:27:40 mpi Exp $ */
+/* $OpenBSD: uhub.c,v 1.87 2015/11/29 16:16:35 kettenis 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 $ */
@@ -419,6 +419,12 @@ uhub_explore(struct usbd_device *dev)
}
}
+ if (change & UPS_C_PORT_RESET) {
+ usbd_clear_port_feature(sc->sc_hub, port,
+ UHF_C_PORT_RESET);
+ change |= UPS_C_CONNECT_STATUS;
+ }
+
if (change & UPS_C_CONNECT_STATUS) {
if (uhub_port_connect(sc, port, status, change))
continue;