From bf645417629c28dc024f71b8662d5d7f0ef44d4e Mon Sep 17 00:00:00 2001 From: Bill Paul Date: Mon, 7 Aug 2000 17:03:20 +0000 Subject: [PATCH] Close PR 20438. Make fix for preserving LED settings conditional on presence Intel 21143 chip. --- sys/dev/dc/if_dc.c | 10 +++++++--- sys/pci/if_dc.c | 10 +++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/sys/dev/dc/if_dc.c b/sys/dev/dc/if_dc.c index 6699d83dfba8..f0f1608b00f6 100644 --- a/sys/dev/dc/if_dc.c +++ b/sys/dev/dc/if_dc.c @@ -1223,10 +1223,14 @@ static void dc_setcfg(sc, media) if (sc->dc_pmode == DC_PMODE_MII) { int watchdogreg; + if (DC_IS_INTEL(sc)) { /* 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; + watchdogreg = CSR_READ_4(sc, DC_WATCHDOG); + watchdogreg &= ~DC_WDOG_CTLWREN; + watchdogreg |= DC_WDOG_JABBERDIS; + } 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) diff --git a/sys/pci/if_dc.c b/sys/pci/if_dc.c index 6699d83dfba8..f0f1608b00f6 100644 --- a/sys/pci/if_dc.c +++ b/sys/pci/if_dc.c @@ -1223,10 +1223,14 @@ static void dc_setcfg(sc, media) if (sc->dc_pmode == DC_PMODE_MII) { int watchdogreg; + if (DC_IS_INTEL(sc)) { /* 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; + watchdogreg = CSR_READ_4(sc, DC_WATCHDOG); + watchdogreg &= ~DC_WDOG_CTLWREN; + watchdogreg |= DC_WDOG_JABBERDIS; + } 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)