Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb adjust KASSERT() for sc_lock to handle polling c...



details:   https://anonhg.NetBSD.org/src/rev/8a78c4258129
branches:  trunk
changeset: 449777:8a78c4258129
user:      mrg <mrg%NetBSD.org@localhost>
date:      Fri Mar 22 07:25:15 2019 +0000

description:
adjust KASSERT() for sc_lock to handle polling case.
should fix usb kdb in ddb.  reported by martin.

diffstat:

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

diffs (27 lines):

diff -r 7d4e6442e996 -r 8a78c4258129 sys/dev/usb/ohci.c
--- a/sys/dev/usb/ohci.c        Fri Mar 22 04:39:02 2019 +0000
+++ b/sys/dev/usb/ohci.c        Fri Mar 22 07:25:15 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ohci.c,v 1.288 2019/02/17 04:17:52 rin Exp $   */
+/*     $NetBSD: ohci.c,v 1.289 2019/03/22 07:25:15 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.288 2019/02/17 04:17:52 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.289 2019/03/22 07:25:15 mrg Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -585,7 +585,7 @@
        OHCIHIST_FUNC(); OHCIHIST_CALLED();
        DPRINTF("start len=%jd", alen, 0, 0, 0);
 
-       KASSERT(mutex_owned(&sc->sc_lock));
+       KASSERT(sc->sc_bus.ub_usepolling || mutex_owned(&sc->sc_lock));
 
        DPRINTFN(8, "addr=%jd endpt=%jd len=%jd speed=%jd",
            xfer->ux_pipe->up_dev->ud_addr,



Home | Main Index | Thread Index | Old Index