summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2002-03-22 05:37:49 +0000
committerJason Wright <jason@cvs.openbsd.org>2002-03-22 05:37:49 +0000
commitb2b8e07c2e0a5936eaab12a8b751e0b1c1c2bc0f (patch)
tree3e65b35102841262a14ddccf9267ba49f7aed6d9 /sys
parentfcb31de5806d4c18853916128f7028de7c88a63c (diff)
On sparc64, try local-mac-address before falling back to myetheraddr()
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/if_dc_pci.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/dev/pci/if_dc_pci.c b/sys/dev/pci/if_dc_pci.c
index b89796b6fba..24379b85c24 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.28 2002/03/14 01:26:58 millert Exp $ */
+/* $OpenBSD: if_dc_pci.c,v 1.29 2002/03/22 05:37:48 jason Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -72,6 +72,10 @@
#include <dev/pci/pcivar.h>
#include <dev/pci/pcidevs.h>
+#ifdef __sparc64__
+#include <dev/ofw/openfirm.h>
+#endif
+
#define DC_USEIOSPACE
#include <dev/ic/dcreg.h>
@@ -464,7 +468,10 @@ void dc_pci_attach(parent, self, aux)
#ifdef __sparc64__
{
extern void myetheraddr(u_char *);
- myetheraddr(sc->arpcom.ac_enaddr);
+
+ if (OF_getprop(PCITAG_NODE(pa->pa_tag), "local-mac-address",
+ sc->arpcom.ac_enaddr, ETHER_ADDR_LEN) <= 0)
+ myetheraddr(sc->arpcom.ac_enaddr);
sc->sc_hasmac = 1;
}
#endif