kernel icon indicating copy to clipboard operation
kernel copied to clipboard

Ethernet MAC address changes at every boot

Open teseo-sw opened this issue 5 years ago • 1 comments

I'm using latest develop-4.4 from https://github.com/rockchip-linux/kernel.

In dwmac-rk.c, the functions rk_vendor_read() and rk_vendor_write() are used inside rk_get_eth_add() to read and write MAC to Rockchip's vendor storage.

Unfortunately, both calls fail with -1 because rk_vendor_register() in sdmmc_vendor_storage.c gets called after rk_gmac_probe():

$ dmesg | grep rk_vendor
[    1.662968] rk_gmac-dwmac ff290000.ethernet: rk_get_eth_addr: rk_vendor_read eth mac address failed (-1)
[    1.682706] rk_gmac-dwmac ff290000.ethernet: rk_get_eth_addr: rk_vendor_write eth mac address failed (-1)
[    4.140557] rk_vendor_register

How can I enforce correct function call ordering so that rk_vendor_*() do not fail in dwmac-rk.c?

teseo-sw avatar Feb 12 '20 11:02 teseo-sw

write mac address on kernel comand line might be a solution

microcai avatar Jun 17 '20 02:06 microcai