* r8169: MAC address programmed by coreboot to onboard RTL8111F does not persist
@ 2025-03-22 8:50 Paul Menzel
2025-03-22 13:04 ` Heiner Kallweit
0 siblings, 1 reply; 3+ messages in thread
From: Paul Menzel @ 2025-03-22 8:50 UTC (permalink / raw)
To: Heiner Kallweit, nic_swsd; +Cc: netdev, LKML, Keith Hui
Dear Linux folks,
Keith Hui reported the issue *MAC address programmed by coreboot to
onboard RTL8111F does not persist* [1] below when using coreboot:
> I am producing a coreboot port on Asus P8Z77-V LE PLUS on which this
> issue is observed. It has a RTL8111F ethernet controller without
> EEPROM for vital product data.
>
> I enabled the rtl8168 driver in coreboot so I can configure the LEDs
> and MAC address. Lights work great, but the MAC address always
> revert to 00:00:00:00:00:05 by the Linux r8169 kernel module. I
> would then have to reassign its proper MAC address using ip link
> change eno0 address <mac>.
>
> The device appears to be taking the address I programmed, but r8169
> reverts it both on init and teardown, insisting that
> 00:00:00:00:00:05 is its permanent MAC address.
>
> Survival of coreboot programmed MAC address before r8169 driver is
> confirmed by a debug read back I inserted in the coreboot rtl81xx
> driver, as well as by temporarily blacklisting r8169.
>
> Vendor firmware is unaffected.
Do you have an idea, where in the Linux driver that happens?
Kind regards,
Paul
[1]: https://ticket.coreboot.org/issues/579#change-2029
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: r8169: MAC address programmed by coreboot to onboard RTL8111F does not persist
2025-03-22 8:50 r8169: MAC address programmed by coreboot to onboard RTL8111F does not persist Paul Menzel
@ 2025-03-22 13:04 ` Heiner Kallweit
2025-04-24 7:09 ` Paul Menzel
0 siblings, 1 reply; 3+ messages in thread
From: Heiner Kallweit @ 2025-03-22 13:04 UTC (permalink / raw)
To: Paul Menzel, nic_swsd; +Cc: netdev, LKML, Keith Hui
On 22.03.2025 09:50, Paul Menzel wrote:
> Dear Linux folks,
>
>
> Keith Hui reported the issue *MAC address programmed by coreboot to onboard RTL8111F does not persist* [1] below when using coreboot:
>
Why do you consider this a bug? IOW: Where is it specified otherwise?
>> I am producing a coreboot port on Asus P8Z77-V LE PLUS on which this
>> issue is observed. It has a RTL8111F ethernet controller without
>> EEPROM for vital product data.
>>
>> I enabled the rtl8168 driver in coreboot so I can configure the LEDs
>> and MAC address. Lights work great, but the MAC address always
>> revert to 00:00:00:00:00:05 by the Linux r8169 kernel module. I
>> would then have to reassign its proper MAC address using ip link
>> change eno0 address <mac>.
>>
r8169 in a first place reads the factory-programmed MAC from the chip.
If this is 00:00:00:00:00:05, then this seems to be an issue with your
board.
>> The device appears to be taking the address I programmed, but r8169
>> reverts it both on init and teardown, insisting that
>> 00:00:00:00:00:05 is its permanent MAC address.
>>
>> Survival of coreboot programmed MAC address before r8169 driver is
>> confirmed by a debug read back I inserted in the coreboot rtl81xx
>> driver, as well as by temporarily blacklisting r8169.
>>
>> Vendor firmware is unaffected.
>
What do you mean with this? What vendor firmware are you referring to?
> Do you have an idea, where in the Linux driver that happens?
>
See rtl_init_mac_address() in r8169, and rtl8168_get_mac_address()
in Realtek's r8168 driver.
>
> Kind regards,
>
> Paul
>
>
> [1]: https://ticket.coreboot.org/issues/579#change-2029
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: r8169: MAC address programmed by coreboot to onboard RTL8111F does not persist
2025-03-22 13:04 ` Heiner Kallweit
@ 2025-04-24 7:09 ` Paul Menzel
0 siblings, 0 replies; 3+ messages in thread
From: Paul Menzel @ 2025-04-24 7:09 UTC (permalink / raw)
To: Heiner Kallweit; +Cc: netdev, nic_swsd, LKML, Keith Hui
Dear Heiner,
Thank you for your reply.
Am 22.03.25 um 14:04 schrieb Heiner Kallweit:
> On 22.03.2025 09:50, Paul Menzel wrote:
>> Keith Hui reported the issue *MAC address programmed by coreboot
>> to onboard RTL8111F does not persist* [1] below when using
>> coreboot:
>
> Why do you consider this a bug? IOW: Where is it specified otherwise?
Good question. I do not have the documentation or specification. On
other boards the current coreboot – a FLOSS firmware – implementation
worked. coreboot’s driver name is r8168 though, but I guess that is due
to historical reasons.
>>> I am producing a coreboot port on Asus P8Z77-V LE PLUS on which this
>>> issue is observed. It has a RTL8111F ethernet controller without
>>> EEPROM for vital product data.
>>>
>>> I enabled the rtl8168 driver in coreboot so I can configure the LEDs
>>> and MAC address. Lights work great, but the MAC address always
>>> revert to 00:00:00:00:00:05 by the Linux r8169 kernel module. I
>>> would then have to reassign its proper MAC address using ip link
>>> change eno0 address <mac>.
>
> r8169 in a first place reads the factory-programmed MAC from the chip.
> If this is 00:00:00:00:00:05, then this seems to be an issue with your
> board.
>
>>> The device appears to be taking the address I programmed, but r8169
>>> reverts it both on init and teardown, insisting that
>>> 00:00:00:00:00:05 is its permanent MAC address.
>>>
>>> Survival of coreboot programmed MAC address before r8169 driver is
>>> confirmed by a debug read back I inserted in the coreboot rtl81xx
>>> driver, as well as by temporarily blacklisting r8169.
>>>
>>> Vendor firmware is unaffected.
>>
> What do you mean with this? What vendor firmware are you referring to?
“vendor firmware” was meant to be the firmware shipped by Asus, that
comes with the board. coreboot (and the payload) replaces this firmware,
by flashing the coreboot image to the flash ROM chip.
>> Do you have an idea, where in the Linux driver that happens?
>
> See rtl_init_mac_address() in r8169, and rtl8168_get_mac_address()
> in Realtek's r8168 driver.
Thank you. Keith found a fix for the issue [2]:
> On mainboard/asus/p8z77-v_le_plus, programmed MAC address is being
> reverted with controller resets done at loading and unloading of Linux
> r8169 kernel module.
>
> Ghidra examination of vendor BIOS reveals an additional sequence to
> program the MAC address into its ERI register block. This patch
> adds code to replicate that sequence, gated by a Kconfig so it's
> only included where necessary.
As stated in the beginning, I do not have have the datasheet, so cannot
say, if this solution is how it’s supposed to work. (Why program it in
too places?)
Thank you for you time again, and the pointers.
Kind regards,
Paul
>> [1]: https://ticket.coreboot.org/issues/579#change-2029
[2]: https://review.coreboot.org/c/coreboot/+/87436
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-04-24 7:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-22 8:50 r8169: MAC address programmed by coreboot to onboard RTL8111F does not persist Paul Menzel
2025-03-22 13:04 ` Heiner Kallweit
2025-04-24 7:09 ` Paul Menzel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).