]> git.baikalelectronics.ru Git - kernel.git/commit
net: ethernet: mv643xx: Fix over zealous checking of_get_mac_address()
authorAndrew Lunn <andrew@lunn.ch>
Tue, 5 Apr 2022 00:04:04 +0000 (02:04 +0200)
committerJakub Kicinski <kuba@kernel.org>
Wed, 6 Apr 2022 01:12:55 +0000 (18:12 -0700)
commit7ad9c50ded6c24ad141f8f94811faaeb37494ed7
tree13f5dec5a2c489aba43e9b5a78c65c3d00c908ae
parent5e8774a02b3f8bd511b9f0b71276ec623a8d0ea5
net: ethernet: mv643xx: Fix over zealous checking of_get_mac_address()

There is often not a MAC address available in an EEPROM accessible by
Linux with Marvell devices. Instead the bootload has the MAC address
and directly programs it into the hardware. So don't consider an error
from of_get_mac_address() has fatal. However, the check was added for
the case where there is a MAC address in an the EEPROM, but the EEPROM
has not probed yet, and -EPROBE_DEFER is returned. In that case the
error should be returned. So make the check specific to this error
code.

Cc: Mauri Sandberg <maukka@ext.kapsi.fi>
Reported-by: Thomas Walther <walther-it@gmx.de>
Fixes: 73a49517f13c ("net: mv643xx_eth: process retval from of_get_mac_address")
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20220405000404.3374734-1-andrew@lunn.ch
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/marvell/mv643xx_eth.c