summaryrefslogtreecommitdiffstats
path: root/sys/pci/if_dc.c
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>2000-10-14 00:40:14 +0000
committerwpaul <wpaul@FreeBSD.org>2000-10-14 00:40:14 +0000
commit8797734d9a8173cea23f7ef08b04af14a00fad96 (patch)
treef46574ed4b9a04220da7ae5966784e00a2c69cbd /sys/pci/if_dc.c
parentb894914ffdbc444483eedb55517a0fbb53981c3e (diff)
downloadFreeBSD-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/pci/if_dc.c')
-rw-r--r--sys/pci/if_dc.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/sys/pci/if_dc.c b/sys/pci/if_dc.c
index 38475ab..893da20 100644
--- a/sys/pci/if_dc.c
+++ b/sys/pci/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)
OpenPOWER on IntegriCloud