Skip to content

Commit 4788859

Browse files
author
Paolo Abeni
committed
Merge branch 'intel-wired-lan-update-2026-04-27-ice-iavf'
Jacob Keller says: ==================== Intel Wired LAN Update 2026-04-27 (ice, iavf) Petr Oros from RedHat has accumulated a number of fixes for the Intel ice and iavf drivers, bundled together in this series. First, a series of 4 fixes to resolve issues with the iavf driver logic for handling VLAN filters. This includes keeping VLAN filters while the interface is brought down, waiting for confirmation on filter deletion before deleting filters from the driver tracking structures, and handling the VIRTCHNL_OP_ADD_VLAN for the old v1 VLAN_ADD command. A fix for a crash in ice_reset_all_vfs(), properly checking for errors when ice_vf_rebuild_vsi() fails. A fix for a possible infinite recursion in ice_cfg_tx_topo() that occurs when trying to apply invalid Tx topology configuration. A fix to initialize the SMA pins in the DPLL subsystem properly. A fix to change the SMA and U.FL pin state for paired pins, ensuring that all flows changing one pin will also update its shared pin appropriately. A preparatory patch to export __dpll_pin_change_ntf() so that drivers can notify pin changes while already holding the dpll_lock. A fix to ensure DPLL notifications are sent for the software-controlled pins which wrap the physical CGU input/output pins. A fix to add DPLL notifications for peer pins when changing the SMA or U.FL pins, ensuring DPLL subsystem is notified about the paired connected pins. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> ==================== Link: https://patch.msgid.link/20260427-jk-iwl-net-petr-oros-fixes-v1-0-cdcb48303fd8@intel.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2 parents 5ef3436 + 9e5dead commit 4788859

11 files changed

Lines changed: 207 additions & 102 deletions

File tree

drivers/dpll/dpll_netlink.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -900,11 +900,21 @@ int dpll_pin_delete_ntf(struct dpll_pin *pin)
900900
return dpll_pin_event_send(DPLL_CMD_PIN_DELETE_NTF, pin);
901901
}
902902

903+
/**
904+
* __dpll_pin_change_ntf - notify that the pin has been changed
905+
* @pin: registered pin pointer
906+
*
907+
* Context: caller must hold dpll_lock. Suitable for use inside pin
908+
* callbacks which are already invoked under dpll_lock.
909+
* Return: 0 if succeeds, error code otherwise.
910+
*/
903911
int __dpll_pin_change_ntf(struct dpll_pin *pin)
904912
{
913+
lockdep_assert_held(&dpll_lock);
905914
dpll_pin_notify(pin, DPLL_PIN_CHANGED);
906915
return dpll_pin_event_send(DPLL_CMD_PIN_CHANGE_NTF, pin);
907916
}
917+
EXPORT_SYMBOL_GPL(__dpll_pin_change_ntf);
908918

909919
/**
910920
* dpll_pin_change_ntf - notify that the pin has been changed

drivers/dpll/dpll_netlink.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,3 @@ int dpll_device_delete_ntf(struct dpll_device *dpll);
1111
int dpll_pin_create_ntf(struct dpll_pin *pin);
1212

1313
int dpll_pin_delete_ntf(struct dpll_pin *pin);
14-
15-
int __dpll_pin_change_ntf(struct dpll_pin *pin);

drivers/net/ethernet/intel/iavf/iavf.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,10 @@ struct iavf_vlan {
158158
enum iavf_vlan_state_t {
159159
IAVF_VLAN_INVALID,
160160
IAVF_VLAN_ADD, /* filter needs to be added */
161-
IAVF_VLAN_IS_NEW, /* filter is new, wait for PF answer */
162-
IAVF_VLAN_ACTIVE, /* filter is accepted by PF */
163-
IAVF_VLAN_DISABLE, /* filter needs to be deleted by PF, then marked INACTIVE */
164-
IAVF_VLAN_INACTIVE, /* filter is inactive, we are in IFF_DOWN */
165-
IAVF_VLAN_REMOVE, /* filter needs to be removed from list */
161+
IAVF_VLAN_ADDING, /* ADD sent to PF, waiting for response */
162+
IAVF_VLAN_ACTIVE, /* PF confirmed, filter is in HW */
163+
IAVF_VLAN_REMOVE, /* filter queued for DEL from PF */
164+
IAVF_VLAN_REMOVING, /* DEL sent to PF, waiting for response */
166165
};
167166

