crypto: qat - prevent spurious MSI interrupt in PF
authorMarco Chiappero <marco.chiappero@intel.com>
Thu, 12 Aug 2021 20:21:16 +0000 (21:21 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 21 Aug 2021 07:44:55 +0000 (15:44 +0800)
commit3213488db01e7ddc389be2390cc154d926e714a2
treec68a007c1302af4ff503815d6e9eccb76974c775
parent7eadcfd633d8ef0082b194693c5057c9652fe243
crypto: qat - prevent spurious MSI interrupt in PF

There is a chance that the PFVF handler, adf_vf2pf_req_hndl(), runs
twice for the same request when multiple interrupts come simultaneously
from different VFs.
Since the source VF is identified by a positional bit set in the ERRSOU
registers and that is not cleared until the bottom half completes, new
top halves from other VFs may reschedule a second bottom half for
previous interrupts.

This patch solves the problem in the ISR handler by not considering
sources with already disabled interrupts (and processing pending), as
set in the ERRMSK registers.

Also, move some definitions where actually needed.

Signed-off-by: Marco Chiappero <marco.chiappero@intel.com>
Co-developed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Reviewed-by: Fiona Trahe <fiona.trahe@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/qat/qat_common/adf_accel_devices.h
drivers/crypto/qat/qat_common/adf_isr.c