summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorskrll <skrll@NetBSD.org>2013-04-04 12:21:12 +0000
committerskrll <skrll@NetBSD.org>2013-04-04 12:21:12 +0000
commitcd5d3daccc2e0bc6715fa470323f1a04ca58c691 (patch)
treee62108a518a938fba984c6c8326ac15e587e99ab /sys/dev/usb
parent4d20b411da78198dc82899bf4b1bcccaf56290d3 (diff)
Take the bus lock in ohci_poll as it's assumed by ohci_softintr which
will get called by ohci_intr1... I can enter ddb using usb keyboard attached via ohci now.
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/ohci.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c
index 719d819995a..9ea8fe0e791 100644
--- a/sys/dev/usb/ohci.c
+++ b/sys/dev/usb/ohci.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ohci.c,v 1.238 2013/04/04 09:46:42 skrll Exp $ */
+/* $NetBSD: ohci.c,v 1.239 2013/04/04 12:21:12 skrll Exp $ */
/*
* Copyright (c) 1998, 2004, 2005, 2012 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.238 2013/04/04 09:46:42 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.239 2013/04/04 12:21:12 skrll Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1682,13 +1682,14 @@ ohci_poll(struct usbd_bus *bus)
last = new;
}
#endif
-
+ mutex_enter(&sc->sc_lock);
sc->sc_eintrs |= OHCI_WDH;
if (OREAD4(sc, OHCI_INTERRUPT_STATUS) & sc->sc_eintrs) {
mutex_spin_enter(&sc->sc_intr_lock);
ohci_intr1(sc);
mutex_spin_exit(&sc->sc_intr_lock);
}
+ mutex_exit(&sc->sc_lock);
}
usbd_status