tech-kern archive

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

Re: re(4) MAC address



Frank Wille wrote:

> > 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.

IIRC RTL8139 doc says the chip reads the values from EEPROM automatically.
We should follow what 8169 doc specifies, but I don't have 8169 docs.

> > 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.

Probably all NASes has the same values in EEPROM?
(i.e. no re's EEPROM write operations during manufacture)

> > 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.

You can add it if necessary, to avoid unexpected changes on other NICs.

---
Izumi Tsutsui


Home | Main Index | Thread Index | Old Index