]> git.ipfire.org Git - thirdparty/u-boot.git/commit
net: fec_mxc: fix usage of DM_MDIO and DM_ETH_PHY
authorMarkus Niebel <Markus.Niebel@ew.tq-group.com>
Fri, 21 Nov 2025 17:34:46 +0000 (18:34 +0100)
committerFabio Estevam <festevam@nabladev.com>
Sat, 29 Nov 2025 20:06:30 +0000 (17:06 -0300)
commitf4434ae02d5f96016cdad5e69862bf5139745e30
treea7af3324726d682a3c20f9f1c754705acf89f383
parentfc199c481c6a0737d4020ea0cbbab84a2d87b1fd
net: fec_mxc: fix usage of DM_MDIO and DM_ETH_PHY

If DM_ETH_PHY is used and the FEC instance owns the shared MDIO bus,
eth_phy_get_mdio_bus returns NULL. If DM_MDIO bus is used, the
mdio_register API is called from dm_mdio_post_probe. Therefore the
bus should must be queried by name in this case.

For DM_MDIO case fec_mii_setspeed has already being called in
dm_fec_mdio_probe(), so skip setting this again.

Fixes: 3b8f99a3e762 ("net: fec: add support for DM_MDIO")
Fixes: e75d08821574 ("net: fec-mxc: prevent crash if no MAC address is set")
Signed-off-by: Markus Niebel <Markus.Niebel@ew.tq-group.com>
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Signed-off-by: Alexander Feilke <alexander.feilke@ew.tq-group.com>
drivers/net/fec_mxc.c