Re: [PATCH] ARM: imx6q: remove KSZ9021 PHY fixup

[email protected]
Newsgroups dev.linux.lists.imx
Message-ID <[email protected]>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Removing the KSZ9021 PHY fixup breaks backward compatibility with older Device Trees, causing Ethernet to fail.
--

--- Patch [1]: [PATCH] ARM: imx6q: remove KSZ9021 PHY fixup ---
commit 043c886239c15d5e6801536fd77e59f0f71dbb60
Author: Heiner Kallweit <[email protected]>

ARM: imx6q: remove KSZ9021 PHY fixup

This commit removes the board-level PHY fixup for the KSZ9021 Ethernet PHY
on i.MX6Q boards, which was originally added to configure RGMII pad skew.
The commit notes that OF configuration support was added in 2013, making
the board-level fixup theoretically redundant.

> diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c
> index 7f62009257526..58f53fba202f4 100644
> --- a/arch/arm/mach-imx/mach-imx6q.c
> +++ b/arch/arm/mach-imx/mach-imx6q.c
[ ... ]
> -static void __init imx6q_enet_phy_init(void)
> -{
> -	if (IS_BUILTIN(CONFIG_PHYLIB)) {
> -		phy_register_fixup_for_uid(PHY_ID_KSZ9021, MICREL_PHY_ID_MASK,
> -				ksz9021rn_phy_fixup);
> -	}
> -}
> -

[Severity: High]
Will removing this fixup break Ethernet for users booting with older Device
Trees that lack the explicit skew-ps properties?

The Linux kernel generally treats the Device Tree as a stable ABI. Older
DTBs implicitly relied on this board-level fixup to set the necessary PHY
delays because the KSZ9021 PHY driver only sets RGMII pad skew registers
if explicit *-skew-ps properties are present. It does not apply default
delays based solely on the phy-mode.

If a system boots an affected board (like Sabrelite) with an older DTB,
could this omission cause Ethernet communication to fail unconditionally?

To preserve backward compatibility while still removing it for unaffected
boards, would it be better to conditionally apply the fixup using
of_machine_is_compatible() instead of removing it entirely?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.