Module Name: src
Committed By: skrll
Date: Sun Dec 1 07:28:48 UTC 2013
Modified Files:
src/sys/dev/usb: ehci.c ohci.c uhci.c
Log Message:
Adjust KASSERT in device_ctrl_done to polling case.
PR/48213: ehci assertion failure during boot
To generate a diff of this commit:
cvs rdiff -u -r1.219 -r1.220 src/sys/dev/usb/ehci.c
cvs rdiff -u -r1.244 -r1.245 src/sys/dev/usb/ohci.c
cvs rdiff -u -r1.262 -r1.263 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/ehci.c
diff -u src/sys/dev/usb/ehci.c:1.219 src/sys/dev/usb/ehci.c:1.220
--- src/sys/dev/usb/ehci.c:1.219 Tue Nov 26 05:54:43 2013
+++ src/sys/dev/usb/ehci.c Sun Dec 1 07:28:47 2013
@@ -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 @@ ehci_device_ctrl_done(usbd_xfer_handle x
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)) {
Index: src/sys/dev/usb/ohci.c
diff -u src/sys/dev/usb/ohci.c:1.244 src/sys/dev/usb/ohci.c:1.245
--- src/sys/dev/usb/ohci.c:1.244 Mon Oct 28 17:40:43 2013
+++ src/sys/dev/usb/ohci.c Sun Dec 1 07:28:47 2013
@@ -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 @@ ohci_device_ctrl_done(usbd_xfer_handle x
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)) {
Index: src/sys/dev/usb/uhci.c
diff -u src/sys/dev/usb/uhci.c:1.262 src/sys/dev/usb/uhci.c:1.263
--- src/sys/dev/usb/uhci.c:1.262 Mon Oct 28 17:40:43 2013
+++ src/sys/dev/usb/uhci.c Sun Dec 1 07:28:48 2013
@@ -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 @@ uhci_device_ctrl_done(usbd_xfer_handle x
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))