]> git.baikalelectronics.ru Git - kernel.git/commit
net: bgmac-bcma: handle deferred probe error due to mac-address
authorChristian Lamparter <chunkeey@gmail.com>
Sun, 19 Sep 2021 11:57:25 +0000 (13:57 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 19 Sep 2021 12:14:05 +0000 (13:14 +0100)
commit39dab215247a1060382aa665ab3173a508547b0a
tree2fd6affbe1705a6ac4ff13eaf41b7d93f13975b7
parentf4773de37dc0ca99ffc029968b67faa57c20af7b
net: bgmac-bcma: handle deferred probe error due to mac-address

Due to the inclusion of nvmem handling into the mac-address getter
function of_get_mac_address() by
commit bde188f97b14 ("of_net: add NVMEM support to of_get_mac_address")
it is now possible to get a -EPROBE_DEFER return code. Which did cause
bgmac to assign a random ethernet address.

This exact issue happened on my Meraki MR32. The nvmem provider is
an EEPROM (at24c64) which gets instantiated once the module
driver is loaded... This happens once the filesystem becomes available.

With this patch, bgmac_probe() will propagate the -EPROBE_DEFER error.
Then the driver subsystem will reschedule the probe at a later time.

Cc: Petr Štetiar <ynezz@true.cz>
Cc: Michael Walle <michael@walle.cc>
Fixes: bde188f97b14 ("of_net: add NVMEM support to of_get_mac_address")
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bgmac-bcma.c