[PATCH net-next v2 2/2] net: sgi: ioc3-eth: take the MAC address from a device property

From
Imre Kaloz <kaloz@kernel.org>
Date
2026-11-16 10:22:44
Also in
linux-mips, lkml
Reply to
Imre Kaloz, 2026-11-16
Some boards have no MAC PROM on the IOC3's 1-wire bus, and the probe
defers forever there. Let the platform supply the address as a device
property for such a board.

Signed-off-by: Imre Kaloz <kaloz@kernel.org>
---
 drivers/net/ethernet/sgi/ioc3-eth.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/sgi/ioc3-eth.c b/drivers/net/ethernet/sgi/ioc3-eth.c
index 25139cf5ff62..fa844267c325 100644
--- a/drivers/net/ethernet/sgi/ioc3-eth.c
+++ b/drivers/net/ethernet/sgi/ioc3-eth.c
@@ -857,8 +857,9 @@ static int ioc3eth_probe(struct platform_device *pdev)
 		dev_err(&pdev->dev, "Invalid resource\n");
 		return -EINVAL;
 	}
-	/* get mac addr from one wire prom */
-	if (ioc3eth_get_mac_addr(regs, mac_addr))
+	/* get mac addr from one wire prom, or from a device property */
+	if (ioc3eth_get_mac_addr(regs, mac_addr) &&
+	    device_get_mac_address(&pdev->dev, mac_addr))
 		return -EPROBE_DEFER; /* not available yet */
 
 	dev = alloc_etherdev(sizeof(struct ioc3_private));
-- 
2.47.3
Thread (5 messages) 5 messages, 2 authors, last reply 19h ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help