Re: [PATCH iwl-next v5 1/9] net: ethtool: mm: extract stmmac verification logic into common library

From: Abdul Rahim, Faizal
Date: Fri Feb 21 2025 - 08:33:36 EST




On 21/2/2025 6:43 pm, Vladimir Oltean wrote:
On Fri, Feb 21, 2025 at 06:24:09PM +0800, Furong Xu wrote:
Your fix is better when link is up/down, so I vote verify_enabled.

Hmmm... I thought this was a bug in stmmac that was carried over to
ethtool_mmsv, but it looks like it isn't.

In fact, looking at the original refactoring patch I had attached in
this email:
https://lore.kernel.org/netdev/20241217002254.lyakuia32jbnva46@skbuf/

these 2 lines in ethtool_mmsv_link_state_handle() didn't exist at all.

} else {
mmsv->status = ETHTOOL_MM_VERIFY_STATUS_INITIAL;
mmsv->verify_retries = ETHTOOL_MM_MAX_VERIFY_RETRIES;

/* No link or pMAC not enabled */
ethtool_mmsv_configure_pmac(mmsv, false);
ethtool_mmsv_configure_tx(mmsv, false);
}

Faizal, could you remind me why they were added? I don't see this
explained in change logs.


Hi Vladimir,

Yeah, it wasn’t there originally. I added that change because it failed the link down/link up test.
After a successful verification, if the link partner goes down, the status still shows ETHTOOL_MM_VERIFY_STATUS_SUCCEEDED, which isn’t correct—so that’s why I added it.

Sorry for not mentioning it earlier. I assumed you’d check the delta between the original patch and the upstream one, my bad, should have mentioned this logic change.

Should I update it to the latest suggestion?