tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: re(4) MAC address

Izumi Tsutsui wrote:

On 02.12.12 00:40:44 you wrote:

>> I found out that NetBSD's re(4) driver is reading the MAC from EEPROM
>> while PPCBoot and Linux are reading it from the chip's ID-registers
>> (RTK_IDRn).
>> What is correct? This is a Realtek 8169S:
> Probably it's defined by hardware vendors, not chip.
> The old RTL8139 (RTL8169 has compat mode) seems to read MAC address
> from EEPROM and those values are stored into RTK_IDRn registers.

Who writes it into the IDRn registers? The firmware? The driver? Or the chip
itself? When the chip does that automatically, then re(4) should depend on
RTK_IDRn and not on the EEPROM.

> I guess some NAS vendors overwrite RTK_IDn registers by firmware
> to avoid extra EEPROM configurations during production.

You may be right. I found a modification in the PPCBoot source, which reads
the environment variable "ethaddr" and copies it to RTK_IDRn.

But the EEPROM seems to have a valid contents (only the last three bytes
differ) and I wonder why it is not used.

> We can change values per hardware by adding device properties
> (prop_dictionary(3)) calls (like sys/dev/pci/if_wm.c etc).

Yes. I added a mac-address property to sk(4) myself, some time ago. But
re(4) doesn't support it yet.

Frank Wille

Home | Main Index | Thread Index | Old Index