Re: [PATCH net] net: phy: realtek: fix RTL8224 package address selection
From: Andrew Lunn
Date: Mon Oct 05 2026 - 10:01:29 EST
On Sun, Oct 04, 2026 at 11:46:36PM +0300, Oskari Lemmela wrote:
> From: Manuel Stocker <mensi@xxxxxxxx>
>
> The RTL8224 driver rounds each PHY address down to a multiple of four
> to select the package base and uses the low two address bits as the
> port index. For a package starting at an unaligned MDIO address, this
> accesses shared registers at the wrong address and selects incorrect
> MDI pair order and polarity fields.
>
> The Hasivo S1100WP-8GT-2S+ uses two RTL8224 packages at MDIO
> addresses 1-4 and 5-8. The aligned-address assumption splits each
> physical package into incorrect software groups rather than using
> the actual package bases of 1 and 5.
>
> Use the base address from an ethernet-phy-package node when present
> and calculate each port's offset relative to that address. Reject
> PHY addresses outside the four-port package and propagate explicit
> package errors instead of falling back to another base address.
>
> Keep the existing aligned-address assumption when no package node
> is present.
>
> Fixes: 330296ea9e15 ("net: phy: realtek: add RTL8224 pair order support")
I suggest this gets merged to net-next. It never worked, so it is not
a regression. This patch just extends the current implementation to be
more generic.
And now you are looking at DT properties, you need a DT binding
document.
Andrew
---
pw-bot: cr