[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <30ea33cf-36b8-4c24-a28e-55ab365a6606@gmail.com>
Date: Fri, 14 Feb 2025 18:48:10 +0100
From: Heiner Kallweit <hkallweit1@...il.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: Realtek linux nic maintainers <nic_swsd@...ltek.com>,
Andrew Lunn <andrew+netdev@...n.ch>, Paolo Abeni <pabeni@...hat.com>,
Jakub Kicinski <kuba@...nel.org>, David Miller <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Simon Horman <horms@...nel.org>,
Russell King - ARM Linux <linux@...linux.org.uk>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH v2 net-next 3/3] net: phy: realtek: switch from paged to
MMD ops in rtl822x functions
On 14.02.2025 16:46, Andrew Lunn wrote:
> On Thu, Feb 13, 2025 at 08:19:14PM +0100, Heiner Kallweit wrote:
>> The MDIO bus provided by r8169 for the internal PHY's now supports
>> c45 ops for the MDIO_MMD_VEND2 device. So we can switch to standard
>> MMD ops here.
>>
>> Signed-off-by: Heiner Kallweit <hkallweit1@...il.com>
>
> Reviewed-by: Andrew Lunn <andrew@...n.ch>
>> {
>> int val;
>>
>> - val = phy_read_paged(phydev, 0xa61, 0x13);
>> + val = phy_read_mmd(phydev, MDIO_MMD_VEND2, 0xa616);
>
> It is nice to see some magic numbers gone. Maybe as a followup add
> #defines for these registers? Are they standard registers, just in odd
> places? So you could base there name on the standard register name,
> but with a vendor prefix?
>
Most of the registers are standard registers which are shadowed in
VEND2 device. E.g. 0xa616 is 45.2.1.4 (PMA/PMD speed ability).
So yes, it would make sense to add defines based on the standard
register name.
> Thanks
> Andrew
>
Heiner
Powered by blists - more mailing lists