Module Name: src
Committed By: rin
Date: Wed Feb 6 08:04:08 UTC 2019
Modified Files:
src/sys/dev/usb: if_axen.c
Log Message:
Add couple of error printf.
XXX We should not to use aprint_xxx() for non-autoconf staffs.
To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/usb/if_axen.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/if_axen.c
diff -u src/sys/dev/usb/if_axen.c:1.31 src/sys/dev/usb/if_axen.c:1.32
--- src/sys/dev/usb/if_axen.c:1.31 Wed Feb 6 08:01:24 2019
+++ src/sys/dev/usb/if_axen.c Wed Feb 6 08:04:08 2019
@@ -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 @@ axen_rxeof(struct usbd_xfer *xfer, void
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 @@ axen_rxeof(struct usbd_xfer *xfer, void
/* 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;