Thread (34 messages) 34 messages, 2 authors, 1d ago

Re: [PATCH net-next v3 03/13] ax88179_178a: Use MMD accessor functions for AX88179A

From: Andrew Lunn <andrew@lunn.ch>
Date: 2026-07-24 16:45:02
Also in: linux-usb, lkml

On Fri, Jul 24, 2026 at 09:36:46AM +0200, Birger Koblitz wrote:
quoted hunk ↗ jump to hunk
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 <redacted>
---
 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.

	Andrew
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help