From 129eaf79963d8242f56272b9e55e7761c8c7d871 Mon Sep 17 00:00:00 2001 From: Martin Blapp Date: Tue, 16 Sep 2003 05:01:27 +0000 Subject: Don't read the MAC address from a copy of the EEPROM in the softc that has been recorded earlier and overwrite it again later by reading it directly from the EEPROM again. Read the MAC address from the PAR0/PAR1 registers instead, which are autoloaded on reboot. Tested on AN985, AN983B. According to the datasheets, it should also work for the AL981 (I don't have such a chip on a card at home) PR: 52988 Submitted by: Andrew Gordon MFC after: 2 weeks --- sys/dev/dc/if_dc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/dc/if_dc.c b/sys/dev/dc/if_dc.c index 8ddf66144647d..4e284d39cc201 100644 --- a/sys/dev/dc/if_dc.c +++ b/sys/dev/dc/if_dc.c @@ -1957,7 +1957,7 @@ dc_attach(device_t dev) sc->dc_flags |= DC_TX_USE_TX_INTR; sc->dc_flags |= DC_TX_ADMTEK_WAR; sc->dc_pmode = DC_PMODE_MII; - dc_read_srom(sc, sc->dc_romwidth); + /* Don't read SROM for - auto-loaded on reset */ break; case DC_DEVICEID_98713: case DC_DEVICEID_98713_CP: @@ -2091,9 +2091,8 @@ dc_attach(device_t dev) break; case DC_TYPE_AL981: case DC_TYPE_AN985: - bcopy(sc->dc_srom + DC_AL_EE_NODEADDR, &eaddr, - ETHER_ADDR_LEN); - dc_read_eeprom(sc, (caddr_t)&eaddr, DC_AL_EE_NODEADDR, 3, 0); + *(u_int32_t *)(&eaddr[0]) = CSR_READ_4(sc, DC_AL_PAR0); + *(u_int16_t *)(&eaddr[4]) = CSR_READ_4(sc, DC_AL_PAR1); break; case DC_TYPE_CONEXANT: bcopy(sc->dc_srom + DC_CONEXANT_EE_NODEADDR, &eaddr, -- cgit v1.3