crypto: qat - disregard spurious PFVF interrupts
[ Upstream commit18fcba469b
] Upon receiving a PFVF message, check if the interrupt bit is set in the message. If it is not, that means that the interrupt was probably triggered by a collision. In this case, disregard the message and re-enable the interrupts. Fixes:ed8ccaef52
("crypto: qat - Add support for SRIOV") Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com> Reviewed-by: Marco Chiappero <marco.chiappero@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Родитель
d053628284
Коммит
51dbedbf08
|
@ -211,6 +211,11 @@ void adf_vf2pf_req_hndl(struct adf_accel_vf_info *vf_info)
|
|||
|
||||
/* Read message from the VF */
|
||||
msg = ADF_CSR_RD(pmisc_addr, hw_data->get_pf2vf_offset(vf_nr));
|
||||
if (!(msg & ADF_VF2PF_INT)) {
|
||||
dev_info(&GET_DEV(accel_dev),
|
||||
"Spurious VF2PF interrupt, msg %X. Ignored\n", msg);
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* To ACK, clear the VF2PFINT bit */
|
||||
msg &= ~ADF_VF2PF_INT;
|
||||
|
@ -294,6 +299,7 @@ void adf_vf2pf_req_hndl(struct adf_accel_vf_info *vf_info)
|
|||
if (resp && adf_iov_putmsg(accel_dev, resp, vf_nr))
|
||||
dev_err(&GET_DEV(accel_dev), "Failed to send response to VF\n");
|
||||
|
||||
out:
|
||||
/* re-enable interrupt on PF from this VF */
|
||||
adf_enable_vf2pf_interrupts(accel_dev, (1 << vf_nr));
|
||||
|
||||
|
|
|
@ -101,6 +101,11 @@ static void adf_pf2vf_bh_handler(void *data)
|
|||
|
||||
/* Read the message from PF */
|
||||
msg = ADF_CSR_RD(pmisc_bar_addr, hw_data->get_pf2vf_offset(0));
|
||||
if (!(msg & ADF_PF2VF_INT)) {
|
||||
dev_info(&GET_DEV(accel_dev),
|
||||
"Spurious PF2VF interrupt, msg %X. Ignored\n", msg);
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (!(msg & ADF_PF2VF_MSGORIGIN_SYSTEM))
|
||||
/* Ignore legacy non-system (non-kernel) PF2VF messages */
|
||||
|
@ -149,6 +154,7 @@ static void adf_pf2vf_bh_handler(void *data)
|
|||
msg &= ~ADF_PF2VF_INT;
|
||||
ADF_CSR_WR(pmisc_bar_addr, hw_data->get_pf2vf_offset(0), msg);
|
||||
|
||||
out:
|
||||
/* Re-enable PF2VF interrupts */
|
||||
adf_enable_pf2vf_interrupts(accel_dev);
|
||||
return;
|
||||
|
|
Загрузка…
Ссылка в новой задаче