Commit d578e618 authored by Karol Kolacinski's avatar Karol Kolacinski Committed by Tony Nguyen

ice: always return IRQ_WAKE_THREAD in ice_misc_intr()

Refactor the ice_misc_intr() function to always return IRQ_WAKE_THREAD, and
schedule the service task during the soft IRQ thread function instead of at
the end of the hard IRQ handler.

Remove the duplicate call to ice_service_task_schedule() that happened when
we got a PCI exception.
Signed-off-by: default avatarKarol Kolacinski <karol.kolacinski@intel.com>
Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
Tested-by: Arpana Arland <arpanax.arland@intel.com> (A Contingent worker at Intel)
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
parent 6e8b2c88
...@@ -3058,7 +3058,6 @@ static irqreturn_t ice_misc_intr(int __always_unused irq, void *data) ...@@ -3058,7 +3058,6 @@ static irqreturn_t ice_misc_intr(int __always_unused irq, void *data)
{ {
struct ice_pf *pf = (struct ice_pf *)data; struct ice_pf *pf = (struct ice_pf *)data;
struct ice_hw *hw = &pf->hw; struct ice_hw *hw = &pf->hw;
irqreturn_t ret = IRQ_NONE;
struct device *dev; struct device *dev;
u32 oicr, ena_mask; u32 oicr, ena_mask;
...@@ -3139,10 +3138,8 @@ static irqreturn_t ice_misc_intr(int __always_unused irq, void *data) ...@@ -3139,10 +3138,8 @@ static irqreturn_t ice_misc_intr(int __always_unused irq, void *data)
if (oicr & PFINT_OICR_TSYN_TX_M) { if (oicr & PFINT_OICR_TSYN_TX_M) {
ena_mask &= ~PFINT_OICR_TSYN_TX_M; ena_mask &= ~PFINT_OICR_TSYN_TX_M;
if (!hw->reset_ongoing) { if (!hw->reset_ongoing)
set_bit(ICE_MISC_THREAD_TX_TSTAMP, pf->misc_thread); set_bit(ICE_MISC_THREAD_TX_TSTAMP, pf->misc_thread);
ret = IRQ_WAKE_THREAD;
}
} }
if (oicr & PFINT_OICR_TSYN_EVNT_M) { if (oicr & PFINT_OICR_TSYN_EVNT_M) {
...@@ -3159,7 +3156,6 @@ static irqreturn_t ice_misc_intr(int __always_unused irq, void *data) ...@@ -3159,7 +3156,6 @@ static irqreturn_t ice_misc_intr(int __always_unused irq, void *data)
GLTSYN_STAT_EVENT2_M); GLTSYN_STAT_EVENT2_M);
set_bit(ICE_MISC_THREAD_EXTTS_EVENT, pf->misc_thread); set_bit(ICE_MISC_THREAD_EXTTS_EVENT, pf->misc_thread);
ret = IRQ_WAKE_THREAD;
} }
} }
...@@ -3180,16 +3176,12 @@ static irqreturn_t ice_misc_intr(int __always_unused irq, void *data) ...@@ -3180,16 +3176,12 @@ static irqreturn_t ice_misc_intr(int __always_unused irq, void *data)
if (oicr & (PFINT_OICR_PCI_EXCEPTION_M | if (oicr & (PFINT_OICR_PCI_EXCEPTION_M |
PFINT_OICR_ECC_ERR_M)) { PFINT_OICR_ECC_ERR_M)) {
set_bit(ICE_PFR_REQ, pf->state); set_bit(ICE_PFR_REQ, pf->state);
ice_service_task_schedule(pf);
} }
} }
if (!ret)
ret = IRQ_HANDLED;
ice_service_task_schedule(pf);
ice_irq_dynamic_ena(hw, NULL, NULL); ice_irq_dynamic_ena(hw, NULL, NULL);
return ret; return IRQ_WAKE_THREAD;
} }
/** /**
...@@ -3204,6 +3196,8 @@ static irqreturn_t ice_misc_intr_thread_fn(int __always_unused irq, void *data) ...@@ -3204,6 +3196,8 @@ static irqreturn_t ice_misc_intr_thread_fn(int __always_unused irq, void *data)
if (ice_is_reset_in_progress(pf->state)) if (ice_is_reset_in_progress(pf->state))
return IRQ_HANDLED; return IRQ_HANDLED;
ice_service_task_schedule(pf);
if (test_and_clear_bit(ICE_MISC_THREAD_EXTTS_EVENT, pf->misc_thread)) if (test_and_clear_bit(ICE_MISC_THREAD_EXTTS_EVENT, pf->misc_thread))
ice_ptp_extts_event(pf); ice_ptp_extts_event(pf);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment