]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
i40e: Fix the EMPR interrupt received handling
authorAnjali Singhai Jain <anjali.singhai@intel.com>
Sat, 24 Jan 2015 09:58:40 +0000 (09:58 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 24 Feb 2015 01:11:58 +0000 (17:11 -0800)
We shouldn't trigger another EMPR when we receive an EMPR event.
This patch handles EMPR event reception with a different state
so that we can do the right thing for NVM.

Change-ID: I9cac70b3658600f016a65beb6fb157e1c1f9adf9
Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e.h
drivers/net/ethernet/intel/i40e/i40e_main.c

index 2b65cdcad6bace52ba03934738599cb4aab314ef..5912fdf506a7849fa99d4d6b124193a6f7757252 100644 (file)
@@ -140,6 +140,7 @@ enum i40e_state_t {
        __I40E_CORE_RESET_REQUESTED,
        __I40E_GLOBAL_RESET_REQUESTED,
        __I40E_EMP_RESET_REQUESTED,
+       __I40E_EMP_RESET_INTR_RECEIVED,
        __I40E_FILTER_OVERFLOW_PROMISC,
        __I40E_SUSPENDED,
        __I40E_PTP_TX_IN_PROGRESS,
index 2260cc1eae77b0a4a8e69b4bbe3651ff730e686a..652cb4eef371ffd90095bc4d22b0a1ff65b51fb3 100644 (file)
@@ -3171,7 +3171,7 @@ static irqreturn_t i40e_intr(int irq, void *data)
                        pf->globr_count++;
                } else if (val == I40E_RESET_EMPR) {
                        pf->empr_count++;
-                       set_bit(__I40E_EMP_RESET_REQUESTED, &pf->state);
+                       set_bit(__I40E_EMP_RESET_INTR_RECEIVED, &pf->state);
                }
        }
 
@@ -6179,10 +6179,8 @@ static void i40e_reset_and_rebuild(struct i40e_pf *pf, bool reinit)
        }
 
        /* re-verify the eeprom if we just had an EMP reset */
-       if (test_bit(__I40E_EMP_RESET_REQUESTED, &pf->state)) {
-               clear_bit(__I40E_EMP_RESET_REQUESTED, &pf->state);
+       if (test_and_clear_bit(__I40E_EMP_RESET_INTR_RECEIVED, &pf->state))
                i40e_verify_eeprom(pf);
-       }
 
        i40e_clear_pxe_mode(hw);
        ret = i40e_get_capabilities(pf);