[PATCH net-next v2 6/9] net: phy: marvell: mv88e1111 doesn't support isolate in SGMII mode

Maxime Chevallier
2024-10-04T17:12:24Z

The 88e1111 datasheet indicates that it supports the isolate mode in
GMII, RGMII and TBI modes, but doesn't mention what it does in the other
modes. Testing showed that setting the isolate bit while the PHY is in
SGMII mode has no effect.

Reflect that behaviour in the .can_isolate() driver ops.

Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
---
V2 : New patch

drivers/net/phy/marvell.c | 9 +++++++++
1 file changed, 9 insertions(+)

diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index 9964bf3dea2f..912b08d9c124 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -1092,6 +1092,14 @@ static int m88e1111_set_tunable(struct phy_device *phydev,
}
}

+static bool m88e1111_can_isolate(struct phy_device *phydev)
+{
+ if (phydev->interface == PHY_INTERFACE_MODE_SGMII)
+ return false;
+
+ return true;
+}
+
static int m88e1011_get_downshift(struct phy_device *phydev, u8 *data)
{
int val, cnt, enable;
@@ -3704,6 +3712,7 @@ static struct phy_driver marvell_drivers[] = {
.set_tunable = m88e1111_set_tunable,
.cable_test_start = m88e1111_vct_cable_test_start,
.cable_test_get_status = m88e1111_vct_cable_test_get_status,
+ .can_isolate = m88e1111_can_isolate,
},
{
.phy_id = MARVELL_PHY_ID_88E1111_FINISAR,
--
2.46.1