Module Name:    src
Committed By:   skrll
Date:           Sun Sep  8 06:37:23 UTC 2013

Modified Files:
        src/sys/dev/usb: uhci.c

Log Message:
Add sc->sc_bus.use_polling || to a couple of KASSERTs

PR/46826


To generate a diff of this commit:
cvs rdiff -u -r1.258 -r1.259 src/sys/dev/usb/uhci.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/uhci.c
diff -u src/sys/dev/usb/uhci.c:1.258 src/sys/dev/usb/uhci.c:1.259
--- src/sys/dev/usb/uhci.c:1.258	Sat Sep  7 16:17:12 2013
+++ src/sys/dev/usb/uhci.c	Sun Sep  8 06:37:23 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: uhci.c,v 1.258 2013/09/07 16:17:12 skrll Exp $	*/
+/*	$NetBSD: uhci.c,v 1.259 2013/09/08 06:37:23 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004, 2011, 2012 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.258 2013/09/07 16:17:12 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.259 2013/09/08 06:37:23 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1528,7 +1528,7 @@ uhci_idone(uhci_intr_info_t *ii)
 	u_int32_t status = 0, nstatus;
 	int actlen;
 
-	KASSERT(mutex_owned(&sc->sc_lock));
+	KASSERT(sc->sc_bus.use_polling || mutex_owned(&sc->sc_lock));
 
 	DPRINTFN(12, ("uhci_idone: ii=%p\n", ii));
 #ifdef DIAGNOSTIC
@@ -1649,7 +1649,7 @@ uhci_idone(uhci_intr_info_t *ii)
 
  end:
 	usb_transfer_complete(xfer);
-	KASSERT(mutex_owned(&sc->sc_lock));
+	KASSERT(sc->sc_bus.use_polling || mutex_owned(&sc->sc_lock));
 	DPRINTFN(12, ("uhci_idone: ii=%p done\n", ii));
 }
 

Reply via email to