[PATCH v2 3/9] crypto: qat - disable arbitration before reset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Furong Zhou <furong.zhou@xxxxxxxxx>

Disable arbitration to avoid new requests to be processed before
resetting a device.

This is needed so that new requests are not fetched when an error is
detected.

Signed-off-by: Furong Zhou <furong.zhou@xxxxxxxxx>
Reviewed-by: Ahsan Atta <ahsan.atta@xxxxxxxxx>
Reviewed-by: Markas Rapoportas <markas.rapoportas@xxxxxxxxx>
Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@xxxxxxxxx>
Signed-off-by: Mun Chun Yep <mun.chun.yep@xxxxxxxxx>
---
 drivers/crypto/intel/qat/qat_common/adf_aer.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/crypto/intel/qat/qat_common/adf_aer.c b/drivers/crypto/intel/qat/qat_common/adf_aer.c
index 22a43b4b8315..acbbd32bd815 100644
--- a/drivers/crypto/intel/qat/qat_common/adf_aer.c
+++ b/drivers/crypto/intel/qat/qat_common/adf_aer.c
@@ -181,8 +181,16 @@ static void adf_notify_fatal_error_worker(struct work_struct *work)
 	struct adf_fatal_error_data *wq_data =
 			container_of(work, struct adf_fatal_error_data, work);
 	struct adf_accel_dev *accel_dev = wq_data->accel_dev;
+	struct adf_hw_device_data *hw_device = accel_dev->hw_device;
 
 	adf_error_notifier(accel_dev);
+
+	if (!accel_dev->is_vf) {
+		/* Disable arbitration to stop processing of new requests */
+		if (hw_device->exit_arb)
+			hw_device->exit_arb(accel_dev);
+	}
+
 	kfree(wq_data);
 }
 
-- 
2.34.1





[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux