Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb More DIAGNOSTIC tests.



details:   https://anonhg.NetBSD.org/src/rev/496e1ac4b799
branches:  trunk
changeset: 472951:496e1ac4b799
user:      augustss <augustss%NetBSD.org@localhost>
date:      Thu May 13 23:29:41 1999 +0000

description:
More DIAGNOSTIC tests.

diffstat:

 sys/dev/usb/usb_subr.c |  10 +++++++++-
 sys/dev/usb/usbdi.c    |   7 ++++++-
 2 files changed, 15 insertions(+), 2 deletions(-)

diffs (45 lines):

diff -r 017839b9bc7a -r 496e1ac4b799 sys/dev/usb/usb_subr.c
--- a/sys/dev/usb/usb_subr.c    Thu May 13 23:29:11 1999 +0000
+++ b/sys/dev/usb/usb_subr.c    Thu May 13 23:29:41 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: usb_subr.c,v 1.30 1999/05/09 14:37:18 augustss Exp $   */
+/*     $NetBSD: usb_subr.c,v 1.31 1999/05/13 23:29:41 augustss Exp $   */
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -1069,6 +1069,14 @@
        DPRINTFN(10, ("usb_start_next: pipe=%p\n", pipe));
        
 #ifdef DIAGNOSTIC
+       if (!pipe) {
+               printf("usb_start_next: pipe == 0\n");
+               return;
+       }
+       if (!pipe->methods || !pipe->methods->start) {
+               printf("usb_start_next:  no start method\n");
+               return;
+       }
        if (SIMPLEQ_FIRST(&pipe->queue) == 0) {
                printf("usb_start_next: empty\n");
                return;
diff -r 017839b9bc7a -r 496e1ac4b799 sys/dev/usb/usbdi.c
--- a/sys/dev/usb/usbdi.c       Thu May 13 23:29:11 1999 +0000
+++ b/sys/dev/usb/usbdi.c       Thu May 13 23:29:41 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: usbdi.c,v 1.22 1999/05/09 14:36:42 augustss Exp $      */
+/*     $NetBSD: usbdi.c,v 1.23 1999/05/13 23:29:41 augustss Exp $      */
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -949,6 +949,11 @@
 
        DPRINTFN(10, ("usbd_transfer_cb: reqh=%p\n", reqh));
        /* Count completed transfers. */
+#ifdef DIAGNOSTIC
+       if (!pipe)
+               printf("usbd_transfer_cb: pipe==0, reqh=%p\n", reqh);
+       else
+#endif
        ++pipe->device->bus->stats.requests
                [pipe->endpoint->edesc->bmAttributes & UE_XFERTYPE];
 



Home | Main Index | Thread Index | Old Index