Thread (11 messages) 11 messages, 4 authors, 2019-03-04

[PATCH net 1/2] net: phy: Use C45 Helpers in phy_read_status()

STALE2772d

From: Jose Abreu <jose.abreu@synopsys.com>
Date: 2019-03-01 10:54:50
Also in: lkml
Subsystem: ethernet phy library, the rest · Maintainers: Andrew Lunn, Heiner Kallweit, Linus Torvalds

Currently phy_read_status() considers that either the PHY driver has the
read_status() callback or uses the generic callback.

For C45 PHYs we need to use the gen10g_read_status() callback.

Signed-off-by: Jose Abreu <redacted>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Joao Pinto <redacted>
---
 include/linux/phy.h | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 333b56d8f746..872899136fdc 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -1030,6 +1030,8 @@ static inline int phy_read_status(struct phy_device *phydev)
 
 	if (phydev->drv->read_status)
 		return phydev->drv->read_status(phydev);
+	else if (phydev->is_c45)
+		return gen10g_read_status(phydev);
 	else
 		return genphy_read_status(phydev);
 }
-- 
2.7.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help