168167
struct iavf_vlan_filter {

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

Lines changed: 12 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -757,10 +757,10 @@ iavf_vlan_filter *iavf_add_vlan(struct iavf_adapter *adapter,
757757
adapter->num_vlan_filters++;
758758
iavf_schedule_aq_request(adapter, IAVF_FLAG_AQ_ADD_VLAN_FILTER);
759759
} else if (f->state == IAVF_VLAN_REMOVE) {
760-
/* Re-add the filter since we cannot tell whether the
761-
* pending delete has already been processed by the PF.
762-
* A duplicate add is harmless.
763-
*/
760+
/* DEL not yet sent to PF, cancel it */
761+
f->state = IAVF_VLAN_ACTIVE;
762+
} else if (f->state == IAVF_VLAN_REMOVING) {
763+
/* DEL already sent to PF, re-add after completion */
764764
f->state = IAVF_VLAN_ADD;
765765
iavf_schedule_aq_request(adapter,
766766
IAVF_FLAG_AQ_ADD_VLAN_FILTER);
@@ -791,37 +791,19 @@ static void iavf_del_vlan(struct iavf_adapter *adapter, struct iavf_vlan vlan)
791791
list_del(&f->list);
792792
kfree(f);
793793
adapter->num_vlan_filters--;
794-
} else {
794+
} else if (f->state != IAVF_VLAN_REMOVING) {
795795
f->state = IAVF_VLAN_REMOVE;
796796
iavf_schedule_aq_request(adapter,
797797
IAVF_FLAG_AQ_DEL_VLAN_FILTER);
798798
}
799+
/* If REMOVING, DEL is already sent to PF; completion
800+
* handler will free the filter when PF confirms.
801+
*/
799802
}
800803

801804
spin_unlock_bh(&adapter->mac_vlan_list_lock);
802805
}
803806

804-
/**
805-
* iavf_restore_filters
806-
* @adapter: board private structure
807-
*
808-
* Restore existing non MAC filters when VF netdev comes back up
809-
**/
810-
static void iavf_restore_filters(struct iavf_adapter *adapter)
811-
{
812-
struct iavf_vlan_filter *f;
813-
814-
/* re-add all VLAN filters */
815-
spin_lock_bh(&adapter->mac_vlan_list_lock);
816-
817-
list_for_each_entry(f, &adapter->vlan_filter_list, list) {
818-
if (f->state == IAVF_VLAN_INACTIVE)
819-
f->state = IAVF_VLAN_ADD;
820-
}
821-
822-
spin_unlock_bh(&adapter->mac_vlan_list_lock);
823-
adapter->aq_required |= IAVF_FLAG_AQ_ADD_VLAN_FILTER;
824-
}
825807

826808
/**
827809
* iavf_get_num_vlans_added - get number of VLANs added
@@ -1246,13 +1228,12 @@ static void iavf_up_complete(struct iavf_adapter *adapter)
12461228
}
12471229

12481230
/**
1249-
* iavf_clear_mac_vlan_filters - Remove mac and vlan filters not sent to PF
1250-
* yet and mark other to be removed.
1231+
* iavf_clear_mac_filters - Remove MAC filters not sent to PF yet and mark
1232+
* others to be removed.
12511233
* @adapter: board private structure
12521234
**/
1253-
static void iavf_clear_mac_vlan_filters(struct iavf_adapter *adapter)
1235+
static void iavf_clear_mac_filters(struct iavf_adapter *adapter)
12541236
{
1255-
struct iavf_vlan_filter *vlf, *vlftmp;
12561237
struct iavf_mac_filter *f, *ftmp;
12571238

12581239
spin_lock_bh(&adapter->mac_vlan_list_lock);
@@ -1271,11 +1252,6 @@ static void iavf_clear_mac_vlan_filters(struct iavf_adapter *adapter)
12711252
}
12721253
}
12731254

1274-
/* disable all VLAN filters */
1275-
list_for_each_entry_safe(vlf, vlftmp, &adapter->vlan_filter_list,
1276-
list)
1277-
vlf->state = IAVF_VLAN_DISABLE;
1278-
12791255
spin_unlock_bh(&adapter->mac_vlan_list_lock);
12801256
}
12811257

@@ -1371,7 +1347,7 @@ void iavf_down(struct iavf_adapter *adapter)
13711347
iavf_napi_disable_all(adapter);
13721348
iavf_irq_disable(adapter);
13731349

1374-
iavf_clear_mac_vlan_filters(adapter);
1350+
iavf_clear_mac_filters(adapter);
13751351
iavf_clear_cloud_filters(adapter);
13761352
iavf_clear_fdir_filters(adapter);
13771353
iavf_clear_adv_rss_conf(adapter);
@@ -1388,8 +1364,6 @@ void iavf_down(struct iavf_adapter *adapter)
13881364
*/
13891365
if (!list_empty(&adapter->mac_filter_list))
13901366
adapter->aq_required |= IAVF_FLAG_AQ_DEL_MAC_FILTER;
1391-
if (!list_empty(&adapter->vlan_filter_list))
1392-
adapter->aq_required |= IAVF_FLAG_AQ_DEL_VLAN_FILTER;
13931367
if (!list_empty(&adapter->cloud_filter_list))
13941368
adapter->aq_required |= IAVF_FLAG_AQ_DEL_CLOUD_FILTER;
13951369
if (!list_empty(&adapter->fdir_list_head))
@@ -4494,8 +4468,6 @@ static int iavf_open(struct net_device *netdev)
44944468
iavf_add_filter(adapter, adapter->hw.mac.addr);
44954469
spin_unlock_bh(&adapter->mac_vlan_list_lock);
44964470

