Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci Also use prom_getether() under NetBSD-sparc(64) ...



details:   https://anonhg.NetBSD.org/src/rev/94dc97a550e8
branches:  trunk
changeset: 582012:94dc97a550e8
user:      tron <tron%NetBSD.org@localhost>
date:      Mon Jun 13 16:37:38 2005 +0000

description:
Also use prom_getether() under NetBSD-sparc(64) if the MAC address
retrieved from the PROM starts with ff:ff:ff. The driver now works with
the onboard interface in the Tadpole SPARCle.

diffstat:

 sys/dev/pci/if_tlp_pci.c |  12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diffs (33 lines):

diff -r cf634bee0e01 -r 94dc97a550e8 sys/dev/pci/if_tlp_pci.c
--- a/sys/dev/pci/if_tlp_pci.c  Mon Jun 13 15:28:04 2005 +0000
+++ b/sys/dev/pci/if_tlp_pci.c  Mon Jun 13 16:37:38 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_tlp_pci.c,v 1.78 2005/02/27 00:27:33 perry Exp $    */
+/*     $NetBSD: if_tlp_pci.c,v 1.79 2005/06/13 16:37:38 tron Exp $     */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2002 The NetBSD Foundation, Inc.
@@ -43,7 +43,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_tlp_pci.c,v 1.78 2005/02/27 00:27:33 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_tlp_pci.c,v 1.79 2005/06/13 16:37:38 tron Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -909,8 +909,12 @@
                 */
                if (!tlp_isv_srom_enaddr(sc, enaddr)) {
 #ifdef __sparc__
-                       if (!sc->sc_srom[20] && !sc->sc_srom[21] &&
-                           !sc->sc_srom[22]) {
+                       if ((sc->sc_srom[20] == 0 &&
+                            sc->sc_srom[21] == 0 &&
+                            sc->sc_srom[22] == 0) ||
+                           (sc->sc_srom[20] == 0xff &&
+                            sc->sc_srom[21] == 0xff &&
+                            sc->sc_srom[22] == 0xff)) {
                                prom_getether(PCITAG_NODE(pa->pa_tag), enaddr);
                        } else
 #endif



Home | Main Index | Thread Index | Old Index