[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250418163822.3519810-4-anthony.l.nguyen@intel.com>
Date: Fri, 18 Apr 2025 09:38:09 -0700
From: Tony Nguyen <anthony.l.nguyen@...el.com>
To: davem@...emloft.net,
kuba@...nel.org,
pabeni@...hat.com,
edumazet@...gle.com,
andrew+netdev@...n.ch,
netdev@...r.kernel.org
Cc: Faizal Rahim <faizal.abdul.rahim@...ux.intel.com>,
anthony.l.nguyen@...el.com,
vinicius.gomes@...el.com,
vitaly.lifshits@...el.com,
dima.ruinskiy@...el.com,
przemyslaw.kitszel@...el.com,
chwee.lin.choong@...el.com,
yong.liang.choong@...ux.intel.com,
vladimir.oltean@....com,
horms@...nel.org,
linux@...linux.org.uk,
xiaolei.wang@...driver.com,
hayashi.kunihiko@...ionext.com,
ast@...nel.org,
jesper.nilsson@...s.com,
mcoquelin.stm32@...il.com,
rmk+kernel@...linux.org.uk,
fancer.lancer@...il.com,
kory.maincent@...tlin.com,
linux-stm32@...md-mailman.stormreply.com,
hkelam@...vell.com,
alexandre.torgue@...s.st.com,
daniel@...earbox.net,
linux-arm-kernel@...ts.infradead.org,
hawk@...nel.org,
quic_jsuraj@...cinc.com,
gal@...dia.com,
john.fastabend@...il.com,
0x1207@...il.com,
bpf@...r.kernel.org
Subject: [PATCH net-next 03/14] net: ethtool: mm: reset verification status when link is down
From: Faizal Rahim <faizal.abdul.rahim@...ux.intel.com>
When the link partner goes down, "ethtool --show-mm" still displays
"Verification status: SUCCEEDED," reflecting a previous state that is
no longer valid.
Reset the verification status to ensure it reflects the current state.
Reviewed-by: Furong Xu <0x1207@...il.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@....com>
Signed-off-by: Faizal Rahim <faizal.abdul.rahim@...ux.intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@...el.com>
---
net/ethtool/mm.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/net/ethtool/mm.c b/net/ethtool/mm.c
index bfd988464d7d..ad9b40034003 100644
--- a/net/ethtool/mm.c
+++ b/net/ethtool/mm.c
@@ -415,6 +415,10 @@ void ethtool_mmsv_link_state_handle(struct ethtool_mmsv *mmsv, bool up)
/* New link => maybe new partner => new verification process */
ethtool_mmsv_apply(mmsv);
} else {
+ /* Reset the reported verification state while the link is down */
+ if (mmsv->verify_enabled)
+ mmsv->status = ETHTOOL_MM_VERIFY_STATUS_INITIAL;
+
/* No link or pMAC not enabled */
ethtool_mmsv_configure_pmac(mmsv, false);
ethtool_mmsv_configure_tx(mmsv, false);
--
2.47.1
Powered by blists - more mailing lists