summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2015-11-29 16:16:36 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2015-11-29 16:16:36 +0000
commit7192f54e449c60f46513e46918507c7d47dfb23b (patch)
tree11212487e0186126c7b518f27fd2b50c2aedbb1e /sys/dev/usb
parent32cc3c6670cfbf4a315b022a67bca1f260e395ef (diff)
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')
-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;