Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb count collisions, count and debug print more err...
details: https://anonhg.NetBSD.org/src/rev/d3cec7235e94
branches: trunk
changeset: 339653:d3cec7235e94
user: mlelstv <mlelstv%NetBSD.org@localhost>
date: Sun Aug 02 11:55:28 2015 +0000
description:
count collisions, count and debug print more errors.
diffstat:
sys/dev/usb/if_smsc.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diffs (23 lines):
diff -r d72128cc5d33 -r d3cec7235e94 sys/dev/usb/if_smsc.c
--- a/sys/dev/usb/if_smsc.c Sun Aug 02 11:40:41 2015 +0000
+++ b/sys/dev/usb/if_smsc.c Sun Aug 02 11:55:28 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_smsc.c,v 1.23 2015/04/13 16:33:25 riastradh Exp $ */
+/* $NetBSD: if_smsc.c,v 1.24 2015/08/02 11:55:28 mlelstv Exp $ */
/* $OpenBSD: if_smsc.c,v 1.4 2012/09/27 12:38:11 jsg Exp $ */
/* $FreeBSD: src/sys/dev/usb/net/if_smsc.c,v 1.1 2012/08/15 04:03:55 gonzo Exp $ */
@@ -1294,7 +1294,12 @@
buf += sizeof(rxhdr);
total_len -= sizeof(rxhdr);
- if (rxhdr & SMSC_RX_STAT_ERROR) {
+ if (rxhdr & SMSC_RX_STAT_COLLISION)
+ ifp->if_collisions++;
+
+ if (rxhdr & (SMSC_RX_STAT_ERROR
+ | SMSC_RX_STAT_LENGTH_ERROR
+ | SMSC_RX_STAT_MII_ERROR)) {
smsc_dbg_printf(sc, "rx error (hdr 0x%08x)\n", rxhdr);
ifp->if_ierrors++;
goto done;
Home |
Main Index |
Thread Index |
Old Index