On init all NIC drivers should get the MAC address from the NIC's
EEPROM, and store it in dev->dev_addr[].
If the MAC address is changed by the user in Windows, or in a previous
driver invocation, you want to change it back to the default. Obtaining
the address from EEPROM is the only way to do this on most cards. Since
the via-rhine apparently doesn't support this directly, it does the next
best thing: kick the h/w to reload the EEPROM into chip registers, and
then read the MAC address from the chip registers.
WRT the above code, you should add a check to see if '150' is enough of
a wait. MMIO is faster and would affect that loop. Maybe you want to
schedule_timeout before reading MACRegEEcsr to delay a little bit.
-- Jeff Garzik | Only so many songs can be sung Building 1024 | with two lips, two lungs, and one tongue. MandrakeSoft | - nomeansno- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/