* [PATCH net-next 0/5][pull request] Intel Wired LAN Driver Updates 2026-12-04 (ixgbe, ixgbevf)
@ 2026-12-04 22:38 Tony Nguyen
2026-12-04 22:38 ` [PATCH net-next 1/5] ixgbe: E610: force phy link to get down when interface is down Tony Nguyen
` (4 more replies)
0 siblings, 5 replies; 9+ messages in thread
From: Tony Nguyen @ 2026-12-04 22:38 UTC (permalink / raw)
To: davem, kuba, pabeni, edumazet, andrew+netdev, willemb, netdev
Cc: Tony Nguyen, jedrzej.jagielski, jacob.e.keller,
aleksandr.loktionov, adiyenga
For ixgbe:
Jedrzej Jagielski adds configurable link-down behavior,
"link-down-on-close", for E610 devices, allowing the PHY to be disabled
when the interface down. He also removes unused LinkSec macros.
Jake Keller replaces call ktime_to_ns(ktime_get_real()) with a, better,
equivalent helper.
Aleksandr Loktionov corrects some error code handling; switching u32 to
int to preserve negative errno values.
For ixgbevf:
Aadityarangan Shridhar Iyengar adds a warning message when the
negotiation of the mailbox API version failed.
The following are changes since commit d5cf954cebe4f175dfd834e1dc471a3aa203ec7d:
net: pktgen: hold if_lock across pktgen_find_dev() in __pktgen_NN_threads()
and are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue 10GbE
Aadityarangan Shridhar Iyengar (1):
ixgbevf: Warn when mailbox API negotiation fails
Aleksandr Loktionov (1):
ixgbe: use int instead of u32 for error code variables
Jacob Keller (1):
ixgbe: use ktime_get_real_ns() in ixgbe_ptp_reset()
Jedrzej Jagielski (2):
ixgbe: E610: force phy link to get down when interface is down
ixgbe: LinkSec deprecated macros cleanup
drivers/net/ethernet/intel/ixgbe/ixgbe.h | 1 +
drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c | 35 ++++++++++-
drivers/net/ethernet/intel/ixgbe/ixgbe_e610.h | 1 +
.../net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 15 +++++
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 35 ++++++++---
drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c | 6 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c | 2 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 61 -------------------
drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 12 ++--
.../net/ethernet/intel/ixgbevf/ixgbevf_main.c | 4 ++
10 files changed, 91 insertions(+), 81 deletions(-)
--
2.47.1
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH net-next 1/5] ixgbe: E610: force phy link to get down when interface is down
2026-12-04 22:38 [PATCH net-next 0/5][pull request] Intel Wired LAN Driver Updates 2026-12-04 (ixgbe, ixgbevf) Tony Nguyen
@ 2026-12-04 22:38 ` Tony Nguyen
2026-12-05 22:47 ` netdev-bot+sashiko
2026-12-04 22:38 ` [PATCH net-next 2/5] ixgbe: use ktime_get_real_ns() in ixgbe_ptp_reset() Tony Nguyen
` (3 subsequent siblings)
4 siblings, 1 reply; 9+ messages in thread
From: Tony Nguyen @ 2026-12-04 22:38 UTC (permalink / raw)
To: davem, kuba, pabeni, edumazet, andrew+netdev, willemb, netdev
Cc: Jedrzej Jagielski, anthony.l.nguyen, jacob.e.keller,
aleksandr.loktionov, adiyenga, Simon Horman
From: Jedrzej Jagielski <jedrzej.jagielski@intel.com>
For the E610 family, similarly to the E8xx adapters, the default behavior
is for the PHY link to remain up even when the corresponding OS interface
is down.
Add function setting down the PHY config IXGBE_ACI_PHY_ENA_LINK bit
what leads to disabling PHY link.
Now ixgbe_close() needs to share some of the ixgbe_watchdog_link_is_down
code so move the common part into the separate function.
Align functionality with the implementation of the ice driver.
Let user to configure link-down-on-close enablement through ethtool.
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Signed-off-by: Jedrzej Jagielski <jedrzej.jagielski@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe.h | 1 +
drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c | 35 ++++++++++++++++++-
drivers/net/ethernet/intel/ixgbe/ixgbe_e610.h | 1 +
.../net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 15 ++++++++
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 33 ++++++++++++-----
5 files changed, 76 insertions(+), 9 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe.h b/drivers/net/ethernet/intel/ixgbe/ixgbe.h
index 9b8217523fd2..7170f0bb54a6 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe.h
@@ -682,6 +682,7 @@ struct ixgbe_adapter {
#define IXGBE_FLAG2_MOD_POWER_UNSUPPORTED BIT(22)
#define IXGBE_FLAG2_API_MISMATCH BIT(23)
#define IXGBE_FLAG2_FW_ROLLBACK BIT(24)
+#define IXGBE_FLAG2_LINK_DOWN_ON_CLOSE BIT(25)
/* Tx fast path data */
int num_tx_queues;
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c
index da8519065d81..1be701454317 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c
@@ -1823,6 +1823,33 @@ void ixgbe_fc_autoneg_e610(struct ixgbe_hw *hw)
hw->fc.current_mode = hw->fc.requested_mode;
}
+/**
+ * ixgbe_disable_phy_link - force phy link to get down
+ * @hw: pointer to hardware structure
+ *
+ * Send 0x0601 with the IXGBE_ACI_PHY_ENA_LINK bit set down.
+ *
+ * Return: the exit code of the operation.
+ */
+int ixgbe_disable_phy_link(struct ixgbe_hw *hw)
+{
+ struct ixgbe_aci_cmd_get_phy_caps_data pcaps = {};
+ struct ixgbe_aci_cmd_set_phy_cfg_data pcfg = {};
+ int err;
+
+ err = ixgbe_aci_get_phy_caps(hw, false, IXGBE_ACI_REPORT_ACTIVE_CFG,
+ &pcaps);
+ if (err)
+ return err;
+
+ ixgbe_copy_phy_caps_to_cfg(&pcaps, &pcfg);
+
+ pcfg.caps &= ~IXGBE_ACI_PHY_ENA_LINK;
+ pcfg.caps |= IXGBE_ACI_PHY_ENA_AUTO_LINK_UPDT;
+
+ return ixgbe_aci_set_phy_cfg(hw, &pcfg);
+}
+
/**
* ixgbe_disable_rx_e610 - Disable RX unit
* @hw: pointer to hardware structure
@@ -2107,6 +2134,7 @@ int ixgbe_setup_phy_link_e610(struct ixgbe_hw *hw)
u8 rmode = IXGBE_ACI_REPORT_TOPO_CAP_MEDIA;
u64 sup_phy_type_low, sup_phy_type_high;
u64 phy_type_low = 0, phy_type_high = 0;
+ bool force_on_required;
int err;
err = ixgbe_aci_get_link_info(hw, false, NULL);
@@ -2172,6 +2200,11 @@ int ixgbe_setup_phy_link_e610(struct ixgbe_hw *hw)
phy_type_high |= IXGBE_PHY_TYPE_HIGH_10G_USXGMII;
}
+ /* If IXGBE_ACI_PHY_ENA_LINK has been explicitly disabled that means
+ * we need to force PHY link UP state during PHY link setup
+ */
+ force_on_required = !(pcfg.caps & IXGBE_ACI_PHY_ENA_LINK);
+
/* Mask the set values to avoid requesting unsupported link types. */
phy_type_low &= sup_phy_type_low;
pcfg.phy_type_low = cpu_to_le64(phy_type_low);
@@ -2180,7 +2213,7 @@ int ixgbe_setup_phy_link_e610(struct ixgbe_hw *hw)
if (pcfg.phy_type_high != pcaps.phy_type_high ||
pcfg.phy_type_low != pcaps.phy_type_low ||
- pcfg.caps != pcaps.caps) {
+ pcfg.caps != pcaps.caps || force_on_required) {
pcfg.caps |= IXGBE_ACI_PHY_ENA_LINK;
pcfg.caps |= IXGBE_ACI_PHY_ENA_AUTO_LINK_UPDT;
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.h
index 2cb76a3d30ae..59044d67ebeb 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.h
@@ -50,6 +50,7 @@ int ixgbe_cfg_phy_fc(struct ixgbe_hw *hw,
enum ixgbe_fc_mode req_mode);
int ixgbe_setup_fc_e610(struct ixgbe_hw *hw);
void ixgbe_fc_autoneg_e610(struct ixgbe_hw *hw);
+int ixgbe_disable_phy_link(struct ixgbe_hw *hw);
void ixgbe_disable_rx_e610(struct ixgbe_hw *hw);
int ixgbe_init_phy_ops_e610(struct ixgbe_hw *hw);
int ixgbe_identify_phy_e610(struct ixgbe_hw *hw);
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
index c98c440ccb20..ff34aacf12d5 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
@@ -139,6 +139,8 @@ static const char ixgbe_priv_flags_strings[][ETH_GSTRING_LEN] = {
"vf-ipsec",
#define IXGBE_PRIV_FLAGS_AUTO_DISABLE_VF BIT(2)
"mdd-disable-vf",
+#define IXGBE_PRIV_LINK_DOWN_ON_CLOSE BIT(3)
+ "link-down-on-close",
};
#define IXGBE_PRIV_FLAGS_STR_LEN ARRAY_SIZE(ixgbe_priv_flags_strings)
@@ -3815,6 +3817,9 @@ static u32 ixgbe_get_priv_flags(struct net_device *netdev)
if (adapter->flags2 & IXGBE_FLAG2_AUTO_DISABLE_VF)
priv_flags |= IXGBE_PRIV_FLAGS_AUTO_DISABLE_VF;
+ if (adapter->flags2 & IXGBE_FLAG2_LINK_DOWN_ON_CLOSE)
+ priv_flags |= IXGBE_PRIV_LINK_DOWN_ON_CLOSE;
+
return priv_flags;
}
@@ -3847,6 +3852,16 @@ static int ixgbe_set_priv_flags(struct net_device *netdev, u32 priv_flags)
}
}
+ flags2 &= ~IXGBE_FLAG2_LINK_DOWN_ON_CLOSE;
+ if (priv_flags & IXGBE_PRIV_LINK_DOWN_ON_CLOSE) {
+ if (adapter->hw.mac.type == ixgbe_mac_e610) {
+ flags2 |= IXGBE_FLAG2_LINK_DOWN_ON_CLOSE;
+ } else {
+ e_info(probe, "Cannot set private flags: Feature supported only for E610 devices\n");
+ return -EOPNOTSUPP;
+ }
+ }
+
if (flags2 != adapter->flags2) {
adapter->flags2 = flags2;
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 6458cb2e511e..9266a920d279 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -7504,6 +7504,20 @@ static void ixgbe_close_suspend(struct ixgbe_adapter *adapter)
ixgbe_free_all_rx_resources(adapter);
}
+static void ixgbe_handle_link_down(struct ixgbe_adapter *adapter)
+{
+ struct net_device *netdev = adapter->netdev;
+
+ if (test_bit(__IXGBE_PTP_RUNNING, &adapter->state))
+ ixgbe_ptp_start_cyclecounter(adapter);
+
+ e_info(drv, "NIC Link is Down\n");
+ netif_carrier_off(netdev);
+
+ /* ping all the active vfs to let them know link has changed */
+ ixgbe_ping_all_vfs(adapter);
+}
+
/**
* ixgbe_close - Disables a network interface
* @netdev: network interface device structure
@@ -7526,6 +7540,16 @@ int ixgbe_close(struct net_device *netdev)
ixgbe_fdir_filter_exit(adapter);
+ if (adapter->flags2 & IXGBE_FLAG2_LINK_DOWN_ON_CLOSE) {
+ int err;
+
+ err = ixgbe_disable_phy_link(&adapter->hw);
+ if (err)
+ e_err(drv, "Cannot set PHY link down\n");
+
+ ixgbe_handle_link_down(adapter);
+ }
+
ixgbe_release_hw_control(adapter);
return 0;
@@ -8201,14 +8225,7 @@ static void ixgbe_watchdog_link_is_down(struct ixgbe_adapter *adapter)
if (ixgbe_is_sfp(hw) && hw->mac.type == ixgbe_mac_82598EB)
adapter->flags2 |= IXGBE_FLAG2_SEARCH_FOR_SFP;
- if (test_bit(__IXGBE_PTP_RUNNING, &adapter->state))
- ixgbe_ptp_start_cyclecounter(adapter);
-
- e_info(drv, "NIC Link is Down\n");
- netif_carrier_off(netdev);
-
- /* ping all the active vfs to let them know link has changed */
- ixgbe_ping_all_vfs(adapter);
+ ixgbe_handle_link_down(adapter);
}
static bool ixgbe_ring_tx_pending(struct ixgbe_adapter *adapter)
--
2.47.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH net-next 2/5] ixgbe: use ktime_get_real_ns() in ixgbe_ptp_reset()
2026-12-04 22:38 [PATCH net-next 0/5][pull request] Intel Wired LAN Driver Updates 2026-12-04 (ixgbe, ixgbevf) Tony Nguyen
2026-12-04 22:38 ` [PATCH net-next 1/5] ixgbe: E610: force phy link to get down when interface is down Tony Nguyen
@ 2026-12-04 22:38 ` Tony Nguyen
2026-12-04 22:38 ` [PATCH net-next 3/5] ixgbe: use int instead of u32 for error code variables Tony Nguyen
` (2 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Tony Nguyen @ 2026-12-04 22:38 UTC (permalink / raw)
To: davem, kuba, pabeni, edumazet, andrew+netdev, willemb, netdev
Cc: Jacob Keller, anthony.l.nguyen, jedrzej.jagielski,
aleksandr.loktionov, adiyenga, richardcochran, Marcin Szycik,
Simon Horman, Alexander Nowlin
From: Jacob Keller <jacob.e.keller@intel.com>
Replace ktime_to_ns(ktime_get_real()) with the direct equivalent
ktime_get_real_ns() in ixgbe_ptp_reset(). Using the combined helper
avoids the unnecessary intermediate ktime_t variable and makes the
intent clearer.
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: Marcin Szycik <marcin.szycik@linux.intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Tested-by: Alexander Nowlin <alexander.nowlin@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
index 6885d2343c48..a7d1635d4563 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
@@ -1347,7 +1347,7 @@ void ixgbe_ptp_reset(struct ixgbe_adapter *adapter)
spin_lock_irqsave(&adapter->tmreg_lock, flags);
timecounter_init(&adapter->hw_tc, &adapter->hw_cc,
- ktime_to_ns(ktime_get_real()));
+ ktime_get_real_ns());
spin_unlock_irqrestore(&adapter->tmreg_lock, flags);
adapter->last_overflow_check = jiffies;
--
2.47.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH net-next 3/5] ixgbe: use int instead of u32 for error code variables
2026-12-04 22:38 [PATCH net-next 0/5][pull request] Intel Wired LAN Driver Updates 2026-12-04 (ixgbe, ixgbevf) Tony Nguyen
2026-12-04 22:38 ` [PATCH net-next 1/5] ixgbe: E610: force phy link to get down when interface is down Tony Nguyen
2026-12-04 22:38 ` [PATCH net-next 2/5] ixgbe: use ktime_get_real_ns() in ixgbe_ptp_reset() Tony Nguyen
@ 2026-12-04 22:38 ` Tony Nguyen
2026-12-05 22:47 ` netdev-bot+sashiko
2026-12-04 22:38 ` [PATCH net-next 4/5] ixgbe: LinkSec deprecated macros cleanup Tony Nguyen
2026-12-04 22:38 ` [PATCH net-next 5/5] ixgbevf: Warn when mailbox API negotiation fails Tony Nguyen
4 siblings, 1 reply; 9+ messages in thread
From: Tony Nguyen @ 2026-12-04 22:38 UTC (permalink / raw)
To: davem, kuba, pabeni, edumazet, andrew+netdev, willemb, netdev
Cc: Aleksandr Loktionov, anthony.l.nguyen, jedrzej.jagielski,
jacob.e.keller, adiyenga, Simon Horman, Alexander Nowlin
From: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
The variables used to store return values of kernel and driver functions
throughout the ixgbe driver are declared as u32 in several places. Such
functions return negative errno values on error (e.g. -EIO, -EFAULT),
which are sign-extended negative integers. Storing them in an unsigned
u32 silently wraps the value: -EIO (0xFFFFFFF7) stored in u32 becomes a
large positive number, so any "if (status)" truthiness check still works
by accident, but comparisons against specific negative error codes or
propagation up the call stack produce wrong results.
In the Linux kernel, u32 is reserved for fixed-width quantities used in
hardware interfaces or protocol structures. Using it for generic error
codes misleads reviewers into thinking the value is hardware-constrained.
Change all such local variables from u32 to int driver-wide: one in
ixgbe_main.c (ixgbe_resume), three in ixgbe_phy.c
(ixgbe_identify_phy_generic, ixgbe_tn_check_overtemp,
ixgbe_set_copper_phy_power), and six in ixgbe_x550.c
(ixgbe_check_link_t_X550em, ixgbe_get_lasi_ext_t_x550em,
ixgbe_enable_lasi_ext_t_x550em, ixgbe_handle_lasi_ext_t_x550em,
ixgbe_ext_phy_t_x550em_get_link, ixgbe_setup_internal_phy_t_x550em).
No functional change.
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Tested-by: Alexander Nowlin <alexander.nowlin@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c | 6 +++---
drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 12 ++++++------
3 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 9266a920d279..b23a482c4460 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -7560,7 +7560,7 @@ static int ixgbe_resume(struct device *dev_d)
struct pci_dev *pdev = to_pci_dev(dev_d);
struct ixgbe_adapter *adapter = pci_get_drvdata(pdev);
struct net_device *netdev = adapter->netdev;
- u32 err;
+ int err;
adapter->hw.hw_addr = adapter->io_addr;
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
index ab733e73927d..de8f6c61082d 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
@@ -262,7 +262,7 @@ static bool ixgbe_probe_phy(struct ixgbe_hw *hw, u16 phy_addr)
**/
int ixgbe_identify_phy_generic(struct ixgbe_hw *hw)
{
- u32 status = -EFAULT;
+ int status = -EFAULT;
u32 phy_addr;
if (!hw->phy.phy_semaphore_mask) {
@@ -2811,7 +2811,7 @@ static void ixgbe_i2c_bus_clear(struct ixgbe_hw *hw)
bool ixgbe_tn_check_overtemp(struct ixgbe_hw *hw)
{
u16 phy_data = 0;
- u32 status;
+ int status;
if (hw->device_id != IXGBE_DEV_ID_82599_T3_LOM)
return false;
@@ -2831,7 +2831,7 @@ bool ixgbe_tn_check_overtemp(struct ixgbe_hw *hw)
**/
int ixgbe_set_copper_phy_power(struct ixgbe_hw *hw, bool on)
{
- u32 status;
+ int status;
u16 reg;
/* Bail if we don't have copper phy */
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c
index 4a0ccbf448a2..b41b0676e177 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c
@@ -1911,7 +1911,7 @@ static int ixgbe_check_link_t_X550em(struct ixgbe_hw *hw,
bool *link_up,
bool link_up_wait_to_complete)
{
- u32 status;
+ int status;
u16 i, autoneg_status;
if (hw->mac.ops.get_media_type(hw) != ixgbe_media_type_copper)
@@ -2330,7 +2330,7 @@ static int ixgbe_get_link_capabilities_X550em(struct ixgbe_hw *hw,
static int ixgbe_get_lasi_ext_t_x550em(struct ixgbe_hw *hw, bool *lsc,
bool *is_overtemp)
{
- u32 status;
+ int status;
u16 reg;
*is_overtemp = false;
@@ -2418,7 +2418,7 @@ static int ixgbe_get_lasi_ext_t_x550em(struct ixgbe_hw *hw, bool *lsc,
static int ixgbe_enable_lasi_ext_t_x550em(struct ixgbe_hw *hw)
{
bool lsc, overtemp;
- u32 status;
+ int status;
u16 reg;
/* Clear interrupt flags */
@@ -2512,7 +2512,7 @@ static int ixgbe_handle_lasi_ext_t_x550em(struct ixgbe_hw *hw,
{
struct ixgbe_phy_info *phy = &hw->phy;
bool lsc;
- u32 status;
+ int status;
status = ixgbe_get_lasi_ext_t_x550em(hw, &lsc, is_overtemp);
if (status)
@@ -2606,7 +2606,7 @@ static int ixgbe_setup_kr_x550em(struct ixgbe_hw *hw)
**/
static int ixgbe_ext_phy_t_x550em_get_link(struct ixgbe_hw *hw, bool *link_up)
{
- u32 ret;
+ int ret;
u16 autoneg_status;
*link_up = false;
@@ -2642,7 +2642,7 @@ static int ixgbe_setup_internal_phy_t_x550em(struct ixgbe_hw *hw)
{
ixgbe_link_speed force_speed;
bool link_up;
- u32 status;
+ int status;
u16 speed;
if (hw->mac.ops.get_media_type(hw) != ixgbe_media_type_copper)
--
2.47.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH net-next 4/5] ixgbe: LinkSec deprecated macros cleanup
2026-12-04 22:38 [PATCH net-next 0/5][pull request] Intel Wired LAN Driver Updates 2026-12-04 (ixgbe, ixgbevf) Tony Nguyen
` (2 preceding siblings ...)
2026-12-04 22:38 ` [PATCH net-next 3/5] ixgbe: use int instead of u32 for error code variables Tony Nguyen
@ 2026-12-04 22:38 ` Tony Nguyen
2026-12-04 22:38 ` [PATCH net-next 5/5] ixgbevf: Warn when mailbox API negotiation fails Tony Nguyen
4 siblings, 0 replies; 9+ messages in thread
From: Tony Nguyen @ 2026-12-04 22:38 UTC (permalink / raw)
To: davem, kuba, pabeni, edumazet, andrew+netdev, willemb, netdev
Cc: Jedrzej Jagielski, anthony.l.nguyen, jacob.e.keller,
aleksandr.loktionov, adiyenga, Simon Horman
From: Jedrzej Jagielski <jedrzej.jagielski@intel.com>
There are some unused LinkSec macros. Get rid of them.
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Signed-off-by: Jedrzej Jagielski <jedrzej.jagielski@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 61 -------------------
1 file changed, 61 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
index a461b6542f96..4875f7209891 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
@@ -620,67 +620,6 @@ struct ixgbe_nvm_version {
#define IXGBE_SECRXSTAT_SECRX_OFF_DIS 0x00000002
#define IXGBE_SECRXSTAT_ECC_RXERR 0x00000004
-/* LinkSec (MacSec) Registers */
-#define IXGBE_LSECTXCAP 0x08A00
-#define IXGBE_LSECRXCAP 0x08F00
-#define IXGBE_LSECTXCTRL 0x08A04
-#define IXGBE_LSECTXSCL 0x08A08 /* SCI Low */
-#define IXGBE_LSECTXSCH 0x08A0C /* SCI High */
-#define IXGBE_LSECTXSA 0x08A10
-#define IXGBE_LSECTXPN0 0x08A14
-#define IXGBE_LSECTXPN1 0x08A18
-#define IXGBE_LSECTXKEY0(_n) (0x08A1C + (4 * (_n))) /* 4 of these (0-3) */
-#define IXGBE_LSECTXKEY1(_n) (0x08A2C + (4 * (_n))) /* 4 of these (0-3) */
-#define IXGBE_LSECRXCTRL 0x08F04
-#define IXGBE_LSECRXSCL 0x08F08
-#define IXGBE_LSECRXSCH 0x08F0C
-#define IXGBE_LSECRXSA(_i) (0x08F10 + (4 * (_i))) /* 2 of these (0-1) */
-#define IXGBE_LSECRXPN(_i) (0x08F18 + (4 * (_i))) /* 2 of these (0-1) */
-#define IXGBE_LSECRXKEY(_n, _m) (0x08F20 + ((0x10 * (_n)) + (4 * (_m))))
-#define IXGBE_LSECTXUT 0x08A3C /* OutPktsUntagged */
-#define IXGBE_LSECTXPKTE 0x08A40 /* OutPktsEncrypted */
-#define IXGBE_LSECTXPKTP 0x08A44 /* OutPktsProtected */
-#define IXGBE_LSECTXOCTE 0x08A48 /* OutOctetsEncrypted */
-#define IXGBE_LSECTXOCTP 0x08A4C /* OutOctetsProtected */
-#define IXGBE_LSECRXUT 0x08F40 /* InPktsUntagged/InPktsNoTag */
-#define IXGBE_LSECRXOCTD 0x08F44 /* InOctetsDecrypted */
-#define IXGBE_LSECRXOCTV 0x08F48 /* InOctetsValidated */
-#define IXGBE_LSECRXBAD 0x08F4C /* InPktsBadTag */
-#define IXGBE_LSECRXNOSCI 0x08F50 /* InPktsNoSci */
-#define IXGBE_LSECRXUNSCI 0x08F54 /* InPktsUnknownSci */
-#define IXGBE_LSECRXUNCH 0x08F58 /* InPktsUnchecked */
-#define IXGBE_LSECRXDELAY 0x08F5C /* InPktsDelayed */
-#define IXGBE_LSECRXLATE 0x08F60 /* InPktsLate */
-#define IXGBE_LSECRXOK(_n) (0x08F64 + (0x04 * (_n))) /* InPktsOk */
-#define IXGBE_LSECRXINV(_n) (0x08F6C + (0x04 * (_n))) /* InPktsInvalid */
-#define IXGBE_LSECRXNV(_n) (0x08F74 + (0x04 * (_n))) /* InPktsNotValid */
-#define IXGBE_LSECRXUNSA 0x08F7C /* InPktsUnusedSa */
-#define IXGBE_LSECRXNUSA 0x08F80 /* InPktsNotUsingSa */
-
-/* LinkSec (MacSec) Bit Fields and Masks */
-#define IXGBE_LSECTXCAP_SUM_MASK 0x00FF0000
-#define IXGBE_LSECTXCAP_SUM_SHIFT 16
-#define IXGBE_LSECRXCAP_SUM_MASK 0x00FF0000
-#define IXGBE_LSECRXCAP_SUM_SHIFT 16
-
-#define IXGBE_LSECTXCTRL_EN_MASK 0x00000003
-#define IXGBE_LSECTXCTRL_DISABLE 0x0
-#define IXGBE_LSECTXCTRL_AUTH 0x1
-#define IXGBE_LSECTXCTRL_AUTH_ENCRYPT 0x2
-#define IXGBE_LSECTXCTRL_AISCI 0x00000020
-#define IXGBE_LSECTXCTRL_PNTHRSH_MASK 0xFFFFFF00
-#define IXGBE_LSECTXCTRL_RSV_MASK 0x000000D8
-
-#define IXGBE_LSECRXCTRL_EN_MASK 0x0000000C
-#define IXGBE_LSECRXCTRL_EN_SHIFT 2
-#define IXGBE_LSECRXCTRL_DISABLE 0x0
-#define IXGBE_LSECRXCTRL_CHECK 0x1
-#define IXGBE_LSECRXCTRL_STRICT 0x2
-#define IXGBE_LSECRXCTRL_DROP 0x3
-#define IXGBE_LSECRXCTRL_PLSH 0x00000040
-#define IXGBE_LSECRXCTRL_RP 0x00000080
-#define IXGBE_LSECRXCTRL_RSV_MASK 0xFFFFFF33
-
/* IpSec Registers */
#define IXGBE_IPSTXIDX 0x08900
#define IXGBE_IPSTXSALT 0x08904
--
2.47.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH net-next 5/5] ixgbevf: Warn when mailbox API negotiation fails
2026-12-04 22:38 [PATCH net-next 0/5][pull request] Intel Wired LAN Driver Updates 2026-12-04 (ixgbe, ixgbevf) Tony Nguyen
` (3 preceding siblings ...)
2026-12-04 22:38 ` [PATCH net-next 4/5] ixgbe: LinkSec deprecated macros cleanup Tony Nguyen
@ 2026-12-04 22:38 ` Tony Nguyen
2026-12-05 22:47 ` netdev-bot+sashiko
4 siblings, 1 reply; 9+ messages in thread
From: Tony Nguyen @ 2026-12-04 22:38 UTC (permalink / raw)
To: davem, kuba, pabeni, edumazet, andrew+netdev, willemb, netdev
Cc: Aadityarangan Shridhar Iyengar, anthony.l.nguyen,
jedrzej.jagielski, jacob.e.keller, aleksandr.loktionov,
Rafal Romanowski
From: Aadityarangan Shridhar Iyengar <adiyenga@cisco.com>
ixgbevf_negotiate_api() tries supported mailbox API versions from newest
to oldest. If all attempts fail, it continues without reporting the
failure, leaving the API version at its reset default. This makes mailbox
communication failures difficult to diagnose.
Warn when the version list is exhausted and include the error from the
final attempt. Do not warn about individual failed attempts, since a PF
rejecting a newer version before accepting an older one is expected.
This is a diagnostic improvement only; negotiation, fallback and recovery
behavior remain unchanged.
This is a diagnostic improvement only.
Signed-off-by: Aadityarangan Shridhar Iyengar <adiyenga@cisco.com>
Tested-by: Rafal Romanowski <rafal.romanowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
index 7eb4acf59dab..52670b616abc 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
@@ -2344,6 +2344,10 @@ static void ixgbevf_negotiate_api(struct ixgbevf_adapter *adapter)
idx++;
}
+ if (api[idx] == ixgbe_mbox_api_unknown)
+ netdev_warn(adapter->netdev,
+ "Mailbox API negotiation with PF failed: %d\n", err);
+
ixgbevf_set_features(adapter);
if (adapter->pf_features & IXGBEVF_PF_SUP_ESX_MBX) {
--
2.47.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH net-next 1/5] ixgbe: E610: force phy link to get down when interface is down
2026-12-04 22:38 ` [PATCH net-next 1/5] ixgbe: E610: force phy link to get down when interface is down Tony Nguyen
@ 2026-12-05 22:47 ` netdev-bot+sashiko
0 siblings, 0 replies; 9+ messages in thread
From: netdev-bot+sashiko @ 2026-12-05 22:47 UTC (permalink / raw)
To: anthony.l.nguyen
Cc: davem, kuba, pabeni, edumazet, andrew+netdev, willemb, netdev,
adiyenga, jedrzej.jagielski, jacob.e.keller, aleksandr.loktionov,
rafal.romanowski
Thank you for your contribution! Sashiko AI review found 9 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 5 · Low: 4
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] The driver calls ixgbe_close() for internal reconfiguration,
not just as ndo_stop.
- [Medium] Other driver paths can turn the PHY link back on while the
netdev is administratively down, which silently undoes link-down-on-…
- [Medium] On a WoL-capable E610, link-down-on-close silently breaks
Wake-on-LAN once the interface has been closed.
- [Medium] ixgbe_close() now writes PHY state (ixgbe_disable_phy_link)
with nothing ordering it against a service task already in flight.
- [Medium] ixgbe: ixgbe_set_priv_flags() zeroes VF abort counts before
-EOPNOTSUPP
- [Low] In ixgbe_set_priv_flags(), toggling link-down-on-close on a
running interface triggers a full ixgbe_reinit_locked(), i.e.…
- [Low] In ixgbe_close(), the netif_device_present() check covers only
ixgbe_close_suspend().
- [Low] When ixgbe_disable_phy_link() fails, ixgbe_close() only logs
e_err("Cannot set PHY link down") and then calls…
- [Low] The patch adds a user-visible ethtool private flag, "link-down-
on-close" (ixgbe_priv_flags_strings, ixgbe_ethtool.c:143).
--
ixgbe: E610: force phy link to get down when interface is down
This adds an E610-only ethtool private flag, link-down-on-close. When it is
set, ixgbe_close() clears IXGBE_ACI_PHY_ENA_LINK through a new
ixgbe_disable_phy_link() helper, and ixgbe_setup_phy_link_e610() turns the
link back on when it finds the bit cleared. Part of
ixgbe_watchdog_link_is_down() is split out into ixgbe_handle_link_down() so
that ixgbe_close() can reuse it.
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c
> index da8519065d818..1be7014543176 100644
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c
> @@ -1823,6 +1823,33 @@ void ixgbe_fc_autoneg_e610(struct ixgbe_hw *hw)
> hw->fc.current_mode = hw->fc.requested_mode;
> }
>
> +/**
> + * ixgbe_disable_phy_link - force phy link to get down
> + * @hw: pointer to hardware structure
> + *
> + * Send 0x0601 with the IXGBE_ACI_PHY_ENA_LINK bit set down.
> + *
> + * Return: the exit code of the operation.
> + */
> +int ixgbe_disable_phy_link(struct ixgbe_hw *hw)
> +{
> + struct ixgbe_aci_cmd_get_phy_caps_data pcaps = {};
> + struct ixgbe_aci_cmd_set_phy_cfg_data pcfg = {};
> + int err;
> +
> + err = ixgbe_aci_get_phy_caps(hw, false, IXGBE_ACI_REPORT_ACTIVE_CFG,
> + &pcaps);
> + if (err)
> + return err;
> +
> + ixgbe_copy_phy_caps_to_cfg(&pcaps, &pcfg);
> +
> + pcfg.caps &= ~IXGBE_ACI_PHY_ENA_LINK;
> + pcfg.caps |= IXGBE_ACI_PHY_ENA_AUTO_LINK_UPDT;
> +
> + return ixgbe_aci_set_phy_cfg(hw, &pcfg);
> +}
[Severity: Medium]
Can this read-modify-write race with the service task and leave the PHY
link enabled after close?
ixgbe_down() sets __IXGBE_DOWN and calls
timer_delete_sync(&adapter->service_timer). Nothing cancels or flushes
adapter->service_task, though. A service task queued before __IXGBE_DOWN
can still be running when ixgbe_close() gets here.
On E610 the service task calls ixgbe_check_media_subtask(), which has no
__IXGBE_DOWN check. When IXGBE_FLAG2_NO_MEDIA is set and media appears,
the call chain is:
ixgbe_check_media_subtask()
ixgbe_non_sfp_link_config()
hw->mac.ops.setup_link()
...
ixgbe_setup_phy_link_e610()
ixgbe_setup_phy_link_e610() and ixgbe_disable_phy_link() both issue
get_phy_caps(ACTIVE_CFG) and then set_phy_cfg as two separate ACI
commands. hw->aci.lock covers each command on its own, not the pair.
Suppose the service task reads ENA_LINK=1, and close then reads and
writes ENA_LINK=0. The service task's later set_phy_cfg writes
ENA_LINK=1 back.
Suppose instead close writes first. ixgbe_setup_phy_link_e610() then
sees ENA_LINK clear, takes the new force_on_required branch and sets
ENA_LINK=1.
In either order, could the port be left with the physical link up after
ixgbe_close() returns?
> +
> /**
> * ixgbe_disable_rx_e610 - Disable RX unit
> * @hw: pointer to hardware structure
[ ... ]
> @@ -2172,6 +2200,11 @@ int ixgbe_setup_phy_link_e610(struct ixgbe_hw *hw)
> phy_type_high |= IXGBE_PHY_TYPE_HIGH_10G_USXGMII;
> }
>
> + /* If IXGBE_ACI_PHY_ENA_LINK has been explicitly disabled that means
> + * we need to force PHY link UP state during PHY link setup
> + */
> + force_on_required = !(pcfg.caps & IXGBE_ACI_PHY_ENA_LINK);
[Severity: Medium]
Will this undo link-down-on-close when setup_link runs while the
interface is administratively down?
For copper and multispeed fiber PHYs, ixgbe_set_link_ksettings() calls
setup_link without checking netif_running():
err = hw->mac.ops.setup_link(hw, advertised, true);
On E610 this goes through ixgbe_setup_link_e610() and setup_link_speed
to ixgbe_setup_phy_link_e610(). Once ixgbe_close() has cleared
IXGBE_ACI_PHY_ENA_LINK, force_on_required is true here. ENA_LINK is set
again and set_phy_cfg is sent.
ethtool --set-eee does the same thing through ixgbe_set_eee_e610() and
ixgbe_setup_eee_e610(), which sets the bit unconditionally:
phy_cfg.caps |= (IXGBE_ACI_PHY_ENA_LINK |
IXGBE_ACI_PHY_ENA_AUTO_LINK_UPDT);
After either command, the PHY link can come up while the netdev is down,
and get_priv_flags still reports link-down-on-close as on.
On copper with WoL disabled the PHY may already be in low power at this
point. Fiber and backplane E610 (no set_phy_power) and WoL-enabled copper
don't have that mitigation.
Should these paths honor IXGBE_FLAG2_LINK_DOWN_ON_CLOSE when the
interface is not running?
> +
> /* Mask the set values to avoid requesting unsupported link types. */
> phy_type_low &= sup_phy_type_low;
> pcfg.phy_type_low = cpu_to_le64(phy_type_low);
[ ... ]
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
> index c98c440ccb206..ff34aacf12d5c 100644
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
> @@ -139,6 +139,8 @@ static const char ixgbe_priv_flags_strings[][ETH_GSTRING_LEN] = {
> "vf-ipsec",
> #define IXGBE_PRIV_FLAGS_AUTO_DISABLE_VF BIT(2)
> "mdd-disable-vf",
> +#define IXGBE_PRIV_LINK_DOWN_ON_CLOSE BIT(3)
> + "link-down-on-close",
[Severity: Low]
This isn't a bug, but should
Documentation/networking/device_drivers/ethernet/intel/ixgbe.rst
describe the new link-down-on-close flag?
ethtool --show-priv-flags lists it on every ixgbe MAC.
ixgbe_set_priv_flags() returns -EOPNOTSUPP on anything other than
ixgbe_mac_e610, so users have no way to see that it is E610-only.
i40e documents its flag of the same name in i40e.rst. ixgbe.rst does not
document legacy-rx or mdd-disable-vf either.
> };
>
> #define IXGBE_PRIV_FLAGS_STR_LEN ARRAY_SIZE(ixgbe_priv_flags_strings)
[ ... ]
> @@ -3847,6 +3852,16 @@ static int ixgbe_set_priv_flags(struct net_device *netdev, u32 priv_flags)
> }
> }
>
> + flags2 &= ~IXGBE_FLAG2_LINK_DOWN_ON_CLOSE;
> + if (priv_flags & IXGBE_PRIV_LINK_DOWN_ON_CLOSE) {
> + if (adapter->hw.mac.type == ixgbe_mac_e610) {
> + flags2 |= IXGBE_FLAG2_LINK_DOWN_ON_CLOSE;
> + } else {
> + e_info(probe, "Cannot set private flags: Feature supported only for E610 devices\n");
> + return -EOPNOTSUPP;
> + }
> + }
> +
> if (flags2 != adapter->flags2) {
> adapter->flags2 = flags2;
>
[Severity: Medium]
On an 82599EB PF, can a request that this check rejects still change
VF state?
ixgbe_probe() sets IXGBE_FLAG2_AUTO_DISABLE_VF by default on
ixgbe_mac_82599EB, so ixgbe_get_priv_flags() reports mdd-disable-vf as
on. ethtool --set-priv-flags is a read-modify-write. A request to turn
on link-down-on-close therefore arrives here with both
IXGBE_PRIV_FLAGS_AUTO_DISABLE_VF and IXGBE_PRIV_LINK_DOWN_ON_CLOSE
set.
The mdd-disable-vf branch above runs first. It clears
adapter->vfinfo[i].primary_abort_count for every VF. Only after that
does this new block see that the MAC is not ixgbe_mac_e610 and return
-EOPNOTSUPP.
adapter->flags2 is left untouched. The per-VF MDD abort counters,
though, have been reset by an operation that reported failure to the
user.
Could the E610 check be done before any side effects happen? For
example, validate all requested flags up front, or move this block
above the mdd-disable-vf one.
[Severity: Low]
Is a full reset needed when only link-down-on-close changes?
The new bit goes through the existing block:
/* reset interface to repopulate queues */
if (netif_running(netdev))
ixgbe_reinit_locked(adapter);
Toggling the flag on a running interface therefore causes an
ixgbe_down()/ixgbe_up() cycle and interrupts traffic. The flag only
changes what ixgbe_close() does later.
ice does not reset when this flag changes. The existing vf-ipsec and
mdd-disable-vf flags do behave the same way here.
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> index 6458cb2e511e7..9266a920d279a 100644
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
[ ... ]
> @@ -7526,6 +7540,16 @@ int ixgbe_close(struct net_device *netdev)
>
> ixgbe_fdir_filter_exit(adapter);
>
> + if (adapter->flags2 & IXGBE_FLAG2_LINK_DOWN_ON_CLOSE) {
[Severity: Medium]
ixgbe_close() is reached from more than ndo_stop. With this block here,
won't every internal close/open cycle on a running E610 with the flag
set drop the physical link?
For example, ixgbe_setup_tc() does:
if (netif_running(dev))
ixgbe_close(dev);
else
ixgbe_reset(adapter);
ixgbe_setup_tc() is reached from:
- ixgbe_set_channels() (ethtool -L)
- mqprio
- the DCB netlink handlers
- macvlan offload
- XDP program attach
- the SR-IOV configuration paths
Two more paths do the same: ixgbe_dcb_nl.c and the FCoE enable/disable
code call ndo_stop() and then ndo_open(). The offline self-test in
ixgbe_diag_test() also calls ixgbe_close().
Each time, ixgbe_disable_phy_link() clears IXGBE_ACI_PHY_ENA_LINK. The
reopen then goes:
ixgbe_open()
ixgbe_up_complete()
ixgbe_non_sfp_link_config()
ixgbe_setup_phy_link_e610()
There force_on_required turns the link back on. That forces a full
autonegotiation, which the link partner sees.
ice only forces the link down in ice_stop(). Should this be limited to
the administrative down path?
[Severity: Low]
This block sits outside the netif_device_present() check that guards
the rest of the hardware teardown:
if (netif_device_present(netdev))
ixgbe_close_suspend(adapter);
ixgbe_io_error_detected() calls netif_device_detach(),
ixgbe_close_suspend() and pci_disable_device(), but leaves IFF_UP set.
A later ip link set down, or ixgbe_remove() -> unregister_netdev(), still
reaches ixgbe_close().
In that case, would this send get_phy_caps and set_phy_cfg ACI commands
to a device in PCI error recovery and log "Cannot set PHY link down"?
It would also still call ixgbe_handle_link_down(), which writes the VF
mailbox registers through ixgbe_ping_all_vfs().
> + int err;
> +
> + err = ixgbe_disable_phy_link(&adapter->hw);
[Severity: Medium]
Does this break Wake-on-LAN on E610 once the interface has been closed?
On the close path ixgbe_reset() runs with netif_running() false. With
adapter->wol set, it keeps the PHY powered:
if (hw->phy.ops.set_phy_power) {
if (!netif_running(adapter->netdev) && !adapter->wol)
hw->phy.ops.set_phy_power(hw, false);
else
hw->phy.ops.set_phy_power(hw, true);
ixgbe_close_suspend() then calls ixgbe_enter_lplu_e610(), which needs
link to enter LPLU. Right after that, ixgbe_disable_phy_link() clears
IXGBE_ACI_PHY_ENA_LINK and the firmware drops the link.
On a later suspend or shutdown, __ixgbe_shutdown() sees !netif_running()
and skips ixgbe_close_suspend(). With wufc set it programs WUFC and calls
pci_wake_from_d3(). Nothing restores ENA_LINK on E610, where
enable_tx_laser and stop_link_on_d3 are NULL.
Would the device then be armed to wake on magic or pattern packets that
it cannot receive? Should adapter->wol be checked here, or the link be
re-enabled when wake is armed?
> + if (err)
> + e_err(drv, "Cannot set PHY link down\n");
> +
> + ixgbe_handle_link_down(adapter);
[Severity: Low]
If ixgbe_disable_phy_link() fails, this still logs "NIC Link is Down"
and pings every VF about a link change. That comes right after the log
says the PHY link could not be brought down. Should the error path skip
ixgbe_handle_link_down()?
The netif_carrier_off() in the helper also does nothing here, because
ixgbe_down() has already turned the carrier off.
Separately, only the tail of ixgbe_watchdog_link_is_down() moved into
the helper. This state reset stays in the watchdog:
adapter->link_up = false;
adapter->link_speed = 0;
After this close path, adapter->link_up and adapter->link_speed still
say the link is up. ixgbe_send_vf_link_status() returns these values to
E610 VFs:
msgbuf[1] = adapter->link_speed;
msgbuf[2] = adapter->link_up;
VF mailbox handling runs from the ixgbe_msix_other() interrupt, which is
freed on close. So the stale values only matter in the window after
reopen, before the first watchdog run.
Should the helper reset link_up and link_speed as well?
> + }
> +
> ixgbe_release_hw_control(adapter);
>
> return 0;
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261204223807.3920143-1-anthony.l.nguyen%40intel.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH net-next 3/5] ixgbe: use int instead of u32 for error code variables
2026-12-04 22:38 ` [PATCH net-next 3/5] ixgbe: use int instead of u32 for error code variables Tony Nguyen
@ 2026-12-05 22:47 ` netdev-bot+sashiko
0 siblings, 0 replies; 9+ messages in thread
From: netdev-bot+sashiko @ 2026-12-05 22:47 UTC (permalink / raw)
To: anthony.l.nguyen
Cc: davem, kuba, pabeni, edumazet, andrew+netdev, willemb, netdev,
adiyenga, jedrzej.jagielski, jacob.e.keller, aleksandr.loktionov,
rafal.romanowski
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] The rationale in the commit message for "ixgbe: use int instead
of u32 for error code variables" is factually wrong, and it reads as…
--
ixgbe: use int instead of u32 for error code variables
This commit changes ten local variables in ixgbe_main.c, ixgbe_phy.c and
ixgbe_x550.c from u32 to int, because they hold negative errno return
values. The commit message says there is no functional change.
> Storing them in an unsigned
> u32 silently wraps the value: -EIO (0xFFFFFFF7) stored in u32 becomes a
> large positive number, so any "if (status)" truthiness check still works
> by accident, but comparisons against specific negative error codes or
> propagation up the call stack produce wrong results.
[Severity: Low]
Is the hex value here correct? EIO is 5, so -EIO as a 32-bit value is
0xFFFFFFFB. 0xFFFFFFF7 is -9, which is -EBADF.
Does the rest of this paragraph match the code being changed?
Each changed variable is returned from a function declared to return int.
Converting from u32 back to int gives the original negative errno.
Equality checks such as status == -EIO also still work, because -EIO is
converted to unsigned for the comparison. Only a relational check such as
status < 0 would give a wrong result.
None of the ten functions touched here does a relational comparison on
these variables. For example, ixgbe_resume() only tests err for truth and
returns it:
err = pci_enable_device_mem(pdev);
if (err) {
e_dev_err("Cannot enable PCI device from suspend\n");
return err;
}
...
if (!err)
netif_device_attach(netdev);
rtnl_unlock();
return err;
The other functions follow the same if (status) / return status pattern.
That appears to contradict the later statement:
> No functional change.
Could the rationale be limited to type correctness and readability, so
that it doesn't read as though an existing runtime bug is being fixed?
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261204223807.3920143-1-anthony.l.nguyen%40intel.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH net-next 5/5] ixgbevf: Warn when mailbox API negotiation fails
2026-12-04 22:38 ` [PATCH net-next 5/5] ixgbevf: Warn when mailbox API negotiation fails Tony Nguyen
@ 2026-12-05 22:47 ` netdev-bot+sashiko
0 siblings, 0 replies; 9+ messages in thread
From: netdev-bot+sashiko @ 2026-12-05 22:47 UTC (permalink / raw)
To: anthony.l.nguyen
Cc: davem, kuba, pabeni, edumazet, andrew+netdev, willemb, netdev,
adiyenga, jedrzej.jagielski, jacob.e.keller, aleksandr.loktionov,
rafal.romanowski
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] The commit message repeats itself.
- [Low] The new warning in ixgbevf_negotiate_api()
(drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c) has two…
--
ixgbevf: Warn when mailbox API negotiation fails
This patch adds a netdev_warn() to ixgbevf_negotiate_api() for the case
where every mailbox API version from ixgbe_mbox_api_17 down to
ixgbe_mbox_api_10 is rejected. The warning includes the error from the
last attempt. Negotiation and fallback behavior are unchanged.
> This is a diagnostic improvement only; negotiation, fallback and recovery
> behavior remain unchanged.
>
> This is a diagnostic improvement only.
[Severity: Low]
This isn't a bug, but the second sentence repeats the first paragraph and
looks like an editing leftover. Could it be dropped?
> diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
> index 7eb4acf59dab6..52670b616abc2 100644
> --- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
> +++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
> @@ -2344,6 +2344,10 @@ static void ixgbevf_negotiate_api(struct ixgbevf_adapter *adapter)
> idx++;
> }
>
> + if (api[idx] == ixgbe_mbox_api_unknown)
> + netdev_warn(adapter->netdev,
> + "Mailbox API negotiation with PF failed: %d\n", err);
[Severity: Low]
Will this printed value be misleading?
The err value never holds a kernel errno. It comes from
ixgbevf_negotiate_api_version_vf() in vf.c, which returns either the
mailbox result or IXGBE_ERR_INVALID_ARGUMENT:
drivers/net/ethernet/intel/ixgbevf/vf.c:ixgbevf_negotiate_api_version_vf() {
...
err = ixgbevf_write_msg_read_ack(hw, msg, msg, ARRAY_SIZE(msg));
if (!err) {
...
err = IXGBE_ERR_INVALID_ARGUMENT;
}
return err;
}
These private codes in defines.h use the same numbers as errno values:
#define IXGBE_ERR_INVALID_ARGUMENT -3
#define IXGBE_ERR_CONFIG -4
#define IXGBE_ERR_MBX -5
#define IXGBE_ERR_TIMEOUT -6
So "failed: -5" reads like -EIO but means IXGBE_ERR_MBX. Similarly, -3 reads
like -ESRCH but means the PF rejected every version.
Since the goal of the patch is easier diagnosis, could the message say that
this is a driver code, or translate it to an errno or a string?
The first call comes from probe, before the netdev has a name:
ixgbevf_probe()
ixgbevf_sw_init()
ixgbevf_negotiate_api()
netdev_warn(adapter->netdev, ...)
...
strcpy(netdev->name, "eth%d");
err = register_netdev(netdev);
At that point netdev_warn() prints the device as "(unnamed net_device)
(uninitialized)". The PCI device is still shown because SET_NETDEV_DEV()
has already run.
The other messages in ixgbevf_sw_init() use dev_info(&pdev->dev, ...).
Would dev_warn(&adapter->pdev->dev, ...) give clearer output here, including
on the later ixgbevf_reset() path?
> +
> ixgbevf_set_features(adapter);
>
> if (adapter->pf_features & IXGBEVF_PF_SUP_ESX_MBX) {
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261204223807.3920143-1-anthony.l.nguyen%40intel.com
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2026-12-05 22:47 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-04 22:38 [PATCH net-next 0/5][pull request] Intel Wired LAN Driver Updates 2026-12-04 (ixgbe, ixgbevf) Tony Nguyen
2026-12-04 22:38 ` [PATCH net-next 1/5] ixgbe: E610: force phy link to get down when interface is down Tony Nguyen
2026-12-05 22:47 ` netdev-bot+sashiko
2026-12-04 22:38 ` [PATCH net-next 2/5] ixgbe: use ktime_get_real_ns() in ixgbe_ptp_reset() Tony Nguyen
2026-12-04 22:38 ` [PATCH net-next 3/5] ixgbe: use int instead of u32 for error code variables Tony Nguyen
2026-12-05 22:47 ` netdev-bot+sashiko
2026-12-04 22:38 ` [PATCH net-next 4/5] ixgbe: LinkSec deprecated macros cleanup Tony Nguyen
2026-12-04 22:38 ` [PATCH net-next 5/5] ixgbevf: Warn when mailbox API negotiation fails Tony Nguyen
2026-12-05 22:47 ` netdev-bot+sashiko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox