]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: dwmac-sun8i: Use parsed internal PHY address instead of 1
authorPaul Kocialkowski <paulk@sys-base.io>
Mon, 19 May 2025 16:49:36 +0000 (18:49 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 May 2025 09:13:58 +0000 (11:13 +0200)
commit850ed6b0fcbc2c7d7d35b52bf1db48e9a00c6b0d
tree37abc0a6d12a6f5a5a92e405697564ef74364413
parent9c4c4ee5968a1c119f8a4e5293a8fbeb692f9c6a
net: dwmac-sun8i: Use parsed internal PHY address instead of 1

[ Upstream commit 47653e4243f2b0a26372e481ca098936b51ec3a8 ]

While the MDIO address of the internal PHY on Allwinner sun8i chips is
generally 1, of_mdio_parse_addr is used to cleanly parse the address
from the device-tree instead of hardcoding it.

A commit reworking the code ditched the parsed value and hardcoded the
value 1 instead, which didn't really break anything but is more fragile
and not future-proof.

Restore the initial behavior using the parsed address returned from the
helper.

Fixes: 634db83b8265 ("net: stmmac: dwmac-sun8i: Handle integrated/external MDIOs")
Signed-off-by: Paul Kocialkowski <paulk@sys-base.io>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Corentin LABBE <clabbe.montjoie@gmail.com>
Tested-by: Corentin LABBE <clabbe.montjoie@gmail.com>
Link: https://patch.msgid.link/20250519164936.4172658-1-paulk@sys-base.io
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c