Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/nick-nhusb]: src/sys/dev/usb Improve debug



details:   https://anonhg.NetBSD.org/src/rev/858facbb9a66
branches:  nick-nhusb
changeset: 334120:858facbb9a66
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sun Mar 01 08:18:16 2015 +0000

description:
Improve debug

diffstat:

 sys/dev/usb/ehci.c |  13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diffs (49 lines):

diff -r dd7635ef28d9 -r 858facbb9a66 sys/dev/usb/ehci.c
--- a/sys/dev/usb/ehci.c        Sun Mar 01 08:17:45 2015 +0000
+++ b/sys/dev/usb/ehci.c        Sun Mar 01 08:18:16 2015 +0000
@@ -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 @@
        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 @@
                }
                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 @@
                    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);
 }



Home | Main Index | Thread Index | Old Index