Skip to content

Commit

Permalink
Merge branch 'intel-wired-lan-driver-updates-2025-02-24-ice-idpf-iavf…
Browse files Browse the repository at this point in the history
…-ixgbe'

Tony Nguyen says:

====================
Intel Wired LAN Driver Updates 2025-02-24 (ice, idpf, iavf, ixgbe)

For ice:

Marcin moves incorrect call placement to clean up VF mailbox
tracking and changes call for configuring default VSI to allow
for existing rule.

For iavf:

Jake fixes a circular locking dependency.

For ixgbe:

Piotr corrects condition for determining media cage presence.
====================

Link: https://patch.msgid.link/20250224190647.3601930-1-anthony.l.nguyen@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Jakub Kicinski committed Feb 26, 2025
2 parents 5568e4c + b1e44b4 commit 85c7ca9
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 11 deletions.
12 changes: 8 additions & 4 deletions drivers/net/ethernet/intel/iavf/iavf_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1983,7 +1983,7 @@ static int iavf_reinit_interrupt_scheme(struct iavf_adapter *adapter, bool runni
static void iavf_finish_config(struct work_struct *work)
{
struct iavf_adapter *adapter;
bool netdev_released = false;
bool locks_released = false;
int pairs, err;

adapter = container_of(work, struct iavf_adapter, finish_config);
Expand Down Expand Up @@ -2012,19 +2012,22 @@ static void iavf_finish_config(struct work_struct *work)
netif_set_real_num_tx_queues(adapter->netdev, pairs);

if (adapter->netdev->reg_state != NETREG_REGISTERED) {
mutex_unlock(&adapter->crit_lock);
netdev_unlock(adapter->netdev);
netdev_released = true;
locks_released = true;
err = register_netdevice(adapter->netdev);
if (err) {
dev_err(&adapter->pdev->dev, "Unable to register netdev (%d)\n",
err);

/* go back and try again.*/
mutex_lock(&adapter->crit_lock);
iavf_free_rss(adapter);
iavf_free_misc_irq(adapter);
iavf_reset_interrupt_capability(adapter);
iavf_change_state(adapter,
__IAVF_INIT_CONFIG_ADAPTER);
mutex_unlock(&adapter->crit_lock);
goto out;
}
}
Expand All @@ -2040,9 +2043,10 @@ static void iavf_finish_config(struct work_struct *work)
}

out:
mutex_unlock(&adapter->crit_lock);
if (!netdev_released)
if (!locks_released) {
mutex_unlock(&adapter->crit_lock);
netdev_unlock(adapter->netdev);
}
rtnl_unlock();
}

Expand Down
3 changes: 1 addition & 2 deletions drivers/net/ethernet/intel/ice/ice_eswitch.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ static int ice_eswitch_setup_env(struct ice_pf *pf)
if (ice_vsi_add_vlan_zero(uplink_vsi))
goto err_vlan_zero;

if (ice_cfg_dflt_vsi(uplink_vsi->port_info, uplink_vsi->idx, true,
ICE_FLTR_RX))
if (ice_set_dflt_vsi(uplink_vsi))
goto err_def_rx;

if (ice_cfg_dflt_vsi(uplink_vsi->port_info, uplink_vsi->idx, true,
Expand Down
5 changes: 1 addition & 4 deletions drivers/net/ethernet/intel/ice/ice_sriov.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ static void ice_free_vf_entries(struct ice_pf *pf)

hash_for_each_safe(vfs->table, bkt, tmp, vf, entry) {
hash_del_rcu(&vf->entry);
ice_deinitialize_vf_entry(vf);
ice_put_vf(vf);
}
}
Expand Down Expand Up @@ -193,10 +194,6 @@ void ice_free_vfs(struct ice_pf *pf)
wr32(hw, GLGEN_VFLRSTAT(reg_idx), BIT(bit_idx));
}

/* clear malicious info since the VF is getting released */
if (!ice_is_feature_supported(pf, ICE_F_MBX_LIMIT))
list_del(&vf->mbx_info.list_entry);

mutex_unlock(&vf->cfg_lock);
}

Expand Down
8 changes: 8 additions & 0 deletions drivers/net/ethernet/intel/ice/ice_vf_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1036,6 +1036,14 @@ void ice_initialize_vf_entry(struct ice_vf *vf)
mutex_init(&vf->cfg_lock);
}

void ice_deinitialize_vf_entry(struct ice_vf *vf)
{
struct ice_pf *pf = vf->pf;

if (!ice_is_feature_supported(pf, ICE_F_MBX_LIMIT))
list_del(&vf->mbx_info.list_entry);
}

/**
* ice_dis_vf_qs - Disable the VF queues
* @vf: pointer to the VF structure
Expand Down
1 change: 1 addition & 0 deletions drivers/net/ethernet/intel/ice/ice_vf_lib_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#endif

void ice_initialize_vf_entry(struct ice_vf *vf);
void ice_deinitialize_vf_entry(struct ice_vf *vf);
void ice_dis_vf_qs(struct ice_vf *vf);
int ice_check_vf_init(struct ice_vf *vf);
enum virtchnl_status_code ice_err_to_virt_err(int err);
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c
Original file line number Diff line number Diff line change
Expand Up @@ -1122,7 +1122,7 @@ static bool ixgbe_is_media_cage_present(struct ixgbe_hw *hw)
* returns error (ENOENT), then no cage present. If no cage present then
* connection type is backplane or BASE-T.
*/
return ixgbe_aci_get_netlist_node(hw, cmd, NULL, NULL);
return !ixgbe_aci_get_netlist_node(hw, cmd, NULL, NULL);
}

/**
Expand Down

0 comments on commit 85c7ca9

Please sign in to comment.