Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb relax an assert to be mutex_owned || polling.



details:   https://anonhg.NetBSD.org/src/rev/def249e65189
branches:  trunk
changeset: 964679:def249e65189
user:      mrg <mrg%NetBSD.org@localhost>
date:      Sun Aug 11 22:55:03 2019 +0000

description:
relax an assert to be mutex_owned || polling.

half of the patch i sent for netbsd-8 in PR#54331.
the other half is already applied.

diffstat:

 sys/dev/usb/ohci.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 2c9ad7d4ab71 -r def249e65189 sys/dev/usb/ohci.c
--- a/sys/dev/usb/ohci.c        Sun Aug 11 22:27:15 2019 +0000
+++ b/sys/dev/usb/ohci.c        Sun Aug 11 22:55:03 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ohci.c,v 1.289 2019/03/22 07:25:15 mrg Exp $   */
+/*     $NetBSD: ohci.c,v 1.290 2019/08/11 22:55:03 mrg 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.289 2019/03/22 07:25:15 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.290 2019/08/11 22:55:03 mrg Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -1673,7 +1673,7 @@
        int isread =
            (UE_GET_DIR(xfer->ux_pipe->up_endpoint->ue_edesc->bEndpointAddress) == UE_DIR_IN);
 
-       KASSERT(mutex_owned(&sc->sc_lock));
+       KASSERT(sc->sc_bus.ub_usepolling || mutex_owned(&sc->sc_lock));
 
        OHCIHIST_FUNC(); OHCIHIST_CALLED();
        DPRINTFN(10, "xfer=%#jx, actlen=%jd", (uintptr_t)xfer, xfer->ux_actlen,



Home | Main Index | Thread Index | Old Index