From: Daniel Golle <daniel@makrotopia.org>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Vladimir Oltean <vladimir.oltean@nxp.com>,
Michael Klein <michael@fossekall.de>,
Aleksander Jan Bajkowski <olek2@wp.pl>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 3/5] net: phy: realtek: reunify C22 and C45 drivers
Date: Fri, 9 Jan 2026 13:25:18 +0000 [thread overview]
Message-ID: <aWEBviG7gpq3TGUv@makrotopia.org> (raw)
In-Reply-To: <131c6552-f487-4790-99c6-cd4776875de9@lunn.ch>
On Fri, Jan 09, 2026 at 02:18:14PM +0100, Andrew Lunn wrote:
> On Fri, Jan 09, 2026 at 03:03:33AM +0000, Daniel Golle wrote:
> > Reunify the split C22/C45 drivers for the RTL8221B-VB-CG 2.5Gbps and
> > RTL8221B-VM-CG 2.5Gbps PHYs back into a single driver.
> > This is possible now by using all the driver operations previously used
> > by the C45 driver, as transparent access to all MMDs including
> > MDIO_MMD_VEND2 is now possible also over Clause-22 MDIO.
> >
> > Signed-off-by: Daniel Golle <daniel@makrotopia.org>
> > ---
> > drivers/net/phy/realtek/realtek_main.c | 72 ++++++--------------------
> > 1 file changed, 16 insertions(+), 56 deletions(-)
> >
> > diff --git a/drivers/net/phy/realtek/realtek_main.c b/drivers/net/phy/realtek/realtek_main.c
> > index 886694ff995f6..d07d60bc1ce34 100644
> > --- a/drivers/net/phy/realtek/realtek_main.c
> > +++ b/drivers/net/phy/realtek/realtek_main.c
> > @@ -1879,28 +1879,18 @@ static int rtl8221b_match_phy_device(struct phy_device *phydev,
> > return phydev->phy_id == RTL_8221B && rtlgen_supports_mmd(phydev);
> > }
> >
> > -static int rtl8221b_vb_cg_c22_match_phy_device(struct phy_device *phydev,
> > - const struct phy_driver *phydrv)
> > +static int rtl8221b_vb_cg_match_phy_device(struct phy_device *phydev,
> > + const struct phy_driver *phydrv)
> > {
> > - return rtlgen_is_c45_match(phydev, RTL_8221B_VB_CG, false);
> > + return rtlgen_is_c45_match(phydev, RTL_8221B_VB_CG, true) ||
> > + rtlgen_is_c45_match(phydev, RTL_8221B_VB_CG, false);
>
> Are there any calls left to rtlgen_is_c45_match() which don't || true
> and false? If not, maybe add another patch which removes the bool
> parameter?
At this point it is still used by
---
static int rtl8251b_c45_match_phy_device(struct phy_device *phydev,
const struct phy_driver *phydrv)
{
return rtlgen_is_c45_match(phydev, RTL_8251B, true);
}
---
This 5G PHY supposedly supports only C45 mode, I don't know if it
actually needs the .match_phy_device at all or could also simply use
PHY_ID_MATCH_EXACT(RTL_8251B) instead, I don't have any device using
it so I can't test that.
next prev parent reply other threads:[~2026-01-09 13:25 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-09 3:02 [PATCH net-next 0/5] net: phy: realtek: simplify and reunify C22/C45 drivers Daniel Golle
2026-01-09 3:03 ` [PATCH net-next 1/5] net: phy: realtek: support interrupt also for C22 variants Daniel Golle
2026-01-09 3:03 ` [PATCH net-next 2/5] net: phy: realtek: simplify C22 reg access via MDIO_MMD_VEND2 Daniel Golle
2026-01-09 7:27 ` Heiner Kallweit
2026-01-09 21:32 ` Russell King (Oracle)
2026-01-09 22:21 ` Daniel Golle
2026-01-09 3:03 ` [PATCH net-next 3/5] net: phy: realtek: reunify C22 and C45 drivers Daniel Golle
2026-01-09 13:18 ` Andrew Lunn
2026-01-09 13:25 ` Daniel Golle [this message]
2026-01-10 14:28 ` Heiner Kallweit
2026-01-09 3:03 ` [PATCH net-next 4/5] net: phy: realtek: demystify PHYSR register location Daniel Golle
2026-01-09 7:32 ` Heiner Kallweit
2026-01-09 12:26 ` Daniel Golle
2026-01-09 17:31 ` Daniel Golle
2026-01-09 20:19 ` Daniel Golle
2026-01-09 3:03 ` [PATCH net-next 5/5] net: phy: realtek: simplify bogus paged operations Daniel Golle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aWEBviG7gpq3TGUv@makrotopia.org \
--to=daniel@makrotopia.org \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=michael@fossekall.de \
--cc=netdev@vger.kernel.org \
--cc=olek2@wp.pl \
--cc=pabeni@redhat.com \
--cc=vladimir.oltean@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox