diff options
author | Aaron Campbell <aaron@cvs.openbsd.org> | 2000-09-13 00:29:36 +0000 |
---|---|---|
committer | Aaron Campbell <aaron@cvs.openbsd.org> | 2000-09-13 00:29:36 +0000 |
commit | 5318fa8111a8c9c31324ef9be06eba457179d74e (patch) | |
tree | 68dcfb14aba40c87ec8d9171152271811d8c536d /sys/dev/pci | |
parent | 649fe45183556cd0cf7acc03c0d89ec907ae9a12 (diff) |
Sync with FreeBSD. Finally make the OpenBSD-specific changes necessary to make
non-MII 21143-based cards work. The sync just fixes the LED handling on these
kinds of adapters.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/if_dc_pci.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/sys/dev/pci/if_dc_pci.c b/sys/dev/pci/if_dc_pci.c index e9119d366f7..59a8b575789 100644 --- a/sys/dev/pci/if_dc_pci.c +++ b/sys/dev/pci/if_dc_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_dc_pci.c,v 1.5 2000/08/02 19:01:07 aaron Exp $ */ +/* $OpenBSD: if_dc_pci.c,v 1.6 2000/09/13 00:29:35 aaron Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -380,6 +380,23 @@ void dc_pci_attach(parent, self, aux) } /* + * If we discover later (in dc_attach_common()) that we have an + * MII with no PHY, 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 mii_phy_probe() returns an error, we leave the DC_TULIP_LEDS + * bit set, else we clear it. Since our dc(4) driver is split into + * bus-dependent and bus-independent parts, we must do set this bit + * here while we are able to do PCI configuration reads. + */ + if (DC_IS_INTEL(sc)) { + if (pci_conf_read(pc, pa->pa_tag, DC_PCI_CSID) != 0x80281033) + sc->dc_flags |= DC_TULIP_LEDS; + } + + /* * Try to learn something about the supported media. * We know that ASIX and ADMtek and Davicom devices * will *always* be using MII media, so that's a no-brainer. |