netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Heiner Kallweit <hkallweit1@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Realtek linux nic maintainers <nic_swsd@realtek.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	Paolo Abeni <pabeni@redhat.com>, Jakub Kicinski <kuba@kernel.org>,
	David Miller <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Simon Horman <horms@kernel.org>,
	Russell King - ARM Linux <linux@armlinux.org.uk>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH v2 net-next 3/3] net: phy: realtek: switch from paged to MMD ops in rtl822x functions
Date: Fri, 14 Feb 2025 18:48:10 +0100	[thread overview]
Message-ID: <30ea33cf-36b8-4c24-a28e-55ab365a6606@gmail.com> (raw)
In-Reply-To: <51d0f59d-2e2c-4384-9a2a-4597ba9b7a03@lunn.ch>

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@gmail.com>
> 
> Reviewed-by: Andrew Lunn <andrew@lunn.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

  reply	other threads:[~2025-02-14 17:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-13 19:14 [PATCH v2 net-next 0/3] net: phy: realtek: improve MMD register access for internal PHY's Heiner Kallweit
2025-02-13 19:15 ` [PATCH v2 net-next 1/3] r8169: add PHY c45 ops for MDIO_MMD_VENDOR2 registers Heiner Kallweit
2025-02-14 15:39   ` Andrew Lunn
2025-02-13 19:18 ` [PATCH v2 net-next 2/3] net: phy: realtek: improve mmd register access for internal PHY's Heiner Kallweit
2025-02-14 15:43   ` Andrew Lunn
2025-02-13 19:19 ` [PATCH v2 net-next 3/3] net: phy: realtek: switch from paged to MMD ops in rtl822x functions Heiner Kallweit
2025-02-14 15:46   ` Andrew Lunn
2025-02-14 17:48     ` Heiner Kallweit [this message]
2025-02-15  1:20 ` [PATCH v2 net-next 0/3] net: phy: realtek: improve MMD register access for internal PHY's patchwork-bot+netdevbpf

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=30ea33cf-36b8-4c24-a28e-55ab365a6606@gmail.com \
    --to=hkallweit1@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=nic_swsd@realtek.com \
    --cc=pabeni@redhat.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;
as well as URLs for NNTP newsgroup(s).