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 Add some debug



details:   https://anonhg.NetBSD.org/src/rev/7d11d20d93bc
branches:  nick-nhusb
changeset: 804481:7d11d20d93bc
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sat Dec 19 10:06:32 2015 +0000

description:
Add some debug

diffstat:

 sys/dev/usb/usbdi.c |  10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diffs (42 lines):

diff -r 3cfc55a65a32 -r 7d11d20d93bc sys/dev/usb/usbdi.c
--- a/sys/dev/usb/usbdi.c       Sat Dec 19 10:04:35 2015 +0000
+++ b/sys/dev/usb/usbdi.c       Sat Dec 19 10:06:32 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: usbdi.c,v 1.162.2.34 2015/12/19 10:04:35 skrll Exp $   */
+/*     $NetBSD: usbdi.c,v 1.162.2.35 2015/12/19 10:06:32 skrll Exp $   */
 
 /*
  * Copyright (c) 1998, 2012, 2015 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.162.2.34 2015/12/19 10:04:35 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.162.2.35 2015/12/19 10:06:32 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -775,17 +775,23 @@
        usbd_status err;
        void *endpoints;
 
+       USBHIST_FUNC(); USBHIST_CALLED(usbdebug);
+
        if (LIST_FIRST(&iface->ui_pipes) != NULL)
                return USBD_IN_USE;
 
        endpoints = iface->ui_endpoints;
        int nendpt = iface->ui_idesc->bNumEndpoints;
+       USBHIST_LOG(usbdebug, "iface %p endpoints = %p nendpt", iface,
+           endpoints, iface->ui_idesc->bNumEndpoints, 0);
        err = usbd_fill_iface_data(iface->ui_dev, iface->ui_index, altidx);
        if (err)
                return err;
 
        /* new setting works, we can free old endpoints */
        if (endpoints != NULL) {
+               USBHIST_LOG(usbdebug, "iface %p endpoints = %p nendpt", iface,
+                   endpoints, nendpt, 0);
                kmem_free(endpoints, nendpt * sizeof(struct usbd_endpoint));
        }
        KASSERT(iface->ui_idesc != NULL);



Home | Main Index | Thread Index | Old Index