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 in device_ctrl_done to polling case.



details:   https://anonhg.NetBSD.org/src/rev/659b7f062e11
branches:  trunk
changeset: 325040:659b7f062e11
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sun Dec 01 07:28:47 2013 +0000

description:
Adjust KASSERT in device_ctrl_done to polling case.

PR/48213: ehci assertion failure during boot

diffstat:

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

diffs (81 lines):

diff -r 3dc98e79ed3c -r 659b7f062e11 sys/dev/usb/ehci.c
--- a/sys/dev/usb/ehci.c        Sun Dec 01 02:57:43 2013 +0000
+++ b/sys/dev/usb/ehci.c        Sun Dec 01 07:28:47 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ehci.c,v 1.219 2013/11/26 05:54:43 skrll Exp $ */
+/*     $NetBSD: ehci.c,v 1.220 2013/12/01 07:28:47 skrll Exp $ */
 
 /*
  * Copyright (c) 2004-2012 The NetBSD Foundation, Inc.
@@ -53,7 +53,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.219 2013/11/26 05:54:43 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.220 2013/12/01 07:28:47 skrll Exp $");
 
 #include "ohci.h"
 #include "uhci.h"
@@ -3296,7 +3296,7 @@
 
        DPRINTFN(10,("ehci_ctrl_done: xfer=%p\n", xfer));
 
-       KASSERT(mutex_owned(&sc->sc_lock));
+       KASSERT(sc->sc_bus.use_polling || mutex_owned(&sc->sc_lock));
 
 #ifdef DIAGNOSTIC
        if (!(xfer->rqflags & URQ_REQUEST)) {
diff -r 3dc98e79ed3c -r 659b7f062e11 sys/dev/usb/ohci.c
--- a/sys/dev/usb/ohci.c        Sun Dec 01 02:57:43 2013 +0000
+++ b/sys/dev/usb/ohci.c        Sun Dec 01 07:28:47 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ohci.c,v 1.244 2013/10/28 17:40:43 matt Exp $  */
+/*     $NetBSD: ohci.c,v 1.245 2013/12/01 07:28:47 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.244 2013/10/28 17:40:43 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.245 2013/12/01 07:28:47 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1469,7 +1469,7 @@
 
        DPRINTFN(10,("ohci_device_ctrl_done: xfer=%p\n", xfer));
 
-       KASSERT(mutex_owned(&sc->sc_lock));
+       KASSERT(sc->sc_bus.use_polling || mutex_owned(&sc->sc_lock));
 
 #ifdef DIAGNOSTIC
        if (!(xfer->rqflags & URQ_REQUEST)) {
diff -r 3dc98e79ed3c -r 659b7f062e11 sys/dev/usb/uhci.c
--- a/sys/dev/usb/uhci.c        Sun Dec 01 02:57:43 2013 +0000
+++ b/sys/dev/usb/uhci.c        Sun Dec 01 07:28:47 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uhci.c,v 1.262 2013/10/28 17:40:43 matt Exp $  */
+/*     $NetBSD: uhci.c,v 1.263 2013/12/01 07:28:48 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.262 2013/10/28 17:40:43 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.263 2013/12/01 07:28:48 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -3120,7 +3120,7 @@
        int len = UGETW(xfer->request.wLength);
        int isread = (xfer->request.bmRequestType & UT_READ);
 
-       KASSERT(mutex_owned(&sc->sc_lock));
+       KASSERT(sc->sc_bus.use_polling || mutex_owned(&sc->sc_lock));
 
 #ifdef DIAGNOSTIC
        if (!(xfer->rqflags & URQ_REQUEST))



Home | Main Index | Thread Index | Old Index