Re: [PATCH iwl-next v9 03/14] net: ethtool: mm: reset verification status when link is down

From
Furong Xu <hidden>
Date
2025-03-10 02:24:47
Also in
bpf, intel-wired-lan, lkml, netdev
Reply to
Faizal Rahim, 2025-03-09
On Sun,  9 Mar 2025 06:46:37 -0400
Faizal Rahim [off-list ref] wrote:
quoted hunk ↗ jump to hunk
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.

Signed-off-by: Faizal Rahim <redacted>
---
 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);
Reviewed-by: Furong Xu <redacted>

Thread (18 messages) 18 messages, 3 authors, last reply 2025-03-12
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help