Commit aeae0ef0 authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

Merge branch 'intel-wired-lan-driver-updates-2023-10-11-i40e-ice'

Jacob Keller says:

====================
Intel Wired LAN Driver Updates 2023-10-11 (i40e, ice)

This series contains fixes for the i40e and ice drivers.

Jesse adds handling to the ice driver which resetis the device when loading
on a crash kernel, preventing stale transactions from causing machine check
exceptions which could prevent capturing crash data.

Mateusz fixes a bug in the ice driver 'Safe mode' logic for handling the
device when the DDP is missing.

Michal fixes a crash when probing the i40e driver in the event that HW
registers are reporting invalid/unexpected values.

The following are changes since commit a950a592:
  net/smc: Fix pos miscalculation in statistics

I'm covering for Tony Nguyen while he's out, and don't have access to create
a pull request branch on his net-queue, so these are sent via mail only.
====================

Link: https://lore.kernel.org/r/20231011233334.336092-1-jacob.e.keller@intel.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents f50ee3a0 42066c4d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1082,7 +1082,7 @@ void i40e_clear_hw(struct i40e_hw *hw)
		     I40E_PFLAN_QALLOC_FIRSTQ_SHIFT;
	j = (val & I40E_PFLAN_QALLOC_LASTQ_MASK) >>
	    I40E_PFLAN_QALLOC_LASTQ_SHIFT;
	if (val & I40E_PFLAN_QALLOC_VALID_MASK)
	if (val & I40E_PFLAN_QALLOC_VALID_MASK && j >= base_queue)
		num_queues = (j - base_queue) + 1;
	else
		num_queues = 0;
@@ -1092,7 +1092,7 @@ void i40e_clear_hw(struct i40e_hw *hw)
	    I40E_PF_VT_PFALLOC_FIRSTVF_SHIFT;
	j = (val & I40E_PF_VT_PFALLOC_LASTVF_MASK) >>
	    I40E_PF_VT_PFALLOC_LASTVF_SHIFT;
	if (val & I40E_PF_VT_PFALLOC_VALID_MASK)
	if (val & I40E_PF_VT_PFALLOC_VALID_MASK && j >= i)
		num_vfs = (j - i) + 1;
	else
		num_vfs = 0;
+18 −0
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

#include <generated/utsrelease.h>
#include <linux/crash_dump.h>
#include "ice.h"
#include "ice_base.h"
#include "ice_lib.h"
@@ -4683,6 +4684,9 @@ static void ice_init_features(struct ice_pf *pf)

static void ice_deinit_features(struct ice_pf *pf)
{
	if (ice_is_safe_mode(pf))
		return;

	ice_deinit_lag(pf);
	if (test_bit(ICE_FLAG_DCB_CAPABLE, pf->flags))
		ice_cfg_lldp_mib_change(&pf->hw, false);
@@ -5014,6 +5018,20 @@ ice_probe(struct pci_dev *pdev, const struct pci_device_id __always_unused *ent)
		return -EINVAL;
	}

	/* when under a kdump kernel initiate a reset before enabling the
	 * device in order to clear out any pending DMA transactions. These
	 * transactions can cause some systems to machine check when doing
	 * the pcim_enable_device() below.
	 */
	if (is_kdump_kernel()) {
		pci_save_state(pdev);
		pci_clear_master(pdev);
		err = pcie_flr(pdev);
		if (err)
			return err;
		pci_restore_state(pdev);
	}

	/* this driver uses devres, see
	 * Documentation/driver-api/driver-model/devres.rst
	 */