mirror of
https://github.com/openwrt/openwrt.git
synced 2025-02-21 01:41:41 +00:00
Notify via dev_info when a random MAC address is set. of_get_ethdev_address can return -EPROBE_DEFER for NVMEM devices, return this up, so that ipqess can defer as well. Also move this MAC assignment from _init into _probe, so that this defer can happen earlier. Before change, with MAC address allocated from a built-in NVMEM layout driver (mikrotik,routerboot-nvmem) with extra of_get_ethdev_address result and random MAC printfs: [ 1.197571] ipqess-edma c080000.ethernet: ipqess_init of_get_ethdev_address ret:-517, of_node: /soc/ethernet@c080000 [ 1.197690] ipqess-edma c080000.ethernet: generated random MAC address 22:e7:36:e0:e4:a3 [ 1.614444] ipqess-edma c080000.ethernet eth0: entered promiscuous mode [ 5.055929] ipqess-edma c080000.ethernet eth0: configuring for fixed/internal link mode after change: [ 1.173776] ipqess-edma c080000.ethernet: of_get_ethdev_address: -517 [ 1.614607] ipqess-edma c080000.ethernet eth0: entered promiscuous mode [ 5.246105] ipqess-edma c080000.ethernet eth0: configuring for fixed/internal link mode [ 5.260754] ipqess-edma c080000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx with extra __func__ printf to show _probe and _init: [ 1.173685] ipqess-edma c080000.ethernet: ipqess_axi_probe [ 1.173784] ipqess-edma c080000.ethernet: of_get_ethdev_address: -517 [ 1.280347] ipqess-edma c080000.ethernet: ipqess_axi_probe [ 1.304844] ipqess-edma c080000.ethernet: ipqess_init [ 1.614664] ipqess-edma c080000.ethernet eth0: entered promiscuous mode Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au> Link: https://github.com/openwrt/openwrt/pull/15831 Signed-off-by: Robert Marko <robimarko@gmail.com>