Module Name: src Committed By: skrll Date: Thu Apr 4 12:21:13 UTC 2013
Modified Files: src/sys/dev/usb: ohci.c Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.238 -r1.239 src/sys/dev/usb/ohci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/usb/ohci.c diff -u src/sys/dev/usb/ohci.c:1.238 src/sys/dev/usb/ohci.c:1.239 --- src/sys/dev/usb/ohci.c:1.238 Thu Apr 4 09:46:42 2013 +++ src/sys/dev/usb/ohci.c Thu Apr 4 12:21:12 2013 @@ -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