summaryrefslogtreecommitdiffstats
path: root/sys/dev/ed
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1993-10-23 04:52:41 +0000
committerdg <dg@FreeBSD.org>1993-10-23 04:52:41 +0000
commit788f37f77073bd042a29e2c5e180928c864b2d89 (patch)
treea7f98bc801a587b9bbedba434d0488341cb89603 /sys/dev/ed
parentf2d92ac771af0df626fb87977421840bc4c6e316 (diff)
downloadFreeBSD-src-788f37f77073bd042a29e2c5e180928c864b2d89.zip
FreeBSD-src-788f37f77073bd042a29e2c5e180928c864b2d89.tar.gz
* Revision 2.11 1993/10/23 04:21:03 davidg
* Novell probe changed to be invasive because of too many complaints * about some clone boards not being reset properly and thus not * found on a warmboot. Yuck. * * Revision 2.10 1993/10/23 04:07:12 davidg * increment output errors if the device times out (done via watchdog) * * Revision 2.9 1993/10/23 04:01:45 davidg * increment input error counter if a packet with a bad length is * detected.
Diffstat (limited to 'sys/dev/ed')
-rw-r--r--sys/dev/ed/if_ed.c40
1 files changed, 31 insertions, 9 deletions
diff --git a/sys/dev/ed/if_ed.c b/sys/dev/ed/if_ed.c
index cbbb5a8..91eb929 100644
--- a/sys/dev/ed/if_ed.c
+++ b/sys/dev/ed/if_ed.c
@@ -20,12 +20,24 @@
*/
/*
- * $Id: if_ed.c,v 2.8 1993/10/15 10:59:56 davidg Exp davidg $
+ * $Id: if_ed.c,v 2.11 1993/10/23 04:21:03 davidg Exp davidg $
*/
/*
* Modification history
*
+ * Revision 2.11 1993/10/23 04:21:03 davidg
+ * Novell probe changed to be invasive because of too many complaints
+ * about some clone boards not being reset properly and thus not
+ * found on a warmboot. Yuck.
+ *
+ * Revision 2.10 1993/10/23 04:07:12 davidg
+ * increment output errors if the device times out (done via watchdog)
+ *
+ * Revision 2.9 1993/10/23 04:01:45 davidg
+ * increment input error counter if a packet with a bad length is
+ * detected.
+ *
* Revision 2.8 1993/10/15 10:59:56 davidg
* increase maximum time to wait for transmit DMA to complete to 120us.
* call ed_reset() if the time limit is reached instead of trying
@@ -810,6 +822,7 @@ ed_probe_Novell(isa_dev)
/* Reset the board */
tmp = inb(sc->asic_addr + ED_NOVELL_RESET);
+#if 0
/*
* This total and completely screwy thing is to work around braindamage
* in some NE compatible boards. Why it works, I have *no* idea.
@@ -817,28 +830,33 @@ ed_probe_Novell(isa_dev)
* will lock up the ISA bus if they see an inb first. Weird.
*/
outb(0x84, 0);
- DELAY(5000);
-
- /* Make sure that we really have an 8390 based board */
- if (!ed_probe_generic8390(sc))
- return(0);
+#endif
-#if 0
/*
* I don't know if this is necessary; probably cruft leftover from
* Clarkson packet driver code. Doesn't do a thing on the boards
- * I've tested. -DG
+ * I've tested. -DG [note that a outb(0x84, 0) seems to work
+ * here, and is non-invasive...but some boards don't seem to reset
+ * and I don't have complete documentation on what the 'right'
+ * thing to do is...so we do the invasive thing for now. Yuck.]
*/
outb(sc->asic_addr + ED_NOVELL_RESET, tmp);
DELAY(5000);
-#endif
/*
* This is needed because some NE clones apparently don't reset the
* NIC properly (or the NIC chip doesn't reset fully on power-up)
+ * XXX - this makes the probe invasive! ...Done against my better
+ * judgement. -DLG
*/
outb(sc->nic_addr + ED_P0_CR, ED_CR_RD2|ED_CR_STP);
+ DELAY(5000);
+
+ /* Make sure that we really have an 8390 based board */
+ if (!ed_probe_generic8390(sc))
+ return(0);
+
sc->vendor = ED_VENDOR_NOVELL;
sc->mem_shared = 0;
isa_dev->id_maddr = 0;
@@ -1082,7 +1100,10 @@ int
ed_watchdog(unit)
int unit;
{
+ struct ed_softc *sc = &ed_softc[unit];
+
log(LOG_ERR, "ed%d: device timeout\n", unit);
+ ++sc->arpcom.ac_if.if_oerrors;
ed_reset(unit);
}
@@ -1552,6 +1573,7 @@ ed_rint(unit)
log(LOG_ERR,
"ed%d: NIC memory corrupt - invalid packet length %d\n",
unit, len);
+ ++sc->arpcom.ac_if.if_ierrors;
ed_reset(unit);
return;
}
OpenPOWER on IntegriCloud