summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/usb/uhci.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c
index 1ac2425f0ff..3fca3cca2fa 100644
--- a/sys/dev/usb/uhci.c
+++ b/sys/dev/usb/uhci.c
@@ -1,4 +1,4 @@
-/* $NetBSD: uhci.c,v 1.218 2008/05/21 17:19:44 drochner Exp $ */
+/* $NetBSD: uhci.c,v 1.219 2008/06/02 01:02:21 jmcneill Exp $ */
/* $FreeBSD: src/sys/dev/usb/uhci.c,v 1.33 1999/11/17 22:33:41 n_hibma Exp $ */
/*
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.218 2008/05/21 17:19:44 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.219 2008/06/02 01:02:21 jmcneill Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -424,6 +424,8 @@ uhci_init(uhci_softc_t *sc)
uhci_dumpregs(sc);
#endif
+ sc->sc_suspend = PWR_RESUME;
+
UWRITE2(sc, UHCI_INTR, 0); /* disable interrupts */
uhci_globalreset(sc); /* reset the controller */
uhci_reset(sc);
@@ -745,6 +747,7 @@ uhci_resume(device_t dv PMF_FN_ARGS)
uhci_dumpregs(sc);
#endif
+ sc->sc_suspend = PWR_RESUME;
splx(s);
return true;
@@ -768,7 +771,9 @@ uhci_suspend(device_t dv PMF_FN_ARGS)
if (sc->sc_intr_xfer != NULL)
usb_uncallout(sc->sc_poll_handle, uhci_poll_hub,
sc->sc_intr_xfer);
+ sc->sc_suspend = PWR_SUSPEND;
sc->sc_bus.use_polling++;
+
uhci_run(sc, 0); /* stop the controller */
cmd &= ~UHCI_CMD_RS;