Commit 1d6d537
net: ethernet: mtk_eth_soc: handle probe deferral
Move the call to of_get_ethdev_address to mtk_add_mac which is part of
the probe function and can hence itself return -EPROBE_DEFER should
of_get_ethdev_address return -EPROBE_DEFER. This allows us to entirely
get rid of the mtk_init function.
The problem of of_get_ethdev_address returning -EPROBE_DEFER surfaced
in situations in which the NVMEM provider holding the MAC address has
not yet be loaded at the time mtk_eth_soc is initially probed. In this
case probing of mtk_eth_soc should be deferred instead of falling back
to use a random MAC address, so once the NVMEM provider becomes
available probing can be repeated.
Fixes: 656e705 ("net-next: mediatek: add support for MT7623 ethernet")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent 56a1603 commit 1d6d537
1 file changed
Lines changed: 11 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3846 | 3846 | | |
3847 | 3847 | | |
3848 | 3848 | | |
3849 | | - | |
3850 | | - | |
3851 | | - | |
3852 | | - | |
3853 | | - | |
3854 | | - | |
3855 | | - | |
3856 | | - | |
3857 | | - | |
3858 | | - | |
3859 | | - | |
3860 | | - | |
3861 | | - | |
3862 | | - | |
3863 | | - | |
3864 | | - | |
3865 | | - | |
3866 | 3849 | | |
3867 | 3850 | | |
3868 | 3851 | | |
| |||
4278 | 4261 | | |
4279 | 4262 | | |
4280 | 4263 | | |
4281 | | - | |
4282 | 4264 | | |
4283 | 4265 | | |
4284 | 4266 | | |
| |||
4340 | 4322 | | |
4341 | 4323 | | |
4342 | 4324 | | |
| 4325 | + | |
| 4326 | + | |
| 4327 | + | |
| 4328 | + | |
| 4329 | + | |
| 4330 | + | |
| 4331 | + | |
| 4332 | + | |
| 4333 | + | |
| 4334 | + | |
| 4335 | + | |
4343 | 4336 | | |
4344 | 4337 | | |
4345 | 4338 | | |
| |||
0 commit comments