diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2005-01-08 06:03:00 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2005-01-08 06:03:00 +0000 |
commit | ee672b4ec5d07fbefb74848011c2a4ad045e3d10 (patch) | |
tree | 509f9634bf9310012f57e503418a8f7980eddcd3 /sys/dev/ic/dc.c | |
parent | 9d4e7136b55e386dc10fdbb5b98970754ad2c4da (diff) |
rev 1.125
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.
From FreeBSD
Thanks to David Snyder <dasnyderx at yahoo dot com> for testing on
a AN983 based card which used to come up with a MAC address of
ff:ff:ff:ff:ff:ff.
Diffstat (limited to 'sys/dev/ic/dc.c')
-rw-r--r-- | sys/dev/ic/dc.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/ic/dc.c b/sys/dev/ic/dc.c index 23e1fb7d557..b8bd247de92 100644 --- a/sys/dev/ic/dc.c +++ b/sys/dev/ic/dc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dc.c,v 1.77 2004/12/17 02:26:27 brad Exp $ */ +/* $OpenBSD: dc.c,v 1.78 2005/01/08 06:02:59 brad Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -1657,8 +1657,10 @@ dc_attach(sc) break; case DC_TYPE_AL981: case DC_TYPE_AN983: - bcopy(&sc->dc_srom[DC_AL_EE_NODEADDR], &sc->sc_arpcom.ac_enaddr, - ETHER_ADDR_LEN); + *(u_int32_t *)(&sc->sc_arpcom.ac_enaddr[0]) = + CSR_READ_4(sc, DC_AL_PAR0); + *(u_int16_t *)(&sc->sc_arpcom.ac_enaddr[4]) = + CSR_READ_4(sc, DC_AL_PAR1); break; case DC_TYPE_XIRCOM: break; |