From: Simon Horman <horms@kernel.org>
To: aleksandr.loktionov@intel.com
Cc: Simon Horman <horms@kernel.org>,
intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
anthony.l.nguyen@intel.com
Subject: Re: [Intel-wired-lan] [PATCH iwl-next] ixgbe: call ixgbe_setup_fc() before fc_enable() after NVM update
Date: Fri, 3 Apr 2026 14:39:30 +0100 [thread overview]
Message-ID: <20260403133930.129514-1-horms@kernel.org> (raw)
In-Reply-To: <20260327073046.134085-6-aleksandr.loktionov@intel.com>
This is an AI-generated review of your patch. The human sending this
email has considered the AI review valid, or at least plausible.
For local reproduction steps see https://netdev-ai.bots.linux.dev/ai-local.html
---
ixgbe: call ixgbe_setup_fc() before fc_enable() after NVM update
During an NVM update the PHY reset clears the Technology Ability Field
(IEEE 802.3 clause 37 register 7.10) back to hardware defaults. When
the driver subsequently calls only hw->mac.ops.fc_enable() the SRRCTL
register is recalculated from the stale autonegotiated capability bits,
which the MDD (Malicious Driver Detect) logic treats as an invalid
change and halts traffic on the PF.
Fix by calling ixgbe_setup_fc() immediately before fc_enable() in
ixgbe_watchdog_update_link() so that flow-control autoneg and the
PHY registers are re-programmed in the correct order after any reset.
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> index 0bc806aaed90..96e912371d9a 100644
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> @@ -8029,6 +8029,12 @@ static void ixgbe_watchdog_update_link(struct ixgbe_adapter *adapter)
> pfc_en |= !!(adapter->ixgbe_ieee_pfc->pfc_en);
>
> if (link_up && !((adapter->flags & IXGBE_FLAG_DCB_ENABLED) && pfc_en)) {
> + if (hw->mac.ops.setup_fc) {
> + int err = hw->mac.ops.setup_fc(hw);
> +
> + if (err)
> + e_warn(drv, "setup_fc failed: %d\n", err);
> + }
What happens if setup_fc() fails here? The patch adds this call to fix
MDD issues caused by stale PHY autoneg state after NVM updates.
However, if setup_fc() returns an error, the code only logs a warning
and continues:
if (hw->mac.ops.setup_fc) {
int err = hw->mac.ops.setup_fc(hw);
if (err)
e_warn(drv, "setup_fc failed: %d\n", err);
}
hw->mac.ops.fc_enable(hw);
Since fc_enable() relies on hw->fc.current_mode being properly set by
the autoneg process initiated by setup_fc(), calling it after a
setup_fc failure means it operates on the same stale state the patch
was meant to fix.
Could this leave a residual bug where MDD can still trigger and halt
traffic if setup_fc fails?
> hw->mac.ops.fc_enable(hw);
> ixgbe_set_rx_drop_en(adapter);
> }
next prev parent reply other threads:[~2026-04-03 13:39 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-27 7:30 [PATCH iwl-next] ixgbe: increase SWFW semaphore timeout for X550 FW updates Aleksandr Loktionov
2026-03-27 7:30 ` [PATCH iwl-next] ixgbe: add bounds check for debugfs register access Aleksandr Loktionov
2026-04-03 13:36 ` Simon Horman
2026-03-27 7:30 ` [PATCH iwl-next] ixgbe: clean up adaptive interrupt moderation algorithm Aleksandr Loktionov
2026-04-03 13:31 ` Simon Horman
2026-03-27 7:30 ` [PATCH iwl-next] ixgbe: remove ixgbe_ping_all_vfs() from watchdog link-up handler Aleksandr Loktionov
2026-04-03 13:25 ` [Intel-wired-lan] " Simon Horman
2026-03-27 7:30 ` [PATCH iwl-next] ixgbe: use ktime_get_real_ns() in ixgbe_ptp_reset() Aleksandr Loktionov
2026-04-03 13:10 ` Simon Horman
2026-04-03 13:11 ` Simon Horman
2026-04-03 20:26 ` Keller, Jacob E
2026-04-06 14:07 ` Simon Horman
2026-03-27 7:30 ` [PATCH iwl-next] ixgbe: call ixgbe_setup_fc() before fc_enable() after NVM update Aleksandr Loktionov
2026-04-03 13:38 ` Simon Horman
2026-04-03 13:39 ` Simon Horman [this message]
2026-03-27 7:30 ` [PATCH iwl-next] ixgbe: replace GFP_ATOMIC with GFP_KERNEL in ixgbe_fcoe_ddp_setup() Aleksandr Loktionov
2026-04-03 13:21 ` [Intel-wired-lan] " Simon Horman
2026-04-03 13:38 ` Kohei Enju
2026-03-27 7:30 ` [PATCH iwl-next] ixgbe: fix cls_u32 nexthdr path returning success when no entry installed Aleksandr Loktionov
2026-04-03 13:46 ` Simon Horman
2026-03-27 7:30 ` [PATCH iwl-next] ixgbe: use int instead of u32 for error code variables Aleksandr Loktionov
2026-04-03 13:41 ` Simon Horman
2026-03-27 7:30 ` [PATCH iwl-next] ixgbe: fix integer overflow and wrong bit position in ixgbe_validate_rtr() Aleksandr Loktionov
2026-04-03 8:41 ` Simon Horman
2026-04-03 10:00 ` David Laight
2026-03-27 7:30 ` [PATCH iwl-next] ixgbe: fix ITR value overflow in adaptive interrupt throttling Aleksandr Loktionov
2026-04-03 13:18 ` Simon Horman
2026-04-03 16:12 ` Loktionov, Aleksandr
2026-04-06 14:06 ` Simon Horman
2026-03-27 7:30 ` [PATCH iwl-next] ixgbe: extend 5 s SWFW semaphore timeout to all X550EM variants Aleksandr Loktionov
2026-04-03 20:55 ` Tony Nguyen
2026-04-03 12:49 ` [PATCH iwl-next] ixgbe: increase SWFW semaphore timeout for X550 FW updates Simon Horman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260403133930.129514-1-horms@kernel.org \
--to=horms@kernel.org \
--cc=aleksandr.loktionov@intel.com \
--cc=anthony.l.nguyen@intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox