diff options
author | wpaul <wpaul@FreeBSD.org> | 2000-09-07 18:51:04 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 2000-09-07 18:51:04 +0000 |
commit | e7db16f40776c80240ba3488d1e97376a935c423 (patch) | |
tree | 5744f4c213c2de1bb842cbdc4e0840da15a7927c /sys/pci/if_dc.c | |
parent | feadccca5dfe85a58bf6670d8065703640a13be6 (diff) | |
download | FreeBSD-src-e7db16f40776c80240ba3488d1e97376a935c423.zip FreeBSD-src-e7db16f40776c80240ba3488d1e97376a935c423.tar.gz |
Special-case the LED twiddling code so that it doesn't do anything
on the NEC VersaPro NoteBook PC. This 21143 implementation has no LEDs,
and flipping the LED control bits somehow stops it from establishing
a link. We check the subsystem ID and don't flip the LED control
bits for the NEC NIC.
Diffstat (limited to 'sys/pci/if_dc.c')
-rw-r--r-- | sys/pci/if_dc.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sys/pci/if_dc.c b/sys/pci/if_dc.c index 659fa87..1b069c7 100644 --- a/sys/pci/if_dc.c +++ b/sys/pci/if_dc.c @@ -1759,6 +1759,15 @@ static int dc_attach(dev) sc->dc_flags |= DC_21143_NWAY; mii_phy_probe(dev, &sc->dc_miibus, dc_ifmedia_upd, dc_ifmedia_sts); + /* + * For non-MII cards, we need to have the 21143 + * drive the LEDs. Except there are some systems + * like the NEC VersaPro NoteBook PC which have no + * LEDs, and twiddling these bits has adverse effects + * on them. (I.e. you suddenly can't get a link.) + */ + if (pci_read_config(dev, DC_PCI_CSID, 4) != 0x80281033) + sc->dc_flags |= DC_TULIP_LEDS; error = 0; } @@ -2730,10 +2739,10 @@ static void dc_init(xsc) * MII port, program the LED control pins so we get * link and activity indications. */ - if (DC_IS_INTEL(sc) && sc->dc_pmode == DC_PMODE_SYM) { + if (sc->dc_flags & DC_TULIP_LEDS) { CSR_WRITE_4(sc, DC_WATCHDOG, DC_WDOG_CTLWREN|DC_WDOG_LINK|DC_WDOG_ACTIVITY); - CSR_WRITE_4(sc, DC_WATCHDOG, DC_WDOG_LINK|DC_WDOG_ACTIVITY); + CSR_WRITE_4(sc, DC_WATCHDOG, 0); } /* |