Module Name: src
Committed By: skrll
Date: Thu Oct 19 05:39:22 UTC 2017
Modified Files:
src/sys/dev/usb: usbdi.c
Log Message:
KASSERT -> KASSERTMSG and while I'm here update a comment
To generate a diff of this commit:
cvs rdiff -u -r1.173 -r1.174 src/sys/dev/usb/usbdi.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/usbdi.c
diff -u src/sys/dev/usb/usbdi.c:1.173 src/sys/dev/usb/usbdi.c:1.174
--- src/sys/dev/usb/usbdi.c:1.173 Thu Jun 1 02:45:12 2017
+++ src/sys/dev/usb/usbdi.c Thu Oct 19 05:39:22 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: usbdi.c,v 1.173 2017/06/01 02:45:12 chs Exp $ */
+/* $NetBSD: usbdi.c,v 1.174 2017/10/19 05:39:22 skrll Exp $ */
/*
* Copyright (c) 1998, 2012, 2015 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.173 2017/06/01 02:45:12 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.174 2017/10/19 05:39:22 skrll Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -856,7 +856,7 @@ usbd_get_interface(struct usbd_interface
/*** Internal routines ***/
-/* Dequeue all pipe operations, called at splusb(). */
+/* Dequeue all pipe operations, called with bus lock held. */
Static usbd_status
usbd_ar_pipe(struct usbd_pipe *pipe)
{
@@ -999,7 +999,8 @@ usb_insert_transfer(struct usbd_xfer *xf
xfer, pipe, pipe->up_running, xfer->ux_timeout);
KASSERT(mutex_owned(pipe->up_dev->ud_bus->ub_lock));
- KASSERT(xfer->ux_state == XFER_BUSY);
+ KASSERTMSG(xfer->ux_state == XFER_BUSY, "xfer %p state is %x", xfer,
+ xfer->ux_state);
#ifdef DIAGNOSTIC
xfer->ux_state = XFER_ONQU;