Module Name:    src
Committed By:   skrll
Date:           Sun Mar  1 08:18:17 UTC 2015

Modified Files:
        src/sys/dev/usb [nick-nhusb]: ehci.c

Log Message:
Improve debug


To generate a diff of this commit:
cvs rdiff -u -r1.234.2.32 -r1.234.2.33 src/sys/dev/usb/ehci.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.234.2.32 src/sys/dev/usb/ehci.c:1.234.2.33
--- src/sys/dev/usb/ehci.c:1.234.2.32	Sun Mar  1 08:17:45 2015
+++ src/sys/dev/usb/ehci.c	Sun Mar  1 08:18:16 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ehci.c,v 1.234.2.32 2015/03/01 08:17:45 skrll Exp $ */
+/*	$NetBSD: ehci.c,v 1.234.2.33 2015/03/01 08:18:16 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.234.2.32 2015/03/01 08:17:45 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.234.2.33 2015/03/01 08:18:16 skrll Exp $");
 
 #include "ohci.h"
 #include "uhci.h"
@@ -563,7 +563,9 @@ ehci_init(ehci_softc_t *sc)
 	usb_syncmem(&sqh->dma, sqh->offs, sizeof(sqh->qh),
 	    BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD);
 #ifdef EHCI_DEBUG
+	USBHIST_LOGN(ehcidebug, 5, "--- dump start ---", 0, 0, 0, 0);
 	ehci_dump_sqh(sqh);
+	USBHIST_LOGN(ehcidebug, 5, "--- dump end ---", 0, 0, 0, 0);
 #endif
 
 	/* Point to async list */
@@ -892,6 +894,11 @@ ehci_check_qh_intr(ehci_softc_t *sc, str
 		}
 		USBHIST_LOGN(ehcidebug, 10, "ex=%p std=%p still active",
 		    ex, ex->ex_sqtdstart, 0, 0);
+#ifdef EHCI_DEBUG
+		USBHIST_LOGN(ehcidebug, 5, "--- still active start ---", 0, 0, 0, 0);
+		ehci_dump_sqtds(ex->ex_sqtdstart);
+		USBHIST_LOGN(ehcidebug, 5, "--- still active end ---", 0, 0, 0, 0);
+#endif
 		return;
 	}
  done:
@@ -1657,7 +1664,7 @@ ehci_dump_sqtds(ehci_soft_qtd_t *sqtd)
 		    sqtd->offs + offsetof(ehci_qtd_t, qtd_next),
 		    sizeof(sqtd->qtd), BUS_DMASYNC_PREREAD);
 	}
-	if (sqtd)
+	if (!stop)
 		USBHIST_LOG(ehcidebug,
 		    "dump aborted, too many TDs", 0, 0, 0, 0);
 }

Reply via email to