From: Birger Koblitz <mail@birger-koblitz.de>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Russell King <linux@armlinux.org.uk>,
Heiner Kallweit <hkallweit1@gmail.com>,
linux-usb@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v3 03/13] ax88179_178a: Use MMD accessor functions for AX88179A
Date: Fri, 24 Jul 2026 19:07:29 +0200 [thread overview]
Message-ID: <7a83bba0-2c70-458d-babc-e54581a2e158@birger-koblitz.de> (raw)
In-Reply-To: <6cbd0d83-9802-4e02-ba1b-4cf76cb51659@lunn.ch>
On 7/24/26 18:44, Andrew Lunn wrote:
> On Fri, Jul 24, 2026 at 09:36:46AM +0200, Birger Koblitz wrote:
>> The AX88179A uses a much simpler Clause-45 MMD access interface,
>> which are made available through ax_read_mmd() and ax_write_mmd(),
>> which in turn call the chips' respective implementation.
>>
>> Make use of these functions for stract MMD read/write operations.
>>
>> Signed-off-by: Birger Koblitz <mail@birger-koblitz.de>
>> ---
>> drivers/net/usb/ax88179_178a.c | 39 +++++++++++----------------------------
>> 1 file changed, 11 insertions(+), 28 deletions(-)
>>
>> diff --git a/drivers/net/usb/ax88179_178a.c b/drivers/net/usb/ax88179_178a.c
>> index b90a75a11024c58192bdb4a9436636bc9312148c..b7837c7a89f9b5ee520ef1ae91bbc7619d1a12bd 100644
>> --- a/drivers/net/usb/ax88179_178a.c
>> +++ b/drivers/net/usb/ax88179_178a.c
>> @@ -985,22 +985,19 @@ ax88179_ethtool_get_eee(struct usbnet *dev, struct ethtool_keee *data)
>> int val;
>>
>> /* Get Supported EEE */
>> - val = ax88179_phy_read_mmd_indirect(dev, MDIO_PCS_EEE_ABLE,
>> - MDIO_MMD_PCS);
>> + val = ax_read_mmd(dev, MDIO_MMD_PCS, MDIO_PCS_EEE_ABLE);
>
> All these look to be standard EEE registers. phylib should be handling
> this for you. Put a printk in genphy_c45_read_eee_cap1() and make sure
> it is being called.
>
> Basically, anything which is part of 802.3 clause 22 or clause 45
> should have helpers in phylib, and in most cases, phylib itself will
> take care of it. A MAC driver touching the PHY is generally a bad
> design, a layer violation. So any driver using phylink or phylib, all
> direct access to the PHY needs to be removed.
>
This is again the existing code targeting the AX179, I just used the
new MMD accessor functions that target both architectures. I cannot convert
that with any confidence that it will work without having those devices.
One would need to write PHY drivers and use phylink to make the mess
go away.
Birger
next prev parent reply other threads:[~2026-07-24 17:07 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-24 7:36 [PATCH net-next v3 00/13] ax88179_178a: Add support for AX88179A-based chips Birger Koblitz
2026-07-24 7:36 ` [PATCH net-next v3 01/13] ax88179_178a: Fix endianness of pause watermark register Birger Koblitz
2026-07-24 13:22 ` Andrew Lunn
2026-07-24 7:36 ` [PATCH net-next v3 02/13] ax88179_178a: Add HW support for AX179A-based chips Birger Koblitz
2026-07-24 16:22 ` Andrew Lunn
2026-07-24 16:37 ` Andrew Lunn
2026-07-24 7:36 ` [PATCH net-next v3 03/13] ax88179_178a: Use MMD accessor functions for AX88179A Birger Koblitz
2026-07-24 13:25 ` Andrew Lunn
2026-07-24 16:44 ` Andrew Lunn
2026-07-24 17:07 ` Birger Koblitz [this message]
2026-07-24 17:27 ` Andrew Lunn
2026-07-24 7:36 ` [PATCH net-next v3 04/13] ax88179_178a: Add EEE HW configuration support " Birger Koblitz
2026-07-24 13:32 ` Andrew Lunn
2026-07-24 7:36 ` [PATCH net-next v3 05/13] ax88179_178a: Use phylink in get/set_link_ksettings Birger Koblitz
2026-07-24 13:38 ` Andrew Lunn
2026-07-24 15:06 ` Birger Koblitz
2026-07-24 15:35 ` Andrew Lunn
2026-07-24 15:53 ` Birger Koblitz
2026-07-24 16:25 ` Andrew Lunn
2026-07-24 17:02 ` Birger Koblitz
2026-07-24 18:22 ` Andrew Lunn
2026-07-25 3:59 ` Birger Koblitz
2026-07-24 7:36 ` [PATCH net-next v3 06/13] ax88179_178a: EEE setup for AX88179A-based chips Birger Koblitz
2026-07-24 16:31 ` Andrew Lunn
2026-07-24 7:36 ` [PATCH net-next v3 07/13] ax88179_178a: Obtain speed and duplex from Interrupt URB Birger Koblitz
2026-07-24 17:01 ` Andrew Lunn
2026-07-24 7:36 ` [PATCH net-next v3 08/13] ax88179_178a: Add support for ethtool pause parameter configuration Birger Koblitz
2026-07-24 7:36 ` [PATCH net-next v3 09/13] ax88179_178a: Add VLAN offload support for AX88179A Birger Koblitz
2026-07-24 7:36 ` [PATCH net-next v3 10/13] ax88179_178a: Add ethtool get_drvinfo Birger Koblitz
2026-07-24 7:36 ` [PATCH net-next v3 11/13] ax88179_178a: Add support for AX88179A/772D/279 EEPROM access Birger Koblitz
2026-07-24 7:36 ` [PATCH net-next v3 12/13] ax88179_178a: Add AX179A/AX279 multicast configuration Birger Koblitz
2026-07-24 7:36 ` [PATCH net-next v3 13/13] ax88796b: Add support for AX88772D, AX88179A and AX88279 Birger Koblitz
2026-07-24 13:51 ` Andrew Lunn
2026-07-24 17:18 ` Andrew Lunn
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=7a83bba0-2c70-458d-babc-e54581a2e158@birger-koblitz.de \
--to=mail@birger-koblitz.de \
--cc=andrew+netdev@lunn.ch \
--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-usb@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--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