diff options
author | Jason Wright <jason@cvs.openbsd.org> | 2002-03-13 21:02:55 +0000 |
---|---|---|
committer | Jason Wright <jason@cvs.openbsd.org> | 2002-03-13 21:02:55 +0000 |
commit | e84ad2bef8db5fd0a873f86b5d33d9f6569a7259 (patch) | |
tree | 1e8a6a9c89417b99c58123d1337057bbc12c206b /sys/dev/pci | |
parent | cf5a84cb38061c273adab5a1e9e7d7faa929e3c6 (diff) |
Fetch mac address from local-mac-address property, and use myetheraddr() only
if it fails. (The right thing to do is have myetheraddr() do this, but
that will come later).
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/if_hme_pci.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/pci/if_hme_pci.c b/sys/dev/pci/if_hme_pci.c index 00f508d4519..5740d6416f1 100644 --- a/sys/dev/pci/if_hme_pci.c +++ b/sys/dev/pci/if_hme_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_hme_pci.c,v 1.4 2001/12/14 01:25:29 drahn Exp $ */ +/* $OpenBSD: if_hme_pci.c,v 1.5 2002/03/13 21:02:54 jason Exp $ */ /* $NetBSD: if_hme_pci.c,v 1.3 2000/12/28 22:59:13 sommerfeld Exp $ */ /* @@ -57,6 +57,7 @@ #ifdef __sparc64__ #include <machine/autoconf.h> +#include <dev/ofw/openfirm.h> #endif #include <machine/cpu.h> @@ -159,7 +160,9 @@ hmeattach_pci(parent, self, aux) sc->sc_mif = hsc->hsc_memh + 0x7000; #ifdef __sparc__ - myetheraddr(sc->sc_enaddr); + if (OF_getprop(PCITAG_NODE(pa->pa_tag), "local-mac-address", + sc->sc_enaddr, ETHER_ADDR_LEN) <= 0) + myetheraddr(sc->sc_enaddr); #endif #ifdef __powerpc__ pci_ether_hw_addr(pa->pa_pc, sc->sc_enaddr); |