From: Faizal Rahim Date: Tue, 18 Mar 2025 03:07:31 +0000 (-0400) Subject: net: ethtool: mm: reset verification status when link is down X-Git-Tag: v6.16-rc1~132^2~230^2~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dda666343cc8e90441fd55142a679bea32d239e2;p=thirdparty%2Flinux.git net: ethtool: mm: reset verification status when link is down 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@gmail.com> Reviewed-by: Vladimir Oltean Signed-off-by: Faizal Rahim Signed-off-by: Tony Nguyen --- diff --git a/net/ethtool/mm.c b/net/ethtool/mm.c index bfd988464d7d0..ad9b400340033 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);