ath79: ag71xx: support probe defferal for getting MAC address
authorRobert Marko <robimarko@gmail.com>
Wed, 19 Jun 2024 09:26:47 +0000 (11:26 +0200)
committerRobert Marko <robimarko@gmail.com>
Thu, 20 Jun 2024 09:11:36 +0000 (11:11 +0200)
commit150d0ceab7380538798df76a5d7d3c12a3632050
treeeddfaef0aa8880acb73350c93d6efb9adc499e08
parent0b6b54eca939a2cb757f854594863548fb93f21f
ath79: ag71xx: support probe defferal for getting MAC address

Currently, of_get_ethdev_address() return is checked for any return error
code which means that trying to get the MAC from NVMEM cells that is backed
by MTD will fail if it was not probed before ag71xx.

So, lets check the return error code for EPROBE_DEFER and defer the ag71xx
probe in that case until the underlying NVMEM device is live.

Link: https://github.com/openwrt/openwrt/pull/15752
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c