Thread (13 messages) flat view 13 messages, 2 authors, 2021-03-24
STALE1971d

Revision v1 of 4 in this series.

Revisions (4)
  1. v1 current
  2. v2 [diff vs current]
  3. v3 [diff vs current]
  4. v4 [diff vs current]

[PATCH net-next 6/7] net: phy: marvell10g: support more rate matching modes

From: Marek Behún <kabel@kernel.org>
Date: 2021-03-24 16:51:53
Subsystem: ethernet phy library, marvell mv88x3310 phy driver, networking drivers, the rest · Maintainers: Andrew Lunn, Heiner Kallweit, Russell King, Marek Behún, Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

The 88X3310P supports rate matching mode also for XAUI and RXAUI.

Signed-off-by: Marek Behún <kabel@kernel.org>
---
 drivers/net/phy/marvell10g.c | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/drivers/net/phy/marvell10g.c b/drivers/net/phy/marvell10g.c
index b4f9831b4db6..c764795a142a 100644
--- a/drivers/net/phy/marvell10g.c
+++ b/drivers/net/phy/marvell10g.c
@@ -596,13 +596,22 @@ static void mv3310_update_interface(struct phy_device *phydev)
 {
 	struct mv3310_priv *priv = dev_get_drvdata(&phydev->mdio.dev);
 
-	/* In "XFI with Rate Matching" mode the PHY interface is fixed at
-	 * 10Gb. The PHY adapts the rate to actual wire speed with help of
+	/* In all of the "* with Rate Matching" modes the PHY interface is fixed
+	 * at 10Gb. The PHY adapts the rate to actual wire speed with help of
 	 * internal 16KB buffer.
 	 */
-	if (priv->mactype == MV_V2_PORT_CTRL_MACTYPE_10GBASER_RATE_MATCH) {
+	switch (priv->mactype) {
+	case MV_V2_PORT_CTRL_MACTYPE_10GBASER_RATE_MATCH:
 		phydev->interface = PHY_INTERFACE_MODE_10GBASER;
 		return;
+	case MV_V2_PORT_CTRL_MACTYPE_XAUI_RATE_MATCH:
+		phydev->interface = PHY_INTERFACE_MODE_XAUI;
+		return;
+	case MV_V2_PORT_CTRL_MACTYPE_RXAUI_RATE_MATCH:
+		phydev->interface = PHY_INTERFACE_MODE_RXAUI;
+		return;
+	default:
+		break;
 	}
 
 	if ((phydev->interface == PHY_INTERFACE_MODE_SGMII ||
-- 
2.26.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help