Message ID | 20250309104648.3895551-4-faizal.abdul.rahim@linux.intel.com (mailing list archive) |
---|---|
State | Awaiting Upstream |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | igc: Add support for Frame Preemption feature in IGC | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Guessing tree name failed - patch did not apply, async |
On Sun, 9 Mar 2025 06:46:37 -0400 Faizal Rahim <faizal.abdul.rahim@linux.intel.com> wrote: > 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 <faizal.abdul.rahim@linux.intel.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); Reviewed-by: Furong Xu <0x1207@gmail.com>
On Sun, Mar 09, 2025 at 06:46:37AM -0400, Faizal Rahim wrote: > 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 <faizal.abdul.rahim@linux.intel.com> > --- Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
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);
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 <faizal.abdul.rahim@linux.intel.com> --- net/ethtool/mm.c | 4 ++++ 1 file changed, 4 insertions(+)