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

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

scsi: aacraid: Fix hang while scanning in eh recovery



Add back the ability to scan for hotplug changes while eh was in progress.

Schedule a rescan for a later time in the eh recovery code and wait for
eh to complete in the rescan worker.

Signed-off-by: default avatarRaghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent a1367e4a
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@

#include <linux/interrupt.h>
#include <linux/pci.h>
#include <scsi/scsi_host.h>

/*------------------------------------------------------------------------------
 *              D E F I N E S
@@ -2655,6 +2656,9 @@ static inline void aac_safw_rescan_worker(struct work_struct *work)
	struct aac_dev *dev = container_of(to_delayed_work(work),
		struct aac_dev, safw_rescan_work);

	wait_event(dev->scsi_host_ptr->host_wait,
		!scsi_host_in_recovery(dev->scsi_host_ptr));

	aac_scan_host(dev, AAC_RESCAN);
}

+9 −0
Original line number Diff line number Diff line
@@ -1671,6 +1671,15 @@ static int _aac_reset_adapter(struct aac_dev *aac, int forced, u8 reset_type)
	aac->in_reset = 0;
	scsi_unblock_requests(host);

	/*
	 * Issue bus rescan to catch any configuration that might have
	 * occurred
	 */
	if (!retval) {
		dev_info(&aac->pdev->dev, "Scheduling bus rescan\n");
		aac_schedule_safw_scan_worker(aac);
	}

	if (jafo) {
		spin_lock_irq(host->host_lock);
	}