summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/ic/i82596.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/dev/ic/i82596.c b/sys/dev/ic/i82596.c
index e334b5cc2f7..88b32fc309e 100644
--- a/sys/dev/ic/i82596.c
+++ b/sys/dev/ic/i82596.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: i82596.c,v 1.15 2002/10/30 20:21:41 mickey Exp $ */
+/* $OpenBSD: i82596.c,v 1.16 2002/11/01 19:56:13 mickey Exp $ */
/* $NetBSD: i82586.c,v 1.18 1998/08/15 04:42:42 mycroft Exp $ */
/*-
@@ -1411,7 +1411,7 @@ ie_run_tdr(sc, cmd)
struct ie_softc *sc;
int cmd;
{
- int result;
+ int result, clocks;
i82596_simple_command(sc, IE_CMD_TDR, cmd);
(sc->ie_bus_write16)(sc, IE_CMD_TDR_TIME(cmd), 0);
@@ -1428,22 +1428,22 @@ ie_run_tdr(sc, cmd)
if (result & IE_TDR_SUCCESS)
return;
+ 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)
printf("%s: transceiver problem\n", sc->sc_dev.dv_xname);
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);
+ 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)
- printf("%s: TDR detected a short %d clocks away\n",
- sc->sc_dev.dv_xname, result & IE_TDR_TIME);
+ printf("%s: TDR detected a short %d clock%s away\n",
+ sc->sc_dev.dv_xname, clocks, clocks == 1? "":"s");
else
printf("%s: TDR returned unknown status 0x%x\n",
- sc->sc_dev.dv_xname, result);
+ sc->sc_dev.dv_xname, result);
}
-
/*
* i82596_setup_bufs: set up the buffers
*