From ee7afa77b231b6a9784d3f941a1216b592527490 Mon Sep 17 00:00:00 2001 From: matt Date: Fri, 7 Dec 2001 21:13:58 +0000 Subject: [PATCH] Fix sense of if to grab address from alternation if srom is not in isv format on Davicom chips. Add sparc specific case in this case to call myetheraddr if oui is all 0s (for Netra X1). --- sys/dev/pci/if_tlp_pci.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/sys/dev/pci/if_tlp_pci.c b/sys/dev/pci/if_tlp_pci.c index 481af06b86d3..c005e8ecc337 100644 --- a/sys/dev/pci/if_tlp_pci.c +++ b/sys/dev/pci/if_tlp_pci.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_tlp_pci.c,v 1.55 2001/11/13 07:48:45 lukem Exp $ */ +/* $NetBSD: if_tlp_pci.c,v 1.56 2001/12/07 21:13:58 matt Exp $ */ /*- * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc. @@ -43,7 +43,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_tlp_pci.c,v 1.55 2001/11/13 07:48:45 lukem Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_tlp_pci.c,v 1.56 2001/12/07 21:13:58 matt Exp $"); #include "opt_tlp.h" @@ -911,8 +911,16 @@ tlp_pci_attach(parent, self, aux) * be in an ISV SROM anyhow, tho ISV can cope with * multi-port boards). */ - if (tlp_isv_srom_enaddr(sc, enaddr)) + if (!tlp_isv_srom_enaddr(sc, enaddr)) { +#ifdef __sparc__ + if (!sc->sc_srom[20] && !sc->sc_srom[21] && + !sc->sc_srom[22]) { + extern void myetheraddr __P((u_char *)); + myetheraddr(enaddr); + } else +#endif memcpy(enaddr, &sc->sc_srom[20], ETHER_ADDR_LEN); + } /* * Davicom chips all have an internal MII interface