Commit 26a2bebd authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files
Tony Nguyen says:

====================
Intel Wired LAN Driver Updates 2024-11-04 (ice, idpf, i40e, e1000e)

For ice:

Marcin adjusts ordering of calls in ice_eswitch_detach() to resolve a
use after free issue.

Mateusz corrects variable type for Flow Director queue to fix issues
related to drop actions.

For idpf:

Pavan resolves issues related to reset on idpf; avoiding use of freed
vport and correctly unrolling the mailbox task.

For i40e:

Aleksandr fixes a race condition involving addition and deletion of VF
MAC filters.

For e1000e:

Vitaly reverts workaround for Meteor Lake causing regressions in power
management flows.

* '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue:
  e1000e: Remove Meteor Lake SMBUS workarounds
  i40e: fix race condition by adding filter's intermediate sync state
  idpf: fix idpf_vc_core_init error path
  idpf: avoid vport access in idpf_get_link_ksettings
  ice: change q_index variable type to s16 to store -1 value
  ice: Fix use after free during unload with ports in bridge
====================

Link: https://patch.msgid.link/20241104223639.2801097-1-anthony.l.nguyen@intel.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 3f2f406a b8473723
Loading
Loading
Loading
Loading
+4 −13
Original line number Diff line number Diff line
@@ -1205,13 +1205,11 @@ s32 e1000_enable_ulp_lpt_lp(struct e1000_hw *hw, bool to_sx)
	if (ret_val)
		goto out;

	if (hw->mac.type != e1000_pch_mtp) {
	ret_val = e1000e_force_smbus(hw);
	if (ret_val) {
		e_dbg("Failed to force SMBUS: %d\n", ret_val);
		goto release;
	}
	}

	/* Si workaround for ULP entry flow on i127/rev6 h/w.  Enable
	 * LPLU and disable Gig speed when entering ULP
@@ -1273,13 +1271,6 @@ s32 e1000_enable_ulp_lpt_lp(struct e1000_hw *hw, bool to_sx)
	}

release:
	if (hw->mac.type == e1000_pch_mtp) {
		ret_val = e1000e_force_smbus(hw);
		if (ret_val)
			e_dbg("Failed to force SMBUS over MTL system: %d\n",
			      ret_val);
	}

	hw->phy.ops.release(hw);
out:
	if (ret_val)
+1 −0
Original line number Diff line number Diff line
@@ -755,6 +755,7 @@ enum i40e_filter_state {
	I40E_FILTER_ACTIVE,		/* Added to switch by FW */
	I40E_FILTER_FAILED,		/* Rejected by FW */
	I40E_FILTER_REMOVE,		/* To be removed */
	I40E_FILTER_NEW_SYNC,		/* New, not sent yet, is in i40e_sync_vsi_filters() */
/* There is no 'removed' state; the filter struct is freed */
};
struct i40e_mac_filter {
+1 −0
Original line number Diff line number Diff line
@@ -89,6 +89,7 @@ static char *i40e_filter_state_string[] = {
	"ACTIVE",
	"FAILED",
	"REMOVE",
	"NEW_SYNC",
};

/**
+10 −2
Original line number Diff line number Diff line
@@ -1255,6 +1255,7 @@ int i40e_count_filters(struct i40e_vsi *vsi)

	hash_for_each_safe(vsi->mac_filter_hash, bkt, h, f, hlist) {
		if (f->state == I40E_FILTER_NEW ||
		    f->state == I40E_FILTER_NEW_SYNC ||
		    f->state == I40E_FILTER_ACTIVE)
			++cnt;
	}
@@ -1441,6 +1442,8 @@ static int i40e_correct_mac_vlan_filters(struct i40e_vsi *vsi,

			new->f = add_head;
			new->state = add_head->state;
			if (add_head->state == I40E_FILTER_NEW)
				add_head->state = I40E_FILTER_NEW_SYNC;

			/* Add the new filter to the tmp list */
			hlist_add_head(&new->hlist, tmp_add_list);
@@ -1550,6 +1553,8 @@ static int i40e_correct_vf_mac_vlan_filters(struct i40e_vsi *vsi,
				return -ENOMEM;
			new_mac->f = add_head;
			new_mac->state = add_head->state;
			if (add_head->state == I40E_FILTER_NEW)
				add_head->state = I40E_FILTER_NEW_SYNC;

			/* Add the new filter to the tmp list */
			hlist_add_head(&new_mac->hlist, tmp_add_list);
@@ -2437,7 +2442,8 @@ static int
i40e_aqc_broadcast_filter(struct i40e_vsi *vsi, const char *vsi_name,
			  struct i40e_mac_filter *f)
{
	bool enable = f->state == I40E_FILTER_NEW;
	bool enable = f->state == I40E_FILTER_NEW ||
		      f->state == I40E_FILTER_NEW_SYNC;
	struct i40e_hw *hw = &vsi->back->hw;
	int aq_ret;

@@ -2611,6 +2617,7 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi)

				/* Add it to the hash list */
				hlist_add_head(&new->hlist, &tmp_add_list);
				f->state = I40E_FILTER_NEW_SYNC;
			}

			/* Count the number of active (current and new) VLAN
@@ -2762,7 +2769,8 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi)
		spin_lock_bh(&vsi->mac_filter_hash_lock);
		hlist_for_each_entry_safe(new, h, &tmp_add_list, hlist) {
			/* Only update the state if we're still NEW */
			if (new->f->state == I40E_FILTER_NEW)
			if (new->f->state == I40E_FILTER_NEW ||
			    new->f->state == I40E_FILTER_NEW_SYNC)
				new->f->state = new->state;
			hlist_del(&new->hlist);
			netdev_hw_addr_refcnt(new->f, vsi->netdev, -1);
+2 −1
Original line number Diff line number Diff line
@@ -552,13 +552,14 @@ int ice_eswitch_attach_sf(struct ice_pf *pf, struct ice_dynamic_port *sf)
static void ice_eswitch_detach(struct ice_pf *pf, struct ice_repr *repr)
{
	ice_eswitch_stop_reprs(pf);
	repr->ops.rem(repr);

	xa_erase(&pf->eswitch.reprs, repr->id);

	if (xa_empty(&pf->eswitch.reprs))
		ice_eswitch_disable_switchdev(pf);

	ice_eswitch_release_repr(pf, repr);
	repr->ops.rem(repr);
	ice_repr_destroy(repr);

	if (xa_empty(&pf->eswitch.reprs)) {
Loading