Subject: Re: Panic in latest -current with fxp0
To: Patrick Hartling <patrick@137.org>
From: Johan Danielsson <joda@pdc.kth.se>
List: current-users
Date: 11/19/1999 13:53:28
Patrick Hartling <patrick@137.org> writes:

Hi,

Could you back out of Bill's patch and try this instead? I think I
have an idea on how to fix this, but it would be interesting to see
what this does on a real 557.

/Johan

--- i82557.c	1999/11/12 18:14:18	1.12
+++ i82557.c	1999/11/19 12:49:55
@@ -504,8 +504,10 @@
 		if((data & 0xc000) == 0x4000)
 			break;
 	}
-	if(sc->sc_eeprom_size > 8)
-		panic("%s: failed to get EEPROM size", sc->sc_dev.dv_xname);
+	if(sc->sc_eeprom_size > 8) {
+	    printf("%s: failed to detect EEPROM size", sc->sc_dev.dv_xname);
+	    sc->sc_eeprom_size = 6;
+	}
 #ifdef DEBUG
 	printf("%s: assuming %d word EEPROM\n", 
 	       sc->sc_dev.dv_xname, 
@@ -575,9 +577,11 @@
 			CSR_WRITE_2(sc, FXP_CSR_EEPROMCONTROL,
 			    reg | FXP_EEPROM_EESK);
 			DELAY(1);
+			printf("%04x ", CSR_READ_2(sc, FXP_CSR_EEPROMCONTROL));
 			CSR_WRITE_2(sc, FXP_CSR_EEPROMCONTROL, reg);
 			DELAY(1);
 		}
+		printf("\n");
 		reg = FXP_EEPROM_EECS;
 		data[i] = 0;
 		/*