lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220221062441.2685-1-maukka@ext.kapsi.fi>
Date:   Mon, 21 Feb 2022 08:24:41 +0200
From:   Mauri Sandberg <maukka@....kapsi.fi>
To:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:     Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Mauri Sandberg <maukka@....kapsi.fi>
Subject: [PATCH] net: mv643xx_eth: handle EPROBE_DEFER

Obtaining MAC address may be deferred in cases when the MAC is stored
in NVMEM block and it may now be ready upon the first retrieval attempt
returing EPROBE_DEFER. Handle it here and leave logic otherwise as it
was.

Signed-off-by: Mauri Sandberg <maukka@....kapsi.fi>
---
 drivers/net/ethernet/marvell/mv643xx_eth.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c b/drivers/net/ethernet/marvell/mv643xx_eth.c
index 105247582684..0694f53981f2 100644
--- a/drivers/net/ethernet/marvell/mv643xx_eth.c
+++ b/drivers/net/ethernet/marvell/mv643xx_eth.c
@@ -2740,7 +2740,10 @@ static int mv643xx_eth_shared_of_add_port(struct platform_device *pdev,
 		return -EINVAL;
 	}
 
-	of_get_mac_address(pnp, ppd.mac_addr);
+	ret = of_get_mac_address(pnp, ppd.mac_addr);
+
+	if (ret == -EPROBE_DEFER)
+		return ret;
 
 	mv643xx_eth_property(pnp, "tx-queue-size", ppd.tx_queue_size);
 	mv643xx_eth_property(pnp, "tx-sram-addr", ppd.tx_sram_addr);

base-commit: cfb92440ee71adcc2105b0890bb01ac3cddb8507
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