Skip to content

Commit dda6663

Browse files
Faizal Rahimanguy11
authored andcommitted
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 <vladimir.oltean@nxp.com> Signed-off-by: Faizal Rahim <faizal.abdul.rahim@linux.intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
1 parent 9ff2aa4 commit dda6663

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

net/ethtool/mm.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,10 @@ void ethtool_mmsv_link_state_handle(struct ethtool_mmsv *mmsv, bool up)
415415
/* New link => maybe new partner => new verification process */
416416
ethtool_mmsv_apply(mmsv);
417417
} else {
418+
/* Reset the reported verification state while the link is down */
419+
if (mmsv->verify_enabled)
420+
mmsv->status = ETHTOOL_MM_VERIFY_STATUS_INITIAL;
421+
418422
/* No link or pMAC not enabled */
419423
ethtool_mmsv_configure_pmac(mmsv, false);
420424
ethtool_mmsv_configure_tx(mmsv, false);

0 commit comments

Comments
 (0)