Skip to content

Commit 80d9f3a

Browse files
committed
Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue
Jeff Kirsher says: ==================== 40GbE Intel Wired LAN Driver Updates 2018-03-14 This series contains updates to i40e and i40evf only. Corentin Labbe cleans up the left over FCoE files in the i40e driver. Gustavo A R Silva fixes a cut and paste error. Paweł fixes a race condition when the VF driver is loaded on a host and virsh is trying to attach it to the virtual machine and set a MAC address. Resolve the issue by adding polling in i40e_ndo_set_vf_mac() when the VF is in reset mode. Jake cleans up i40e_vlan_rx_register() since this only used in a single location, so just inline the contents of the function. Created a helper function to proper update the per-filter statistics when we delete it. Factored out the re-enabling ATR and SB rules. Fixed an issue when re-enabling ATR after the last TCPv4 filter is removed and ntuple is still active, we were not restoring the TCPv4 filter input set. Filip modifies the permission check function to ensure that it knows how many filters are being requested, which allows the check to ensure that the total number of filters in a single request does not cause us to go over the limit. Mariusz fixed an issue where the wrong calculation of partition id was being done on OCP PHY mezzanine cards, which in turn caused wake on LAN to be disabled on certain ports. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents c292566 + 089915f commit 80d9f3a

File tree

7 files changed

+181
-1769
lines changed

7 files changed

+181
-1769
lines changed

drivers/net/ethernet/intel/i40e/i40e_common.c

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3200,9 +3200,10 @@ static void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff,
32003200
u32 valid_functions, num_functions;
32013201
u32 number, logical_id, phys_id;
32023202
struct i40e_hw_capabilities *p;
3203+
u16 id, ocp_cfg_word0;
3204+
i40e_status status;
32033205
u8 major_rev;
32043206
u32 i = 0;
3205-
u16 id;
32063207

32073208
cap = (struct i40e_aqc_list_capabilities_element_resp *) buff;
32083209

@@ -3389,6 +3390,26 @@ static void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff,
33893390
hw->num_ports++;
33903391
}
33913392

3393+
/* OCP cards case: if a mezz is removed the Ethernet port is at
3394+
* disabled state in PRTGEN_CNF register. Additional NVM read is
3395+
* needed in order to check if we are dealing with OCP card.
3396+
* Those cards have 4 PFs at minimum, so using PRTGEN_CNF for counting
3397+
* physical ports results in wrong partition id calculation and thus
3398+
* not supporting WoL.
3399+
*/
3400+
if (hw->mac.type == I40E_MAC_X722) {
3401+
if (!i40e_acquire_nvm(hw, I40E_RESOURCE_READ)) {
3402+
status = i40e_aq_read_nvm(hw, I40E_SR_EMP_MODULE_PTR,
3403+
2 * I40E_SR_OCP_CFG_WORD0,
3404+
sizeof(ocp_cfg_word0),
3405+
&ocp_cfg_word0, true, NULL);
3406+
if (!status &&
3407+
(ocp_cfg_word0 & I40E_SR_OCP_ENABLED))
3408+
hw->num_ports = 4;
3409+
i40e_release_nvm(hw);
3410+
}
3411+
}
3412+
33923413
valid_functions = p->valid_functions;
33933414
num_functions = 0;
33943415
while (valid_functions) {

0 commit comments

Comments
 (0)