Skip to content

Commit 61dbc61

Browse files
committed
Merge branch 'intel-wired-lan-driver-updates-2025-11-25-ice-idpf-iavf-ixgbe-ixgbevf-e1000e'
Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2025-11-25 (ice, idpf, iavf, ixgbe, ixgbevf, e1000e) Natalia cleans up ixgbevf_q_vector struct removing an unused field. Emil converts vport state tracking from enum to bitmap and removes unneeded states for idpf. Tony removes an unneeded check from e1000e. Alok Tiwari removes an unnecessary second call to ixgbe_non_sfp_link_config() and adjusts the checked member, in idpf, to reflect the member that is later used. He also fixes various typos and messages for better clarity misc Intel drivers. ==================== Link: https://patch.msgid.link/20251125223632.1857532-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2 parents 4636b4e + 57bb13d commit 61dbc61

13 files changed

Lines changed: 47 additions & 65 deletions

File tree

drivers/net/ethernet/intel/e1000e/ethtool.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -551,9 +551,9 @@ static int e1000_set_eeprom(struct net_device *netdev,
551551
{
552552
struct e1000_adapter *adapter = netdev_priv(netdev);
553553
struct e1000_hw *hw = &adapter->hw;
554-
size_t total_len, max_len;
555554
u16 *eeprom_buff;
556555
int ret_val = 0;
556+
size_t max_len;
557557
int first_word;
558558
int last_word;
559559
void *ptr;
@@ -571,10 +571,6 @@ static int e1000_set_eeprom(struct net_device *netdev,
571571

572572
max_len = hw->nvm.word_size * 2;
573573

574-
if (check_add_overflow(eeprom->offset, eeprom->len, &total_len) ||
575-
total_len > max_len)
576-
return -EFBIG;
577-
578574
first_word = eeprom->offset >> 1;
579575
last_word = (eeprom->offset + eeprom->len - 1) >> 1;
580576
eeprom_buff = kmalloc(max_len, GFP_KERNEL);

drivers/net/ethernet/intel/iavf/iavf_virtchnl.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -793,7 +793,8 @@ void iavf_add_vlans(struct iavf_adapter *adapter)
793793

794794
len = virtchnl_struct_size(vvfl, vlan_id, count);
795795
if (len > IAVF_MAX_AQ_BUF_SIZE) {
796-
dev_warn(&adapter->pdev->dev, "Too many add VLAN changes in one request\n");
796+
dev_info(&adapter->pdev->dev,
797+
"virtchnl: Too many VLAN add (v1) requests; splitting into multiple messages to PF\n");
797798
while (len > IAVF_MAX_AQ_BUF_SIZE)
798799
len = virtchnl_struct_size(vvfl, vlan_id,
799800
--count);
@@ -838,7 +839,8 @@ void iavf_add_vlans(struct iavf_adapter *adapter)
838839

839840
len = virtchnl_struct_size(vvfl_v2, filters, count);
840841
if (len > IAVF_MAX_AQ_BUF_SIZE) {
841-
dev_warn(&adapter->pdev->dev, "Too many add VLAN changes in one request\n");
842+
dev_info(&adapter->pdev->dev,
843+
"virtchnl: Too many VLAN add (v2) requests; splitting into multiple messages to PF\n");
842844
while (len > IAVF_MAX_AQ_BUF_SIZE)
843845
len = virtchnl_struct_size(vvfl_v2, filters,
844846
--count);
@@ -941,7 +943,8 @@ void iavf_del_vlans(struct iavf_adapter *adapter)
941943

942944
len = virtchnl_struct_size(vvfl, vlan_id, count);
943945
if (len > IAVF_MAX_AQ_BUF_SIZE) {
944-
dev_warn(&adapter->pdev->dev, "Too many delete VLAN changes in one request\n");
946+
dev_info(&adapter->pdev->dev,
947+
"virtchnl: Too many VLAN delete (v1) requests; splitting into multiple messages to PF\n");
945948
while (len > IAVF_MAX_AQ_BUF_SIZE)
946949
len = virtchnl_struct_size(vvfl, vlan_id,
947950
--count);
@@ -987,7 +990,8 @@ void iavf_del_vlans(struct iavf_adapter *adapter)
987990

988991
len = virtchnl_struct_size(vvfl_v2, filters, count);
989992
if (len > IAVF_MAX_AQ_BUF_SIZE) {
990-
dev_warn(&adapter->pdev->dev, "Too many add VLAN changes in one request\n");
993+
dev_info(&adapter->pdev->dev,
994+
"virtchnl: Too many VLAN delete (v2) requests; splitting into multiple messages to PF\n");
991995
while (len > IAVF_MAX_AQ_BUF_SIZE)
992996
len = virtchnl_struct_size(vvfl_v2, filters,
993997
--count);

drivers/net/ethernet/intel/ice/ice_fdir.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1121,7 +1121,7 @@ ice_fdir_get_gen_prgm_pkt(struct ice_hw *hw, struct ice_fdir_fltr *input,
11211121
* ice_fdir_has_frag - does flow type have 2 ptypes
11221122
* @flow: flow ptype
11231123
*
1124-
* returns true is there is a fragment packet for this ptype
1124+
* Return: true if there is a fragment packet for this ptype
11251125
*/
11261126
bool ice_fdir_has_frag(enum ice_fltr_ptype flow)
11271127
{

drivers/net/ethernet/intel/ice/ice_fw_update.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ ice_erase_nvm_module(struct ice_pf *pf, u16 module, const char *component,
534534
}
535535

536536
if (completion_retval) {
537-
dev_err(dev, "Firmware failed to erase %s (module 0x02%x), aq_err %s\n",
537+
dev_err(dev, "Firmware failed to erase %s (module 0x%02x), aq_err %s\n",
538538
component, module,
539539
libie_aq_str((enum libie_aq_err)completion_retval));
540540
NL_SET_ERR_MSG_MOD(extack, "Firmware failed to erase flash");

drivers/net/ethernet/intel/idpf/idpf.h

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -131,14 +131,12 @@ enum idpf_cap_field {
131131

132132
/**
133133
* enum idpf_vport_state - Current vport state
134-
* @__IDPF_VPORT_DOWN: Vport is down
135-
* @__IDPF_VPORT_UP: Vport is up
136-
* @__IDPF_VPORT_STATE_LAST: Must be last, number of states
134+
* @IDPF_VPORT_UP: Vport is up
135+
* @IDPF_VPORT_STATE_NBITS: Must be last, number of states
137136
*/
138137
enum idpf_vport_state {
139-
__IDPF_VPORT_DOWN,
140-
__IDPF_VPORT_UP,
141-
__IDPF_VPORT_STATE_LAST,
138+
IDPF_VPORT_UP,
139+
IDPF_VPORT_STATE_NBITS
142140
};
143141

144142
/**
@@ -162,7 +160,7 @@ struct idpf_netdev_priv {
162160
u16 vport_idx;
163161
u16 max_tx_hdr_size;
164162
u16 tx_max_bufs;
165-
enum idpf_vport_state state;
163+
DECLARE_BITMAP(state, IDPF_VPORT_STATE_NBITS);
166164
struct rtnl_link_stats64 netstats;
167165
spinlock_t stats_lock;
168166
};

drivers/net/ethernet/intel/idpf/idpf_ethtool.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ static int idpf_get_rxfh(struct net_device *netdev,
402402
}
403403

404404
rss_data = &adapter->vport_config[np->vport_idx]->user_config.rss_data;
405-
if (np->state != __IDPF_VPORT_UP)
405+
if (!test_bit(IDPF_VPORT_UP, np->state))
406406
goto unlock_mutex;
407407

408408
rxfh->hfunc = ETH_RSS_HASH_TOP;
@@ -452,7 +452,7 @@ static int idpf_set_rxfh(struct net_device *netdev,
452452
}
453453

454454
rss_data = &adapter->vport_config[vport->idx]->user_config.rss_data;
455-
if (np->state != __IDPF_VPORT_UP)
455+
if (!test_bit(IDPF_VPORT_UP, np->state))
456456
goto unlock_mutex;
457457

458458
if (rxfh->hfunc != ETH_RSS_HASH_NO_CHANGE &&
@@ -1183,7 +1183,7 @@ static void idpf_get_ethtool_stats(struct net_device *netdev,
11831183
idpf_vport_ctrl_lock(netdev);
11841184
vport = idpf_netdev_to_vport(netdev);
11851185

1186-
if (np->state != __IDPF_VPORT_UP) {
1186+
if (!test_bit(IDPF_VPORT_UP, np->state)) {
11871187
idpf_vport_ctrl_unlock(netdev);
11881188

11891189
return;
@@ -1335,7 +1335,7 @@ static int idpf_get_q_coalesce(struct net_device *netdev,
13351335
idpf_vport_ctrl_lock(netdev);
13361336
vport = idpf_netdev_to_vport(netdev);
13371337

1338-
if (np->state != __IDPF_VPORT_UP)
1338+
if (!test_bit(IDPF_VPORT_UP, np->state))
13391339
goto unlock_mutex;
13401340

13411341
if (q_num >= vport->num_rxq && q_num >= vport->num_txq) {
@@ -1523,7 +1523,7 @@ static int idpf_set_coalesce(struct net_device *netdev,
15231523
idpf_vport_ctrl_lock(netdev);
15241524
vport = idpf_netdev_to_vport(netdev);
15251525

1526-
if (np->state != __IDPF_VPORT_UP)
1526+
if (!test_bit(IDPF_VPORT_UP, np->state))
15271527
goto unlock_mutex;
15281528

15291529
for (i = 0; i < vport->num_txq; i++) {
@@ -1726,7 +1726,7 @@ static void idpf_get_ts_stats(struct net_device *netdev,
17261726
ts_stats->err = u64_stats_read(&vport->tstamp_stats.discarded);
17271727
} while (u64_stats_fetch_retry(&vport->tstamp_stats.stats_sync, start));
17281728

1729-
if (np->state != __IDPF_VPORT_UP)
1729+
if (!test_bit(IDPF_VPORT_UP, np->state))
17301730
goto exit;
17311731

17321732
for (u16 i = 0; i < vport->num_txq_grp; i++) {

drivers/net/ethernet/intel/idpf/idpf_lib.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ static int idpf_del_mac_filter(struct idpf_vport *vport,
519519
}
520520
spin_unlock_bh(&vport_config->mac_filter_list_lock);
521521

522-
if (np->state == __IDPF_VPORT_UP) {
522+
if (test_bit(IDPF_VPORT_UP, np->state)) {
523523
int err;
524524

525525
err = idpf_add_del_mac_filters(vport, np, false, async);
@@ -590,7 +590,7 @@ static int idpf_add_mac_filter(struct idpf_vport *vport,
590590
if (err)
591591
return err;
592592

593-
if (np->state == __IDPF_VPORT_UP)
593+
if (test_bit(IDPF_VPORT_UP, np->state))
594594
err = idpf_add_del_mac_filters(vport, np, true, async);
595595

596596
return err;
@@ -894,7 +894,7 @@ static void idpf_vport_stop(struct idpf_vport *vport, bool rtnl)
894894
{
895895
struct idpf_netdev_priv *np = netdev_priv(vport->netdev);
896896

897-
if (np->state <= __IDPF_VPORT_DOWN)
897+
if (!test_bit(IDPF_VPORT_UP, np->state))
898898
return;
899899

900900
if (rtnl)
@@ -921,7 +921,7 @@ static void idpf_vport_stop(struct idpf_vport *vport, bool rtnl)
921921
idpf_xdp_rxq_info_deinit_all(vport);
922922
idpf_vport_queues_rel(vport);
923923
idpf_vport_intr_rel(vport);
924-
np->state = __IDPF_VPORT_DOWN;
924+
clear_bit(IDPF_VPORT_UP, np->state);
925925

926926
if (rtnl)
927927
rtnl_unlock();
@@ -1345,7 +1345,7 @@ static int idpf_up_complete(struct idpf_vport *vport)
13451345
netif_tx_start_all_queues(vport->netdev);
13461346
}
13471347

1348-
np->state = __IDPF_VPORT_UP;
1348+
set_bit(IDPF_VPORT_UP, np->state);
13491349

13501350
return 0;
13511351
}
@@ -1391,7 +1391,7 @@ static int idpf_vport_open(struct idpf_vport *vport, bool rtnl)
13911391
struct idpf_vport_config *vport_config;
13921392
int err;
13931393

1394-
if (np->state != __IDPF_VPORT_DOWN)
1394+
if (test_bit(IDPF_VPORT_UP, np->state))
13951395
return -EBUSY;
13961396

13971397
if (rtnl)
@@ -1602,7 +1602,7 @@ void idpf_init_task(struct work_struct *work)
16021602

16031603
/* Once state is put into DOWN, driver is ready for dev_open */
16041604
np = netdev_priv(vport->netdev);
1605-
np->state = __IDPF_VPORT_DOWN;
1605+
clear_bit(IDPF_VPORT_UP, np->state);
16061606
if (test_and_clear_bit(IDPF_VPORT_UP_REQUESTED, vport_config->flags))
16071607
idpf_vport_open(vport, true);
16081608

@@ -1801,7 +1801,7 @@ static void idpf_set_vport_state(struct idpf_adapter *adapter)
18011801
continue;
18021802

18031803
np = netdev_priv(adapter->netdevs[i]);
1804-
if (np->state == __IDPF_VPORT_UP)
1804+
if (test_bit(IDPF_VPORT_UP, np->state))
18051805
set_bit(IDPF_VPORT_UP_REQUESTED,
18061806
adapter->vport_config[i]->flags);
18071807
}
@@ -1939,7 +1939,7 @@ int idpf_initiate_soft_reset(struct idpf_vport *vport,
19391939
enum idpf_vport_reset_cause reset_cause)
19401940
{
19411941
struct idpf_netdev_priv *np = netdev_priv(vport->netdev);
1942-
enum idpf_vport_state current_state = np->state;
1942+
bool vport_is_up = test_bit(IDPF_VPORT_UP, np->state);
19431943
struct idpf_adapter *adapter = vport->adapter;
19441944
struct idpf_vport *new_vport;
19451945
int err;
@@ -1990,7 +1990,7 @@ int idpf_initiate_soft_reset(struct idpf_vport *vport,
19901990
goto free_vport;
19911991
}
19921992

1993-
if (current_state <= __IDPF_VPORT_DOWN) {
1993+
if (!vport_is_up) {
19941994
idpf_send_delete_queues_msg(vport);
19951995
} else {
19961996
set_bit(IDPF_VPORT_DEL_QUEUES, vport->flags);
@@ -2023,7 +2023,7 @@ int idpf_initiate_soft_reset(struct idpf_vport *vport,
20232023
if (err)
20242024
goto err_open;
20252025

2026-
if (current_state == __IDPF_VPORT_UP)
2026+
if (vport_is_up)
20272027
err = idpf_vport_open(vport, false);
20282028

20292029
goto free_vport;
@@ -2033,7 +2033,7 @@ int idpf_initiate_soft_reset(struct idpf_vport *vport,
20332033
vport->num_rxq, vport->num_bufq);
20342034

20352035
err_open:
2036-
if (current_state == __IDPF_VPORT_UP)
2036+
if (vport_is_up)
20372037
idpf_vport_open(vport, false);
20382038

20392039
free_vport:

drivers/net/ethernet/intel/idpf/idpf_singleq_txrx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ static bool idpf_tx_singleq_clean(struct idpf_tx_queue *tx_q, int napi_budget,
570570
np = netdev_priv(tx_q->netdev);
571571
nq = netdev_get_tx_queue(tx_q->netdev, tx_q->idx);
572572

573-
dont_wake = np->state != __IDPF_VPORT_UP ||
573+
dont_wake = !test_bit(IDPF_VPORT_UP, np->state) ||
574574
!netif_carrier_ok(tx_q->netdev);
575575
__netif_txq_completed_wake(nq, ss.packets, ss.bytes,
576576
IDPF_DESC_UNUSED(tx_q), IDPF_TX_WAKE_THRESH,

drivers/net/ethernet/intel/idpf/idpf_txrx.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ static void idpf_compl_desc_rel(struct idpf_compl_queue *complq)
134134
{
135135
idpf_xsk_clear_queue(complq, VIRTCHNL2_QUEUE_TYPE_TX_COMPLETION);
136136

137-
if (!complq->comp)
137+
if (!complq->desc_ring)
138138
return;
139139

140140
dma_free_coherent(complq->netdev->dev.parent, complq->size,
@@ -922,8 +922,8 @@ static int idpf_rx_desc_alloc_all(struct idpf_vport *vport)
922922
err = idpf_rx_desc_alloc(vport, q);
923923
if (err) {
924924
pci_err(vport->adapter->pdev,
925-
"Memory allocation for Rx Queue %u failed\n",
926-
i);
925+
"Memory allocation for Rx queue %u from queue group %u failed\n",
926+
j, i);
927927
goto err_out;
928928
}
929929
}
@@ -939,8 +939,8 @@ static int idpf_rx_desc_alloc_all(struct idpf_vport *vport)
939939
err = idpf_bufq_desc_alloc(vport, q);
940940
if (err) {
941941
pci_err(vport->adapter->pdev,
942-
"Memory allocation for Rx Buffer Queue %u failed\n",
943-
i);
942+
"Memory allocation for Rx Buffer Queue %u from queue group %u failed\n",
943+
j, i);
944944
goto err_out;
945945
}
946946
}
@@ -2275,7 +2275,7 @@ static bool idpf_tx_clean_complq(struct idpf_compl_queue *complq, int budget,
22752275
/* Update BQL */
22762276
nq = netdev_get_tx_queue(tx_q->netdev, tx_q->idx);
22772277

2278-
dont_wake = !complq_ok || np->state != __IDPF_VPORT_UP ||
2278+
dont_wake = !complq_ok || !test_bit(IDPF_VPORT_UP, np->state) ||
22792279
!netif_carrier_ok(tx_q->netdev);
22802280
/* Check if the TXQ needs to and can be restarted */
22812281
__netif_txq_completed_wake(nq, tx_q->cleaned_pkts, tx_q->cleaned_bytes,

drivers/net/ethernet/intel/idpf/idpf_virtchnl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ static void idpf_handle_event_link(struct idpf_adapter *adapter,
6868

6969
vport->link_up = v2e->link_status;
7070

71-
if (np->state != __IDPF_VPORT_UP)
71+
if (!test_bit(IDPF_VPORT_UP, np->state))
7272
return;
7373

7474
if (vport->link_up) {
@@ -2755,7 +2755,7 @@ int idpf_send_get_stats_msg(struct idpf_vport *vport)
27552755

27562756

27572757
/* Don't send get_stats message if the link is down */
2758-
if (np->state <= __IDPF_VPORT_DOWN)
2758+
if (!test_bit(IDPF_VPORT_UP, np->state))
27592759
return 0;
27602760

27612761
stats_msg.vport_id = cpu_to_le32(vport->vport_id);

0 commit comments

Comments
 (0)