Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 45348de2 authored by Raghava Aditya Renukunta's avatar Raghava Aditya Renukunta Committed by Martin K. Petersen
Browse files

scsi: aacraid: Fix controller initialization failure



This is a fix to an issue where the driver sends its periodic WELLNESS
command to the controller after the driver shut it down.This causes the
controller to crash. The window where this can happen is small, but it
can be hit at around 4 hours of constant resets.

Cc: <stable@vger.kernel.org>
Fixes: fbd18598 (aacraid: Fix AIF triggered IOP_RESET)
Signed-off-by: default avatarRaghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
Reviewed-by: default avatarDave Carroll <david.carroll@microsemi.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent c99dfd20
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -302,9 +302,11 @@ int aac_send_shutdown(struct aac_dev * dev)
		return -ENOMEM;
	aac_fib_init(fibctx);

	if (!dev->adapter_shutdown) {
		mutex_lock(&dev->ioctl_mutex);
		dev->adapter_shutdown = 1;
		mutex_unlock(&dev->ioctl_mutex);
	}

	cmd = (struct aac_close *) fib_data(fibctx);
	cmd->command = cpu_to_le32(VM_CloseAll);
+6 −1
Original line number Diff line number Diff line
@@ -1551,8 +1551,9 @@ static void __aac_shutdown(struct aac_dev * aac)
{
	int i;

	mutex_lock(&aac->ioctl_mutex);
	aac->adapter_shutdown = 1;
	aac_send_shutdown(aac);
	mutex_unlock(&aac->ioctl_mutex);

	if (aac->aif_thread) {
		int i;
@@ -1565,7 +1566,11 @@ static void __aac_shutdown(struct aac_dev * aac)
		}
		kthread_stop(aac->thread);
	}

	aac_send_shutdown(aac);

	aac_adapter_disable_int(aac);

	if (aac_is_src(aac)) {
		if (aac->max_msix > 1) {
			for (i = 0; i < aac->max_msix; i++) {