Subject: port-i386/26723: Intel Bayfield motherboard - random mac address for on board ethernet
To: None <>
From: None <>
List: netbsd-bugs
Date: 08/20/2004 05:13:40
>Number:         26723
>Category:       port-i386
>Synopsis:       Intel Bayfield motherboard - random mac address for on board ethernet
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    port-i386-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Aug 20 07:41:00 UTC 2004
>Originator:     Mark Randelhoff
>Release:        1.6.2_STABLE
NetBSD Net16 1.6.2_STABLE (V5_161) #0 Thurs Aug 12 17:23 SAST 2004 root@net16:/usr/src/sys/arch/i386/compile/V5_161 i386
The mac address of the onboard ethernet controller changes randomly when the system is rebooted a number of times.

The motherboard used is an intel 865bf motherboard with 256M of ram and an intel 2.4G celeron processor.

The problem appears to be a timing problem in reading and writing the ethernet controllers eeprom.

The problem appears to have been addressed in netbsd20 but can cause catastrophic failure of the ethernet controller on these motherboards when using 1.6.2

I commented out the check for the ICH2/ICH3 errata 30 - that writes to the eeprom and often sets the mac address to all f's. 

I programmed the eeprom with a valid mac address. The mac address read back on repeated reboots changed on each reboot.
A diff of the src/sys/dev/ic/i82557.c file of netbsd20 and 16 branches indicates that the DELAY periods after the eeprom read and writes has changed (in many cases the delay period has been increased by a factor of 10)

Altering the 162 delay periods to match the netbsd20 delay periods ensures that the mac address is read correctly in each subsequent boot.