4497-
/* Restore filters that were removed with IFF_DOWN */
4498-
iavf_restore_filters(adapter);
44994471
iavf_restore_fdir_filters(adapter);
45004472

45014473
iavf_configure(adapter);

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

Lines changed: 36 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,7 @@ static void iavf_vlan_add_reject(struct iavf_adapter *adapter)
746746

747747
spin_lock_bh(&adapter->mac_vlan_list_lock);
748748
list_for_each_entry_safe(f, ftmp, &adapter->vlan_filter_list, list) {
749-
if (f->state == IAVF_VLAN_IS_NEW) {
749+
if (f->state == IAVF_VLAN_ADDING) {
750750
list_del(&f->list);
751751
kfree(f);
752752
adapter->num_vlan_filters--;
@@ -812,7 +812,7 @@ void iavf_add_vlans(struct iavf_adapter *adapter)
812812
if (f->state == IAVF_VLAN_ADD) {
813813
vvfl->vlan_id[i] = f->vlan.vid;
814814
i++;
815-
f->state = IAVF_VLAN_IS_NEW;
815+
f->state = IAVF_VLAN_ADDING;
816816
if (i == count)
817817
break;
818818
}
@@ -874,7 +874,7 @@ void iavf_add_vlans(struct iavf_adapter *adapter)
874874
vlan->tpid = f->vlan.tpid;
875875

876876
i++;
877-
f->state = IAVF_VLAN_IS_NEW;
877+
f->state = IAVF_VLAN_ADDING;
878878
}
879879
}
880880

@@ -911,22 +911,12 @@ void iavf_del_vlans(struct iavf_adapter *adapter)
911911
spin_lock_bh(&adapter->mac_vlan_list_lock);
912912

913913
list_for_each_entry_safe(f, ftmp, &adapter->vlan_filter_list, list) {
914-
/* since VLAN capabilities are not allowed, we dont want to send
915-
* a VLAN delete request because it will most likely fail and
916-
* create unnecessary errors/noise, so just free the VLAN
917-
* filters marked for removal to enable bailing out before
918-
* sending a virtchnl message
919-
*/
920914
if (f->state == IAVF_VLAN_REMOVE &&
921915
!VLAN_FILTERING_ALLOWED(adapter)) {
922916
list_del(&f->list);
923917
kfree(f);
924918
adapter->num_vlan_filters--;
925-
} else if (f->state == IAVF_VLAN_DISABLE &&
926-
!VLAN_FILTERING_ALLOWED(adapter)) {
927-
f->state = IAVF_VLAN_INACTIVE;
928-
} else if (f->state == IAVF_VLAN_REMOVE ||
929-
f->state == IAVF_VLAN_DISABLE) {
919+
} else if (f->state == IAVF_VLAN_REMOVE) {
930920
count++;
931921
}
932922
}
@@ -958,18 +948,10 @@ void iavf_del_vlans(struct iavf_adapter *adapter)
958948

959949
vvfl->vsi_id = adapter->vsi_res->vsi_id;
960950
vvfl->num_elements = count;
961-
list_for_each_entry_safe(f, ftmp, &adapter->vlan_filter_list, list) {
962-
if (f->state == IAVF_VLAN_DISABLE) {
963-
vvfl->vlan_id[i] = f->vlan.vid;
964-
f->state = IAVF_VLAN_INACTIVE;
965-
i++;
966-
if (i == count)
967-
break;
968-
} else if (f->state == IAVF_VLAN_REMOVE) {
951+
list_for_each_entry(f, &adapter->vlan_filter_list, list) {
952+
if (f->state == IAVF_VLAN_REMOVE) {
969953
vvfl->vlan_id[i] = f->vlan.vid;
970-
list_del(&f->list);
971-
kfree(f);
972-
adapter->num_vlan_filters--;
954+
f->state = IAVF_VLAN_REMOVING;
973955
i++;
974956
if (i == count)
975957
break;
@@ -1006,9 +988,8 @@ void iavf_del_vlans(struct iavf_adapter *adapter)
1006988

1007989
vvfl_v2->vport_id = adapter->vsi_res->vsi_id;
1008990
vvfl_v2->num_elements = count;
1009-
list_for_each_entry_safe(f, ftmp, &adapter->vlan_filter_list, list) {
1010-
if (f->state == IAVF_VLAN_DISABLE ||
1011-
f->state == IAVF_VLAN_REMOVE) {
991+
list_for_each_entry(f, &adapter->vlan_filter_list, list) {
992+
if (f->state == IAVF_VLAN_REMOVE) {
1012993
struct virtchnl_vlan_supported_caps *filtering_support =
1013994
&adapter->vlan_v2_caps.filtering.filtering_support;
1014995
struct virtchnl_vlan *vlan;
@@ -1022,13 +1003,7 @@ void iavf_del_vlans(struct iavf_adapter *adapter)
10221003
vlan->tci = f->vlan.vid;
10231004
vlan->tpid = f->vlan.tpid;
10241005

1025-
if (f->state == IAVF_VLAN_DISABLE) {
1026-
f->state = IAVF_VLAN_INACTIVE;
1027-
} else {
1028-
list_del(&f->list);
1029-
kfree(f);
1030-
adapter->num_vlan_filters--;
1031-
}
1006+
f->state = IAVF_VLAN_REMOVING;
10321007
i++;
10331008
if (i == count)
10341009
break;
@@ -2391,10 +2366,6 @@ void iavf_virtchnl_completion(struct iavf_adapter *adapter,
23912366
ether_addr_copy(adapter->hw.mac.addr, netdev->dev_addr);
23922367
wake_up(&adapter->vc_waitqueue);
23932368
break;
2394-
case VIRTCHNL_OP_DEL_VLAN:
2395-
dev_err(&adapter->pdev->dev, "Failed to delete VLAN filter, error %s\n",
2396-
iavf_stat_str(&adapter->hw, v_retval));
2397-
break;
23982369
case VIRTCHNL_OP_DEL_ETH_ADDR:
23992370
dev_err(&adapter->pdev->dev, "Failed to delete MAC filter, error %s\n",
24002371
iavf_stat_str(&adapter->hw, v_retval));
@@ -2905,17 +2876,42 @@ void iavf_virtchnl_completion(struct iavf_adapter *adapter,
29052876
spin_unlock_bh(&adapter->adv_rss_lock);
29062877
}
29072878
break;
2879+
case VIRTCHNL_OP_ADD_VLAN:
29082880
case VIRTCHNL_OP_ADD_VLAN_V2: {
29092881
struct iavf_vlan_filter *f;
29102882

2883+
if (v_retval)
2884+
break;
2885+
29112886
spin_lock_bh(&adapter->mac_vlan_list_lock);
29122887
list_for_each_entry(f, &adapter->vlan_filter_list, list) {
2913-
if (f->state == IAVF_VLAN_IS_NEW)
2888+
if (f->state == IAVF_VLAN_ADDING)
29142889
f->state = IAVF_VLAN_ACTIVE;
29152890
}
29162891
spin_unlock_bh(&adapter->mac_vlan_list_lock);
29172892
}
29182893
break;
2894+
case VIRTCHNL_OP_DEL_VLAN:
2895+
case VIRTCHNL_OP_DEL_VLAN_V2: {
2896+
struct iavf_vlan_filter *f, *ftmp;
2897+
2898+
spin_lock_bh(&adapter->mac_vlan_list_lock);
2899+
list_for_each_entry_safe(f, ftmp, &adapter->vlan_filter_list,
2900+
list) {
2901+
if (f->state == IAVF_VLAN_REMOVING) {
2902+
if (v_retval) {
2903+
/* PF rejected DEL, keep filter */
2904+
f->state = IAVF_VLAN_ACTIVE;
2905+
} else {
2906+
list_del(&f->list);
2907+
kfree(f);
2908+
adapter->num_vlan_filters--;
2909+
}
2910+
}
2911+
}
2912+
spin_unlock_bh(&adapter->mac_vlan_list_lock);
2913+
}
2914+
break;
29192915
case VIRTCHNL_OP_ENABLE_VLAN_STRIPPING:
29202916
/* PF enabled vlan strip on this VF.
29212917
* Update netdev->features if needed to be in sync with ethtool.

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1245,6 +1245,8 @@ static int ice_devlink_reinit_up(struct ice_pf *pf)
12451245
return err;
12461246
}
12471247

1248+
ice_init_dev_hw(pf);
1249+
12481250
/* load MSI-X values */
12491251
ice_set_min_max_msix(pf);
12501252

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1126,8 +1126,6 @@ int ice_init_hw(struct ice_hw *hw)
11261126
if (status)
11271127
goto err_unroll_fltr_mgmt_struct;
11281128

1129-
ice_init_dev_hw(hw->back);
1130-
11311129
mutex_init(&hw->tnl_lock);
11321130
ice_init_chk_recipe_reuse_support(hw);
11331131

0 commit comments

Comments
 (0)