[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241014060603.29878-1-SkyLake.Huang@mediatek.com>
Date: Mon, 14 Oct 2024 14:06:03 +0800
From: Sky Huang <SkyLake.Huang@...iatek.com>
To: Andrew Lunn <andrew@...n.ch>, Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>, "David S. Miller"
<davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski
<kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Sky Huang
<SkyLake.Huang@...iatek.com>, Matthias Brugger <matthias.bgg@...il.com>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
<linux-kernel@...r.kernel.org>, <netdev@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>, <linux-mediatek@...ts.infradead.org>
CC: Steven Liu <Steven.Liu@...iatek.com>, SkyLake.Huang
<skylake.huang@...iatek.com>
Subject: [RFC PATCH net-next 1/1] net: phy: Add capability to enable/disable 2.5G/5G/10G AN in ethtool
From: "SkyLake.Huang" <skylake.huang@...iatek.com>
For phy loopback test, we need to disable AN. In this way,
users can disable/enable phy AN more conveniently.
Signed-off-by: SkyLake.Huang <skylake.huang@...iatek.com>
---
drivers/net/phy/phy.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 14224e0..10772f8 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -1085,7 +1085,10 @@ int phy_ethtool_ksettings_set(struct phy_device *phydev,
return -EINVAL;
if (autoneg == AUTONEG_DISABLE &&
- ((speed != SPEED_1000 &&
+ ((speed != SPEED_10000 &&
+ speed != SPEED_5000 &&
+ speed != SPEED_2500 &&
+ speed != SPEED_1000 &&
speed != SPEED_100 &&
speed != SPEED_10) ||
(duplex != DUPLEX_HALF &&
--
2.45.2
Powered by blists - more mailing lists