Module Name: src
Committed By: jakllsch
Date: Sat Jan 14 20:41:49 UTC 2012
Modified Files:
src/sys/dev/usb: ucom.c
Log Message:
Don't notify about zero length reads without UCOM_DEBUG && ucomdebug > 0.
It's typical for uslsa(4) hardware to do this occasionally.
To generate a diff of this commit:
cvs rdiff -u -r1.94 -r1.95 src/sys/dev/usb/ucom.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/ucom.c
diff -u src/sys/dev/usb/ucom.c:1.94 src/sys/dev/usb/ucom.c:1.95
--- src/sys/dev/usb/ucom.c:1.94 Sat Jan 14 20:25:45 2012
+++ src/sys/dev/usb/ucom.c Sat Jan 14 20:41:49 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: ucom.c,v 1.94 2012/01/14 20:25:45 jakllsch Exp $ */
+/* $NetBSD: ucom.c,v 1.95 2012/01/14 20:41:49 jakllsch Exp $ */
/*
* Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ucom.c,v 1.94 2012/01/14 20:25:45 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ucom.c,v 1.95 2012/01/14 20:41:49 jakllsch Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1246,10 +1246,12 @@ ucomreadcb(usbd_xfer_handle xfer, usbd_p
usbd_get_xfer_status(xfer, NULL, (void *)&cp, &cc, NULL);
- if (cc == 0) {
- aprint_normal_dev(sc->sc_dev,
- "ucomreadcb: zero length xfer!\n");
+#ifdef UCOM_DEBUG
+ /* This is triggered by uslsa(4) occasionally. */
+ if ((ucomdebug > 0) && (cc == 0)) {
+ device_printf(sc->sc_dev, "ucomreadcb: zero length xfer!\n");
}
+#endif
KDASSERT(cp == ub->ub_data);