aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ice/ice_main.c
diff options
context:
space:
mode:
authorMd Fahad Iqbal Polash <md.fahad.iqbal.polash@intel.com>2019-02-28 18:25:58 -0500
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2019-05-02 04:19:26 -0400
commit8d7189d266ccec6dce1a4c2dd2bde6e0d632a24c (patch)
tree9efe1ba5bee789b11cf6ab5a51bef7338b4ab9fd /drivers/net/ethernet/intel/ice/ice_main.c
parent5079b853b221005ac06192265c917ea79c11c0e2 (diff)
ice: Remove runtime change of PFINT_OICR_ENA register
Runtime change of PFINT_OICR_ENA register is unnecessary. The handlers should always clear the atomic bit for each task as they start, because it will make sure that any late interrupt will either 1) re-set the bit, or 2) be handled directly in the "already running" task handler. Signed-off-by: Md Fahad Iqbal Polash <md.fahad.iqbal.polash@intel.com> Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_main.c')
-rw-r--r--drivers/net/ethernet/intel/ice/ice_main.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index a32782be7f88..8f6f2a1e67ed 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -1096,7 +1096,7 @@ static void ice_handle_mdd_event(struct ice_pf *pf)
1096 u32 reg; 1096 u32 reg;
1097 int i; 1097 int i;
1098 1098
1099 if (!test_bit(__ICE_MDD_EVENT_PENDING, pf->state)) 1099 if (!test_and_clear_bit(__ICE_MDD_EVENT_PENDING, pf->state))
1100 return; 1100 return;
1101 1101
1102 /* find what triggered the MDD event */ 1102 /* find what triggered the MDD event */
@@ -1229,12 +1229,6 @@ static void ice_handle_mdd_event(struct ice_pf *pf)
1229 } 1229 }
1230 } 1230 }
1231 1231
1232 /* re-enable MDD interrupt cause */
1233 clear_bit(__ICE_MDD_EVENT_PENDING, pf->state);
1234 reg = rd32(hw, PFINT_OICR_ENA);
1235 reg |= PFINT_OICR_MAL_DETECT_M;
1236 wr32(hw, PFINT_OICR_ENA, reg);
1237 ice_flush(hw);
1238} 1232}
1239 1233
1240/** 1234/**
@@ -1523,7 +1517,7 @@ static irqreturn_t ice_misc_intr(int __always_unused irq, void *data)
1523 rd32(hw, PFHMC_ERRORDATA)); 1517 rd32(hw, PFHMC_ERRORDATA));
1524 } 1518 }
1525 1519
1526 /* Report and mask off any remaining unexpected interrupts */ 1520 /* Report any remaining unexpected interrupts */
1527 oicr &= ena_mask; 1521 oicr &= ena_mask;
1528 if (oicr) { 1522 if (oicr) {
1529 dev_dbg(&pf->pdev->dev, "unhandled interrupt oicr=0x%08x\n", 1523 dev_dbg(&pf->pdev->dev, "unhandled interrupt oicr=0x%08x\n",
@@ -1537,12 +1531,9 @@ static irqreturn_t ice_misc_intr(int __always_unused irq, void *data)
1537 set_bit(__ICE_PFR_REQ, pf->state); 1531 set_bit(__ICE_PFR_REQ, pf->state);
1538 ice_service_task_schedule(pf); 1532 ice_service_task_schedule(pf);
1539 } 1533 }
1540 ena_mask &= ~oicr;
1541 } 1534 }
1542 ret = IRQ_HANDLED; 1535 ret = IRQ_HANDLED;
1543 1536
1544 /* re-enable interrupt causes that are not handled during this pass */
1545 wr32(hw, PFINT_OICR_ENA, ena_mask);
1546 if (!test_bit(__ICE_DOWN, pf->state)) { 1537 if (!test_bit(__ICE_DOWN, pf->state)) {
1547 ice_service_task_schedule(pf); 1538 ice_service_task_schedule(pf);
1548 ice_irq_dynamic_ena(hw, NULL, NULL); 1539 ice_irq_dynamic_ena(hw, NULL, NULL);