Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 71bd4b8e authored by Christopher Pau's avatar Christopher Pau Committed by Jeff Kirsher
Browse files

i40e: set pf_id based on device and function numbers



pf_id needs to be encoded for cards with ARI enabled, which
allows for larger function numbers than 8.

Commit-Id: I23fa7df9dabf3878cc08c9b2151729c8539f5f17
Signed-off-by: default avatarChristopher Pau <christopher.pau@intel.com>
Signed-off-by: default avatarJesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: default avatarKavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent d70f2cf5
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -297,6 +297,10 @@ i40e_status i40e_pf_reset(struct i40e_hw *hw)
	}

	/* Determine the PF number based on the PCI fn */
	reg = rd32(hw, I40E_GLPCI_CAPSUP);
	if (reg & I40E_GLPCI_CAPSUP_ARI_EN_MASK)
		hw->pf_id = (u8)((hw->bus.device << 3) | hw->bus.func);
	else
		hw->pf_id = (u8)hw->bus.func;

	/* If there was a Global Reset in progress when we got here,