Module Name: src Committed By: skrll Date: Tue Dec 27 08:32:19 UTC 2016
Modified Files: src/sys/dev/usb [nick-nhusb]: ohci.c Log Message: Don't supply the lock to callout_halt when polling as it won't be held To generate a diff of this commit: cvs rdiff -u -r1.254.2.81 -r1.254.2.82 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.254.2.81 src/sys/dev/usb/ohci.c:1.254.2.82 --- src/sys/dev/usb/ohci.c:1.254.2.81 Sat Dec 17 10:10:34 2016 +++ src/sys/dev/usb/ohci.c Tue Dec 27 08:32:19 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: ohci.c,v 1.254.2.81 2016/12/17 10:10:34 skrll Exp $ */ +/* $NetBSD: ohci.c,v 1.254.2.82 2016/12/27 08:32:19 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.254.2.81 2016/12/17 10:10:34 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.254.2.82 2016/12/27 08:32:19 skrll Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -1402,8 +1402,9 @@ ohci_softintr(void *v) int len, cc; int i, j, actlen, iframes, uedir; ohci_physaddr_t done = 0; + bool polling = sc->sc_bus.ub_usepolling; - KASSERT(sc->sc_bus.ub_usepolling || mutex_owned(&sc->sc_lock)); + KASSERT(polling || mutex_owned(&sc->sc_lock)); OHCIHIST_FUNC(); OHCIHIST_CALLED(); @@ -1491,7 +1492,7 @@ ohci_softintr(void *v) * Make sure the timeout handler didn't run or ran to the end * and set the transfer status. */ - callout_halt(&xfer->ux_callout, &sc->sc_lock); + callout_halt(&xfer->ux_callout, polling ? NULL : &sc->sc_lock); if (xfer->ux_status == USBD_CANCELLED || xfer->ux_status == USBD_TIMEOUT) {