Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb Add couple of error printf.



details:   https://anonhg.NetBSD.org/src/rev/4104f197c014
branches:  trunk
changeset: 448636:4104f197c014
user:      rin <rin%NetBSD.org@localhost>
date:      Wed Feb 06 08:04:08 2019 +0000

description:
Add couple of error printf.

XXX We should not to use aprint_xxx() for non-autoconf staffs.

diffstat:

 sys/dev/usb/if_axen.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (34 lines):

diff -r d7241a496458 -r 4104f197c014 sys/dev/usb/if_axen.c
--- a/sys/dev/usb/if_axen.c     Wed Feb 06 08:01:24 2019 +0000
+++ b/sys/dev/usb/if_axen.c     Wed Feb 06 08:04:08 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_axen.c,v 1.31 2019/02/06 08:01:24 rin Exp $ */
+/*     $NetBSD: if_axen.c,v 1.32 2019/02/06 08:04:08 rin Exp $ */
 /*     $OpenBSD: if_axen.c,v 1.3 2013/10/21 10:10:22 yuo Exp $ */
 
 /*
@@ -23,7 +23,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.31 2019/02/06 08:01:24 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.32 2019/02/06 08:04:08 rin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1033,6 +1033,7 @@
        usbd_get_xfer_status(xfer, NULL, NULL, &total_len, NULL);
 
        if (total_len < sizeof(pkt_hdr)) {
+               aprint_error_dev(sc->axen_dev, "rxeof: too short transfer\n");
                ifp->if_ierrors++;
                goto done;
        }
@@ -1054,6 +1055,7 @@
 
        /* sanity check */
        if (hdr_offset > total_len) {
+               aprint_error_dev(sc->axen_dev, "rxeof: invalid hdr offset\n");
                ifp->if_ierrors++;
                usbd_delay_ms(sc->axen_udev, 100);
                goto done;



Home | Main Index | Thread Index | Old Index