Module Name:    src
Committed By:   martin
Date:           Sun Jan 24 23:27:40 UTC 2010

Modified Files:
        src/sys/dev/pci: if_bge.c

Log Message:
Do not try to read the EEPROM if we already know we don't have one.


To generate a diff of this commit:
cvs rdiff -u -r1.174 -r1.175 src/sys/dev/pci/if_bge.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/if_bge.c
diff -u src/sys/dev/pci/if_bge.c:1.174 src/sys/dev/pci/if_bge.c:1.175
--- src/sys/dev/pci/if_bge.c:1.174	Sun Jan 24 23:09:26 2010
+++ src/sys/dev/pci/if_bge.c	Sun Jan 24 23:27:39 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_bge.c,v 1.174 2010/01/24 23:09:26 martin Exp $	*/
+/*	$NetBSD: if_bge.c,v 1.175 2010/01/24 23:27:39 martin Exp $	*/
 
 /*
  * Copyright (c) 2001 Wind River Systems
@@ -79,7 +79,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.174 2010/01/24 23:09:26 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.175 2010/01/24 23:27:39 martin Exp $");
 
 #include "vlan.h"
 #include "rnd.h"
@@ -2792,7 +2792,7 @@
 	 */
 	if (bge_readmem_ind(sc, BGE_SOFTWARE_GENCOMM_SIG) == BGE_MAGIC_NUMBER) {
 		hwcfg = bge_readmem_ind(sc, BGE_SOFTWARE_GENCOMM_NICCFG);
-	} else {
+	} else if (!(sc->bge_flags & BGE_NO_EEPROM)) {
 		bge_read_eeprom(sc, (void *)&hwcfg,
 		    BGE_EE_HWCFG_OFFSET, sizeof(hwcfg));
 		hwcfg = be32toh(hwcfg);

Reply via email to