Commit 0a73c762 authored by Giovanni Cabiddu's avatar Giovanni Cabiddu Committed by Herbert Xu

crypto: qat - handle both source of interrupt in VF ISR

The top half of the VF drivers handled only a source at the time.
If an interrupt for PF2VF and bundle occurred at the same time, the ISR
scheduled only the bottom half for PF2VF.
This patch fixes the VF top half so that if both sources of interrupt
trigger at the same time, both bottom halves are scheduled.

This patch is based on earlier work done by Conor McLoughlin.
Signed-off-by: default avatarGiovanni Cabiddu <giovanni.cabiddu@intel.com>
Reviewed-by: default avatarMarco Chiappero <marco.chiappero@intel.com>
Reviewed-by: default avatarFiona Trahe <fiona.trahe@intel.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 5147f090
...@@ -160,6 +160,7 @@ static irqreturn_t adf_isr(int irq, void *privdata) ...@@ -160,6 +160,7 @@ static irqreturn_t adf_isr(int irq, void *privdata)
struct adf_bar *pmisc = struct adf_bar *pmisc =
&GET_BARS(accel_dev)[hw_data->get_misc_bar_id(hw_data)]; &GET_BARS(accel_dev)[hw_data->get_misc_bar_id(hw_data)];
void __iomem *pmisc_bar_addr = pmisc->virt_addr; void __iomem *pmisc_bar_addr = pmisc->virt_addr;
bool handled = false;
u32 v_int; u32 v_int;
/* Read VF INT source CSR to determine the source of VF interrupt */ /* Read VF INT source CSR to determine the source of VF interrupt */
...@@ -172,7 +173,7 @@ static irqreturn_t adf_isr(int irq, void *privdata) ...@@ -172,7 +173,7 @@ static irqreturn_t adf_isr(int irq, void *privdata)
/* Schedule tasklet to handle interrupt BH */ /* Schedule tasklet to handle interrupt BH */
tasklet_hi_schedule(&accel_dev->vf.pf2vf_bh_tasklet); tasklet_hi_schedule(&accel_dev->vf.pf2vf_bh_tasklet);
return IRQ_HANDLED; handled = true;
} }
/* Check bundle interrupt */ /* Check bundle interrupt */
...@@ -184,10 +185,10 @@ static irqreturn_t adf_isr(int irq, void *privdata) ...@@ -184,10 +185,10 @@ static irqreturn_t adf_isr(int irq, void *privdata)
csr_ops->write_csr_int_flag_and_col(bank->csr_addr, csr_ops->write_csr_int_flag_and_col(bank->csr_addr,
bank->bank_number, 0); bank->bank_number, 0);
tasklet_hi_schedule(&bank->resp_handler); tasklet_hi_schedule(&bank->resp_handler);
return IRQ_HANDLED; handled = true;
} }
return IRQ_NONE; return handled ? IRQ_HANDLED : IRQ_NONE;
} }
static int adf_request_msi_irq(struct adf_accel_dev *accel_dev) static int adf_request_msi_irq(struct adf_accel_dev *accel_dev)
......
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