summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2009-10-31 14:31:12 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2009-10-31 14:31:12 +0000
commit761c1c3eb61ee388bcee57ef95f92ff04178fec6 (patch)
tree753d51ff5835ea28f47ac1378f102a6e21f909bc /sys
parent420e5d23dfbecd953bb18aa97462024ddac6954b (diff)
in the absense of link state handling, drivers should still be silent; ok miod
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/mvme68k/dev/if_ie.c13
-rw-r--r--sys/arch/mvme88k/dev/if_ie.c13
-rw-r--r--sys/arch/sparc/dev/if_ie.c13
-rw-r--r--sys/dev/ic/i82596.c15
4 files changed, 26 insertions, 28 deletions
diff --git a/sys/arch/mvme68k/dev/if_ie.c b/sys/arch/mvme68k/dev/if_ie.c
index a3a4888cccc..8d19de4407a 100644
--- a/sys/arch/mvme68k/dev/if_ie.c
+++ b/sys/arch/mvme68k/dev/if_ie.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ie.c,v 1.38 2009/03/01 21:37:41 miod Exp $ */
+/* $OpenBSD: if_ie.c,v 1.39 2009/10/31 14:31:11 deraadt Exp $ */
/*-
* Copyright (c) 1999 Steve Murphree, Jr.
@@ -692,19 +692,14 @@ ietint(sc)
sc->sc_arpcom.ac_if.if_opackets++;
sc->sc_arpcom.ac_if.if_collisions += status & IE_XS_MAXCOLL;
} else if (status & IE_STAT_ABORT) {
- printf("%s: send aborted\n", sc->sc_dev.dv_xname);
sc->sc_arpcom.ac_if.if_oerrors++;
} else if (status & IE_XS_NOCARRIER) {
- printf("%s: no carrier\n", sc->sc_dev.dv_xname);
sc->sc_arpcom.ac_if.if_oerrors++;
} else if (status & IE_XS_LOSTCTS) {
- printf("%s: lost CTS\n", sc->sc_dev.dv_xname);
sc->sc_arpcom.ac_if.if_oerrors++;
} else if (status & IE_XS_UNDERRUN) {
- printf("%s: DMA underrun\n", sc->sc_dev.dv_xname);
sc->sc_arpcom.ac_if.if_oerrors++;
} else if (status & IE_XS_EXCMAX) {
- printf("%s: too many collisions\n", sc->sc_dev.dv_xname);
sc->sc_arpcom.ac_if.if_collisions += 16;
sc->sc_arpcom.ac_if.if_oerrors++;
}
@@ -1496,9 +1491,11 @@ run_tdr(sc, cmd)
if (result & 0x10000)
printf("%s: TDR command failed\n", sc->sc_dev.dv_xname);
- else if (result & IE_TDR_XCVR)
+ else if (result & IE_TDR_XCVR) {
+#ifdef IEDEBUG
printf("%s: transceiver problem\n", sc->sc_dev.dv_xname);
- else if (result & IE_TDR_OPEN)
+#endif
+ } else if (result & IE_TDR_OPEN)
printf("%s: TDR detected an open %d clocks away\n",
sc->sc_dev.dv_xname, result & IE_TDR_TIME);
else if (result & IE_TDR_SHORT)
diff --git a/sys/arch/mvme88k/dev/if_ie.c b/sys/arch/mvme88k/dev/if_ie.c
index 1db59f68422..5b0d2f1054b 100644
--- a/sys/arch/mvme88k/dev/if_ie.c
+++ b/sys/arch/mvme88k/dev/if_ie.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ie.c,v 1.43 2008/11/28 02:44:17 brad Exp $ */
+/* $OpenBSD: if_ie.c,v 1.44 2009/10/31 14:31:11 deraadt Exp $ */
/*-
* Copyright (c) 1998 Steve Murphree, Jr.
@@ -662,19 +662,14 @@ ietint(sc)
sc->sc_arpcom.ac_if.if_opackets++;
sc->sc_arpcom.ac_if.if_collisions += status & IE_XS_MAXCOLL;
} else if (status & IE_STAT_ABORT) {
- printf("%s: send aborted\n", sc->sc_dev.dv_xname);
sc->sc_arpcom.ac_if.if_oerrors++;
} else if (status & IE_XS_NOCARRIER) {
- printf("%s: no carrier\n", sc->sc_dev.dv_xname);
sc->sc_arpcom.ac_if.if_oerrors++;
} else if (status & IE_XS_LOSTCTS) {
- printf("%s: lost CTS\n", sc->sc_dev.dv_xname);
sc->sc_arpcom.ac_if.if_oerrors++;
} else if (status & IE_XS_UNDERRUN) {
- printf("%s: DMA underrun\n", sc->sc_dev.dv_xname);
sc->sc_arpcom.ac_if.if_oerrors++;
} else if (status & IE_XS_EXCMAX) {
- printf("%s: too many collisions\n", sc->sc_dev.dv_xname);
sc->sc_arpcom.ac_if.if_collisions += 16;
sc->sc_arpcom.ac_if.if_oerrors++;
}
@@ -1475,9 +1470,11 @@ run_tdr(sc, cmd)
if (result & 0x10000)
printf("%s: TDR command failed\n", sc->sc_dev.dv_xname);
- else if (result & IE_TDR_XCVR)
+ else if (result & IE_TDR_XCVR) {
+#ifdef IEDEBUG
printf("%s: transceiver problem\n", sc->sc_dev.dv_xname);
- else if (result & IE_TDR_OPEN)
+#endif
+ } else if (result & IE_TDR_OPEN)
printf("%s: TDR detected an open %d clocks away\n",
sc->sc_dev.dv_xname, result & IE_TDR_TIME);
else if (result & IE_TDR_SHORT)
diff --git a/sys/arch/sparc/dev/if_ie.c b/sys/arch/sparc/dev/if_ie.c
index 216ead5c32c..1559d799615 100644
--- a/sys/arch/sparc/dev/if_ie.c
+++ b/sys/arch/sparc/dev/if_ie.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ie.c,v 1.39 2008/11/28 02:44:17 brad Exp $ */
+/* $OpenBSD: if_ie.c,v 1.40 2009/10/31 14:31:11 deraadt Exp $ */
/* $NetBSD: if_ie.c,v 1.33 1997/07/29 17:55:38 fair Exp $ */
/*-
@@ -843,19 +843,14 @@ ietint(sc)
sc->sc_arpcom.ac_if.if_collisions +=
SWAP(status & IE_XS_MAXCOLL);
} else if (status & IE_STAT_ABORT) {
- printf("%s: send aborted\n", sc->sc_dev.dv_xname);
sc->sc_arpcom.ac_if.if_oerrors++;
} else if (status & IE_XS_NOCARRIER) {
- printf("%s: no carrier\n", sc->sc_dev.dv_xname);
sc->sc_arpcom.ac_if.if_oerrors++;
} else if (status & IE_XS_LOSTCTS) {
- printf("%s: lost CTS\n", sc->sc_dev.dv_xname);
sc->sc_arpcom.ac_if.if_oerrors++;
} else if (status & IE_XS_UNDERRUN) {
- printf("%s: DMA underrun\n", sc->sc_dev.dv_xname);
sc->sc_arpcom.ac_if.if_oerrors++;
} else if (status & IE_XS_EXCMAX) {
- printf("%s: too many collisions\n", sc->sc_dev.dv_xname);
sc->sc_arpcom.ac_if.if_collisions += 16;
sc->sc_arpcom.ac_if.if_oerrors++;
}
@@ -1647,9 +1642,11 @@ run_tdr(sc, cmd)
if (result & 0x10000)
printf("%s: TDR command failed\n", sc->sc_dev.dv_xname);
- else if (result & IE_TDR_XCVR)
+ else if (result & IE_TDR_XCVR) {
+#ifdef IEDEBUG
printf("%s: transceiver problem\n", sc->sc_dev.dv_xname);
- else if (result & IE_TDR_OPEN)
+#endif
+ } else if (result & IE_TDR_OPEN)
printf("%s: TDR detected an open %d clocks away\n",
sc->sc_dev.dv_xname, result & IE_TDR_TIME);
else if (result & IE_TDR_SHORT)
diff --git a/sys/dev/ic/i82596.c b/sys/dev/ic/i82596.c
index 29e4a07d01e..76dd85a4a66 100644
--- a/sys/dev/ic/i82596.c
+++ b/sys/dev/ic/i82596.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: i82596.c,v 1.32 2008/11/28 02:44:17 brad Exp $ */
+/* $OpenBSD: i82596.c,v 1.33 2009/10/31 14:31:11 deraadt Exp $ */
/* $NetBSD: i82586.c,v 1.18 1998/08/15 04:42:42 mycroft Exp $ */
/*-
@@ -774,6 +774,7 @@ i82596_tint(sc, scbstatus)
* Check SQE and DEFERRED?
* What if more than one bit is set?
*/
+#ifdef I82596_DEBUG
if (status & IE_STAT_ABORT)
printf("%s: send aborted\n", sc->sc_dev.dv_xname);
else if (status & IE_XS_NOCARRIER)
@@ -782,9 +783,13 @@ i82596_tint(sc, scbstatus)
printf("%s: lost CTS\n", sc->sc_dev.dv_xname);
else if (status & IE_XS_UNDERRUN)
printf("%s: DMA underrun\n", sc->sc_dev.dv_xname);
- else if (status & IE_XS_EXCMAX) {
+ else
+#endif /* I82596_DEBUG */
+ if (status & IE_XS_EXCMAX) {
+#ifdef I82596_DEBUG
printf("%s: too many collisions\n",
sc->sc_dev.dv_xname);
+#endif /* I82596_DEBUG */
sc->sc_arpcom.ac_if.if_collisions += 16;
}
}
@@ -1444,9 +1449,11 @@ ie_run_tdr(sc, cmd)
clocks = result & IE_TDR_TIME;
if (result & 0x10000)
printf("%s: TDR command failed\n", sc->sc_dev.dv_xname);
- else if (result & IE_TDR_XCVR)
+ else if (result & IE_TDR_XCVR) {
+#ifdef I82596_DEBUG
printf("%s: transceiver problem\n", sc->sc_dev.dv_xname);
- else if (result & IE_TDR_OPEN)
+#endif
+ } else if (result & IE_TDR_OPEN)
printf("%s: TDR detected an open %d clock%s away\n",
sc->sc_dev.dv_xname, clocks, clocks == 1? "":"s");
else if (result & IE_TDR_SHORT)