net: stmmac: Handle disabled MDIO busses from devicetree
authorAndrew Halaney <ahalaney@redhat.com>
Tue, 12 Dec 2023 22:18:33 +0000 (16:18 -0600)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 14 Dec 2023 10:59:21 +0000 (11:59 +0100)
commite23c0d21ce9234fbc31ece35663ababbb83f9347
tree149a7e65a573b1ac6baeb1d11bd9e85376fd9db5
parent981d947bcd382c3950a593690e0e13d194d65b1c
net: stmmac: Handle disabled MDIO busses from devicetree

Many hardware configurations have the MDIO bus disabled, and are instead
using some other MDIO bus to talk to the MAC's phy.

of_mdiobus_register() returns -ENODEV in this case. Let's handle it
gracefully instead of failing to probe the MAC.

Fixes: 47dd7a540b8a ("net: add support for STMicroelectronics Ethernet controllers.")
Signed-off-by: Andrew Halaney <ahalaney@redhat.com>
Reviewed-by: Serge Semin <fancer.lancer@gmail.com>
Link: https://lore.kernel.org/r/20231212-b4-stmmac-handle-mdio-enodev-v2-1-600171acf79f@redhat.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c