Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue

Tony Nguyen says:

====================
Intel Wired LAN Driver Updates 2025-09-09 (igb, i40e)

For igb:
Tianyu Xu removes passing of, no longer needed, NAPI id to avoid NULL
pointer dereference on ethtool loopback testing.

Kohei Enju corrects reporting/testing of link state when interface is
down.

For i40e:
Michal Schmidt corrects value being passed to free_irq().

Jake sets hardware maximum frame size on probe to ensure
expected/consistent state.

* '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue:
i40e: fix Jumbo Frame support after iPXE boot
i40e: fix IRQ freeing in i40e_vsi_request_irq_msix error path
igb: fix link test skipping when interface is admin down
igb: Fix NULL pointer dereference in ethtool loopback test
====================

Link: https://patch.msgid.link/20250909203236.3603960-1-anthony.l.nguyen@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+50 -13
+1
drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
··· 1561 1561 struct i40e_aq_set_mac_config { 1562 1562 __le16 max_frame_size; 1563 1563 u8 params; 1564 + #define I40E_AQ_SET_MAC_CONFIG_CRC_EN BIT(2) 1564 1565 u8 tx_timer_priority; /* bitmap */ 1565 1566 __le16 tx_timer_value; 1566 1567 __le16 fc_refresh_threshold;
+34
drivers/net/ethernet/intel/i40e/i40e_common.c
··· 1190 1190 } 1191 1191 1192 1192 /** 1193 + * i40e_aq_set_mac_config - Configure MAC settings 1194 + * @hw: pointer to the hw struct 1195 + * @max_frame_size: Maximum Frame Size to be supported by the port 1196 + * @cmd_details: pointer to command details structure or NULL 1197 + * 1198 + * Set MAC configuration (0x0603). Note that max_frame_size must be greater 1199 + * than zero. 1200 + * 1201 + * Return: 0 on success, or a negative error code on failure. 1202 + */ 1203 + int i40e_aq_set_mac_config(struct i40e_hw *hw, u16 max_frame_size, 1204 + struct i40e_asq_cmd_details *cmd_details) 1205 + { 1206 + struct i40e_aq_set_mac_config *cmd; 1207 + struct libie_aq_desc desc; 1208 + 1209 + cmd = libie_aq_raw(&desc); 1210 + 1211 + if (max_frame_size == 0) 1212 + return -EINVAL; 1213 + 1214 + i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_set_mac_config); 1215 + 1216 + cmd->max_frame_size = cpu_to_le16(max_frame_size); 1217 + cmd->params = I40E_AQ_SET_MAC_CONFIG_CRC_EN; 1218 + 1219 + #define I40E_AQ_SET_MAC_CONFIG_FC_DEFAULT_THRESHOLD 0x7FFF 1220 + cmd->fc_refresh_threshold = 1221 + cpu_to_le16(I40E_AQ_SET_MAC_CONFIG_FC_DEFAULT_THRESHOLD); 1222 + 1223 + return i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details); 1224 + } 1225 + 1226 + /** 1193 1227 * i40e_aq_clear_pxe_mode 1194 1228 * @hw: pointer to the hw struct 1195 1229 * @cmd_details: pointer to command details structure or NULL
+11 -7
drivers/net/ethernet/intel/i40e/i40e_main.c
··· 4156 4156 irq_num = pf->msix_entries[base + vector].vector; 4157 4157 irq_set_affinity_notifier(irq_num, NULL); 4158 4158 irq_update_affinity_hint(irq_num, NULL); 4159 - free_irq(irq_num, &vsi->q_vectors[vector]); 4159 + free_irq(irq_num, vsi->q_vectors[vector]); 4160 4160 } 4161 4161 return err; 4162 4162 } ··· 16045 16045 dev_dbg(&pf->pdev->dev, "get supported phy types ret = %pe last_status = %s\n", 16046 16046 ERR_PTR(err), libie_aq_str(pf->hw.aq.asq_last_status)); 16047 16047 16048 - /* make sure the MFS hasn't been set lower than the default */ 16049 16048 #define MAX_FRAME_SIZE_DEFAULT 0x2600 16050 - val = FIELD_GET(I40E_PRTGL_SAH_MFS_MASK, 16051 - rd32(&pf->hw, I40E_PRTGL_SAH)); 16052 - if (val < MAX_FRAME_SIZE_DEFAULT) 16053 - dev_warn(&pdev->dev, "MFS for port %x (%d) has been set below the default (%d)\n", 16054 - pf->hw.port, val, MAX_FRAME_SIZE_DEFAULT); 16049 + 16050 + err = i40e_aq_set_mac_config(hw, MAX_FRAME_SIZE_DEFAULT, NULL); 16051 + if (err) 16052 + dev_warn(&pdev->dev, "set mac config ret = %pe last_status = %s\n", 16053 + ERR_PTR(err), libie_aq_str(pf->hw.aq.asq_last_status)); 16054 + 16055 + /* Make sure the MFS is set to the expected value */ 16056 + val = rd32(hw, I40E_PRTGL_SAH); 16057 + FIELD_MODIFY(I40E_PRTGL_SAH_MFS_MASK, &val, MAX_FRAME_SIZE_DEFAULT); 16058 + wr32(hw, I40E_PRTGL_SAH, val); 16055 16059 16056 16060 /* Add a filter to drop all Flow control frames from any VSI from being 16057 16061 * transmitted. By doing so we stop a malicious VF from sending out
+2
drivers/net/ethernet/intel/i40e/i40e_prototype.h
··· 98 98 struct i40e_asq_cmd_details *cmd_details); 99 99 int i40e_aq_set_phy_int_mask(struct i40e_hw *hw, u16 mask, 100 100 struct i40e_asq_cmd_details *cmd_details); 101 + int i40e_aq_set_mac_config(struct i40e_hw *hw, u16 max_frame_size, 102 + struct i40e_asq_cmd_details *cmd_details); 101 103 int i40e_aq_clear_pxe_mode(struct i40e_hw *hw, 102 104 struct i40e_asq_cmd_details *cmd_details); 103 105 int i40e_aq_set_link_restart_an(struct i40e_hw *hw,
+1 -4
drivers/net/ethernet/intel/igb/igb_ethtool.c
··· 2081 2081 } else { 2082 2082 dev_info(&adapter->pdev->dev, "online testing starting\n"); 2083 2083 2084 - /* PHY is powered down when interface is down */ 2085 - if (if_running && igb_link_test(adapter, &data[TEST_LINK])) 2084 + if (igb_link_test(adapter, &data[TEST_LINK])) 2086 2085 eth_test->flags |= ETH_TEST_FL_FAILED; 2087 - else 2088 - data[TEST_LINK] = 0; 2089 2086 2090 2087 /* Online tests aren't run; pass by default */ 2091 2088 data[TEST_REG] = 0;
+1 -2
drivers/net/ethernet/intel/igb/igb_main.c
··· 4453 4453 if (xdp_rxq_info_is_reg(&rx_ring->xdp_rxq)) 4454 4454 xdp_rxq_info_unreg(&rx_ring->xdp_rxq); 4455 4455 res = xdp_rxq_info_reg(&rx_ring->xdp_rxq, rx_ring->netdev, 4456 - rx_ring->queue_index, 4457 - rx_ring->q_vector->napi.napi_id); 4456 + rx_ring->queue_index, 0); 4458 4457 if (res < 0) { 4459 4458 dev_err(dev, "Failed to register xdp_rxq index %u\n", 4460 4459 rx_ring->queue_index);