net: ethernet: mv643xx: Fix over zealous checking of_get_mac_address()
Subsystems (3)
PATCH 1/1 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.
--- drivers/net/ethernet/marvell/mv643xx_eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/marvell/mv643xx_eth.c +1 -1
@@ -2751,7 +2751,7 @@ static int mv643xx_eth_shared_of_add_port(struct platform_device *pdev, } ret =of_get_mac_address (pnp, ppd.mac_addr); -if (ret) +if (ret == -EPROBE_DEFER )return ret;mv643xx_eth_property (pnp,"tx-queue-size" , ppd.tx_queue_size);
Signature · 1 line
2.35.1
This patch was applied to netdev/net.git (master) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (master)
by Jakub Kicinski <[email protected]>:
Quoted 10 lines · On Tue, 5 Apr 2022 02:04:04 +0200 you wrote:
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.[...]
Here is the summary with links:
- [net] net: ethernet: mv643xx: Fix over zealous checking of_get_mac_address()
https://git.kernel.org/netdev/net/c/11f8e7c122ce
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html