Mon Oct 3 00:32:37 2016 UTC ()
Improve diagnostic print seen in PR 51524.


(dholland)
diff -r1.253 -r1.254 src/sys/dev/usb/ehci.c

cvs diff -r1.253 -r1.254 src/sys/dev/usb/ehci.c (expand / switch to context diff)
--- src/sys/dev/usb/ehci.c 2016/08/14 14:42:22 1.253
+++ src/sys/dev/usb/ehci.c 2016/10/03 00:32:37 1.254
@@ -1,4 +1,4 @@
-/*	$NetBSD: ehci.c,v 1.253 2016/08/14 14:42:22 skrll Exp $ */
+/*	$NetBSD: ehci.c,v 1.254 2016/10/03 00:32:37 dholland 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.253 2016/08/14 14:42:22 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.254 2016/10/03 00:32:37 dholland Exp $");
 
 #include "ohci.h"
 #include "uhci.h"
@@ -2168,8 +2168,11 @@
 	DPRINTF("cmd = 0x%08x sts = 0x%08x ... done",
 	    EOREAD4(sc, EHCI_USBCMD), EOREAD4(sc, EHCI_USBSTS), 0, 0);
 #ifdef DIAGNOSTIC
-	if (error)
-		printf("ehci_sync_hc: cv_timedwait() = %d\n", error);
+	if (error == EWOULDBLOCK) {
+		printf("ehci_sync_hc: timed out\n");
+	} else if (error) {
+		printf("ehci_sync_hc: cv_timedwait: error %d\n", error);
+	}
 #endif
 }