Commit b6c7d362 authored by Michal Witwicki's avatar Michal Witwicki Committed by Herbert Xu
Browse files

crypto: qat - disable IOV in adf_dev_stop()



Disabling IOV has the side effect of re-enabling the AEs that might
attempt to do DMAs into the heartbeat buffers.
Move the disable_iov() function in adf_dev_stop() before the AEs are
stopped.

Fixes: ed8ccaef ("crypto: qat - Add support for SRIOV")
Signed-off-by: default avatarMichal Witwicki <michal.witwicki@intel.com>
Reviewed-by: default avatarGiovanni Cabiddu <giovanni.cabiddu@intel.com>
Reviewed-by: default avatarPrzemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 4e190a57
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -323,6 +323,8 @@ static void adf_dev_stop(struct adf_accel_dev *accel_dev)
	if (hw_data->stop_timer)
		hw_data->stop_timer(accel_dev);

	hw_data->disable_iov(accel_dev);

	if (wait)
		msleep(100);

@@ -386,8 +388,6 @@ static void adf_dev_shutdown(struct adf_accel_dev *accel_dev)

	adf_tl_shutdown(accel_dev);

	hw_data->disable_iov(accel_dev);

	if (test_bit(ADF_STATUS_IRQ_ALLOCATED, &accel_dev->status)) {
		hw_data->free_irq(accel_dev);
		clear_bit(ADF_STATUS_IRQ_ALLOCATED, &accel_dev->status);