diff options
author | wpaul <wpaul@FreeBSD.org> | 2000-10-14 00:40:14 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 2000-10-14 00:40:14 +0000 |
commit | 8797734d9a8173cea23f7ef08b04af14a00fad96 (patch) | |
tree | f46574ed4b9a04220da7ae5966784e00a2c69cbd /sys/dev/dc | |
parent | b894914ffdbc444483eedb55517a0fbb53981c3e (diff) | |
download | FreeBSD-src-8797734d9a8173cea23f7ef08b04af14a00fad96.zip FreeBSD-src-8797734d9a8173cea23f7ef08b04af14a00fad96.tar.gz |
Clean up a few things in dc_setcfg() pointed out to be me by
aaron@openbsd.com on IRC earlier today.
Diffstat (limited to 'sys/dev/dc')
-rw-r--r-- | sys/dev/dc/if_dc.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/sys/dev/dc/if_dc.c b/sys/dev/dc/if_dc.c index 38475ab..893da20 100644 --- a/sys/dev/dc/if_dc.c +++ b/sys/dev/dc/if_dc.c @@ -1219,6 +1219,7 @@ static void dc_setcfg(sc, media) watchdogreg = CSR_READ_4(sc, DC_WATCHDOG); watchdogreg &= ~DC_WDOG_CTLWREN; watchdogreg |= DC_WDOG_JABBERDIS; + CSR_WRITE_4(sc, DC_WATCHDOG, watchdogreg); } else { DC_SETBIT(sc, DC_WATCHDOG, DC_WDOG_JABBERDIS); } @@ -1253,10 +1254,14 @@ static void dc_setcfg(sc, media) int watchdogreg; /* there's a write enable bit here that reads as 1 */ - watchdogreg = CSR_READ_4(sc, DC_WATCHDOG); - watchdogreg &= ~DC_WDOG_CTLWREN; - watchdogreg |= DC_WDOG_JABBERDIS; - CSR_WRITE_4(sc, DC_WATCHDOG, watchdogreg); + if (DC_IS_INTEL(sc)) { + watchdogreg = CSR_READ_4(sc, DC_WATCHDOG); + watchdogreg &= ~DC_WDOG_CTLWREN; + watchdogreg |= DC_WDOG_JABBERDIS; + CSR_WRITE_4(sc, DC_WATCHDOG, watchdogreg); + } else { + DC_SETBIT(sc, DC_WATCHDOG, DC_WDOG_JABBERDIS); + } DC_CLRBIT(sc, DC_NETCFG, (DC_NETCFG_PCS| DC_NETCFG_PORTSEL|DC_NETCFG_SCRAMBLER)); if (sc->dc_type == DC_TYPE_98713) |