Commit 6e0838b0 authored by Furong Zhou's avatar Furong Zhou Committed by Aichun Shi
Browse files

crypto: qat - disable arbitration before reset

mainline inclusion
from mainline-v6.9-rc1
commit 758a0087db98fa23a3597289dbf3643ba9db2700
category: feature
bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I9A5BW
CVE: N/A
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=758a0087db98fa23a3597289dbf3643ba9db2700



-------------------------------------

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.

Intel-SIG: commit 758a0087db98 crypto: qat - disable arbitration before reset
Backport to support QAT in-tree driver

Signed-off-by: default avatarFurong Zhou <furong.zhou@intel.com>
Reviewed-by: default avatarAhsan Atta <ahsan.atta@intel.com>
Reviewed-by: default avatarMarkas Rapoportas <markas.rapoportas@intel.com>
Reviewed-by: default avatarGiovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: default avatarMun Chun Yep <mun.chun.yep@intel.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
[ Aichun Shi: amend commit log ]
Signed-off-by: default avatarAichun Shi <aichun.shi@intel.com>
parent 70a0c711
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -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);
}