summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2014-07-10 20:57:41 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2014-07-10 20:57:41 +0000
commitca401a37ace1cde9fd5fff305e8f95d9465fc8f5 (patch)
tree895ac84afdd46872c28077f10078fa634b2ee76e /sys/dev
parent86c6c56a237a964726a5b7fd5a72ae43a79e7ebc (diff)
Do not set the bus dying flag during DVACT_DEACTIVATE otherwise the
explore thread will not disconnect the root hub. The flag will be set before detaching the children, like it is done during a suspend- resume cycle. Fix a panic when unplugging a cardbus *hci(4).
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/usb/ehci.c6
-rw-r--r--sys/dev/usb/ohci.c6
-rw-r--r--sys/dev/usb/uhci.c6
3 files changed, 3 insertions, 15 deletions
diff --git a/sys/dev/usb/ehci.c b/sys/dev/usb/ehci.c
index 6c4419ea88d..f9ddfd27734 100644
--- a/sys/dev/usb/ehci.c
+++ b/sys/dev/usb/ehci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ehci.c,v 1.159 2014/07/09 15:47:54 mpi Exp $ */
+/* $OpenBSD: ehci.c,v 1.160 2014/07/10 20:57:40 mpi Exp $ */
/* $NetBSD: ehci.c,v 1.66 2004/06/30 03:11:56 mycroft Exp $ */
/*
@@ -1121,10 +1121,6 @@ ehci_activate(struct device *self, int act)
sc->sc_bus.use_polling--;
rv = config_activate_children(self, act);
break;
- case DVACT_DEACTIVATE:
- rv = config_activate_children(self, act);
- sc->sc_bus.dying = 1;
- break;
case DVACT_POWERDOWN:
rv = config_activate_children(self, act);
ehci_reset(sc);
diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c
index 6b99c55826a..29a9987b297 100644
--- a/sys/dev/usb/ohci.c
+++ b/sys/dev/usb/ohci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ohci.c,v 1.134 2014/07/09 15:47:54 mpi Exp $ */
+/* $OpenBSD: ohci.c,v 1.135 2014/07/10 20:57:40 mpi Exp $ */
/* $NetBSD: ohci.c,v 1.139 2003/02/22 05:24:16 tsutsui Exp $ */
/* $FreeBSD: src/sys/dev/usb/ohci.c,v 1.22 1999/11/17 22:33:40 n_hibma Exp $ */
@@ -353,10 +353,6 @@ ohci_activate(struct device *self, int act)
sc->sc_bus.use_polling--;
rv = config_activate_children(self, act);
break;
- case DVACT_DEACTIVATE:
- rv = config_activate_children(self, act);
- sc->sc_bus.dying = 1;
- break;
case DVACT_POWERDOWN:
rv = config_activate_children(self, act);
OWRITE4(sc, OHCI_CONTROL, OHCI_HCFS_RESET);
diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c
index dcb0d9cc673..52e78531f7c 100644
--- a/sys/dev/usb/uhci.c
+++ b/sys/dev/usb/uhci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhci.c,v 1.125 2014/07/09 15:47:54 mpi Exp $ */
+/* $OpenBSD: uhci.c,v 1.126 2014/07/10 20:57:40 mpi Exp $ */
/* $NetBSD: uhci.c,v 1.172 2003/02/23 04:19:26 simonb Exp $ */
/* $FreeBSD: src/sys/dev/usb/uhci.c,v 1.33 1999/11/17 22:33:41 n_hibma Exp $ */
@@ -553,10 +553,6 @@ uhci_activate(struct device *self, int act)
#endif
rv = config_activate_children(self, act);
break;
- case DVACT_DEACTIVATE:
- rv = config_activate_children(self, act);
- sc->sc_bus.dying = 1;
- break;
default:
rv = config_activate_children(self, act);
break;