Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic The rx descriptor ring bug happens quite often, s...
details: https://anonhg.NetBSD.org/src/rev/9bf0635f0872
branches: trunk
changeset: 572215:9bf0635f0872
user: dyoung <dyoung%NetBSD.org@localhost>
date: Sat Dec 25 07:45:53 2004 +0000
description:
The rx descriptor ring bug happens quite often, so printf'ing
occurrences is annoying. Only printf about it when rtw_debug
contains RTW_DEBUG_BUG.
diffstat:
sys/dev/ic/rtw.c | 12 +++++++-----
sys/dev/ic/rtwvar.h | 46 +++++++++++++++++++++++-----------------------
2 files changed, 30 insertions(+), 28 deletions(-)
diffs (100 lines):
diff -r 1a9fa585fc3c -r 9bf0635f0872 sys/dev/ic/rtw.c
--- a/sys/dev/ic/rtw.c Sat Dec 25 07:24:17 2004 +0000
+++ b/sys/dev/ic/rtw.c Sat Dec 25 07:45:53 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rtw.c,v 1.22 2004/12/25 07:24:17 dyoung Exp $ */
+/* $NetBSD: rtw.c,v 1.23 2004/12/25 07:45:53 dyoung Exp $ */
/*-
* Copyright (c) 2004, 2005 David Young. All rights reserved.
*
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rtw.c,v 1.22 2004/12/25 07:24:17 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtw.c,v 1.23 2004/12/25 07:45:53 dyoung Exp $");
#include "bpfilter.h"
@@ -1292,8 +1292,9 @@
hrx = &sc->sc_rxdesc[0];
if ((hrx->hrx_stat & htole32(RTW_RXSTAT_OWN)) != 0)
break;
- printf("%s: NIC skipped to rxdesc[0]\n",
- sc->sc_dev.dv_xname);
+ RTW_DPRINTF(RTW_DEBUG_BUGS,
+ ("%s: NIC skipped to rxdesc[0]\n",
+ sc->sc_dev.dv_xname));
next = 0;
continue;
}
@@ -1705,7 +1706,8 @@
if ((isr & (RTW_INTR_RDU|RTW_INTR_RXFOVW)) == 0)
return;
- printf("%s: restarting xmit/recv\n", sc->sc_dev.dv_xname);
+ RTW_DPRINTF(RTW_DEBUG_BUGS, ("%s: restarting xmit/recv\n",
+ sc->sc_dev.dv_xname));
rtw_dump_rings(sc);
diff -r 1a9fa585fc3c -r 9bf0635f0872 sys/dev/ic/rtwvar.h
--- a/sys/dev/ic/rtwvar.h Sat Dec 25 07:24:17 2004 +0000
+++ b/sys/dev/ic/rtwvar.h Sat Dec 25 07:45:53 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rtwvar.h,v 1.8 2004/12/25 06:58:37 dyoung Exp $ */
+/* $NetBSD: rtwvar.h,v 1.9 2004/12/25 07:45:53 dyoung Exp $ */
/*-
* Copyright (c) 2004, 2005 David Young. All rights reserved.
*
@@ -37,28 +37,28 @@
#include <sys/callout.h>
#ifdef RTW_DEBUG
-#define RTW_DEBUG_TUNE 0x00001
-#define RTW_DEBUG_PKTFILT 0x00002
-#define RTW_DEBUG_XMIT 0x00004
-#define RTW_DEBUG_XMIT_DESC 0x00008
-#define RTW_DEBUG_NODE 0x00010
-#define RTW_DEBUG_PWR 0x00020
-#define RTW_DEBUG_ATTACH 0x00040
-#define RTW_DEBUG_REGDUMP 0x00080
-#define RTW_DEBUG_ACCESS 0x00100
-#define RTW_DEBUG_RESET 0x00200
-#define RTW_DEBUG_INIT 0x00400
-#define RTW_DEBUG_IOSTATE 0x00800
-#define RTW_DEBUG_RECV 0x01000
-#define RTW_DEBUG_RECV_DESC 0x02000
-#define RTW_DEBUG_IO_KICK 0x04000
-#define RTW_DEBUG_INTR 0x08000
-#define RTW_DEBUG_PHY 0x10000
-#define RTW_DEBUG_PHYIO 0x20000
-#define RTW_DEBUG_PHYBITIO 0x40000
-#define RTW_DEBUG_TIMEOUT 0x80000
-
-#define RTW_DEBUG_MAX 0x7ffff
+#define RTW_DEBUG_TUNE 0x000001
+#define RTW_DEBUG_PKTFILT 0x000002
+#define RTW_DEBUG_XMIT 0x000004
+#define RTW_DEBUG_XMIT_DESC 0x000008
+#define RTW_DEBUG_NODE 0x000010
+#define RTW_DEBUG_PWR 0x000020
+#define RTW_DEBUG_ATTACH 0x000040
+#define RTW_DEBUG_REGDUMP 0x000080
+#define RTW_DEBUG_ACCESS 0x000100
+#define RTW_DEBUG_RESET 0x000200
+#define RTW_DEBUG_INIT 0x000400
+#define RTW_DEBUG_IOSTATE 0x000800
+#define RTW_DEBUG_RECV 0x001000
+#define RTW_DEBUG_RECV_DESC 0x002000
+#define RTW_DEBUG_IO_KICK 0x004000
+#define RTW_DEBUG_INTR 0x008000
+#define RTW_DEBUG_PHY 0x010000
+#define RTW_DEBUG_PHYIO 0x020000
+#define RTW_DEBUG_PHYBITIO 0x040000
+#define RTW_DEBUG_TIMEOUT 0x080000
+#define RTW_DEBUG_BUGS 0x100000
+#define RTW_DEBUG_MAX 0x1fffff
extern int rtw_debug;
#define RTW_DPRINTF(__flags, __x) \
Home |
Main Index |
Thread Index |
Old Index