aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorAnjali Singhai Jain <anjali.singhai@intel.com>2015-01-24 04:58:40 -0500
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2015-02-23 20:11:58 -0500
commit9df42d1a8fd8ac137671e3e6c0c87ca2101d90e0 (patch)
treecf53f5e3f6c8a80811111c9d586189f5e5d55952 /drivers/net/ethernet
parent5098850c9b9bdc6a1572ac9f39da84683fc5fbb0 (diff)
i40e: Fix the EMPR interrupt received handling
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>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e.h1
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_main.c6
2 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h
index 2b65cdcad6ba..5912fdf506a7 100644
--- a/drivers/net/ethernet/intel/i40e/i40e.h
+++ b/drivers/net/ethernet/intel/i40e/i40e.h
@@ -140,6 +140,7 @@ enum i40e_state_t {
140 __I40E_CORE_RESET_REQUESTED, 140 __I40E_CORE_RESET_REQUESTED,
141 __I40E_GLOBAL_RESET_REQUESTED, 141 __I40E_GLOBAL_RESET_REQUESTED,
142 __I40E_EMP_RESET_REQUESTED, 142 __I40E_EMP_RESET_REQUESTED,
143 __I40E_EMP_RESET_INTR_RECEIVED,
143 __I40E_FILTER_OVERFLOW_PROMISC, 144 __I40E_FILTER_OVERFLOW_PROMISC,
144 __I40E_SUSPENDED, 145 __I40E_SUSPENDED,
145 __I40E_PTP_TX_IN_PROGRESS, 146 __I40E_PTP_TX_IN_PROGRESS,
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 2260cc1eae77..652cb4eef371 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -3171,7 +3171,7 @@ static irqreturn_t i40e_intr(int irq, void *data)
3171 pf->globr_count++; 3171 pf->globr_count++;
3172 } else if (val == I40E_RESET_EMPR) { 3172 } else if (val == I40E_RESET_EMPR) {
3173 pf->empr_count++; 3173 pf->empr_count++;
3174 set_bit(__I40E_EMP_RESET_REQUESTED, &pf->state); 3174 set_bit(__I40E_EMP_RESET_INTR_RECEIVED, &pf->state);
3175 } 3175 }
3176 } 3176 }
3177 3177
@@ -6179,10 +6179,8 @@ static void i40e_reset_and_rebuild(struct i40e_pf *pf, bool reinit)
6179 } 6179 }
6180 6180
6181 /* re-verify the eeprom if we just had an EMP reset */ 6181 /* re-verify the eeprom if we just had an EMP reset */
6182 if (test_bit(__I40E_EMP_RESET_REQUESTED, &pf->state)) { 6182 if (test_and_clear_bit(__I40E_EMP_RESET_INTR_RECEIVED, &pf->state))
6183 clear_bit(__I40E_EMP_RESET_REQUESTED, &pf->state);
6184 i40e_verify_eeprom(pf); 6183 i40e_verify_eeprom(pf);
6185 }
6186 6184
6187 i40e_clear_pxe_mode(hw); 6185 i40e_clear_pxe_mode(hw);
6188 ret = i40e_get_capabilities(pf); 6186 ret = i40e_get_capabilities(pf);