summaryrefslogtreecommitdiff
path: root/drivers/scsi/aacraid/aacraid.h
diff options
context:
space:
mode:
authorRaghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>2017-12-27 07:34:47 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2018-01-04 07:26:43 +0300
commit8a30e50b72ca08c78474db514531ce5d9ae00fa4 (patch)
tree266b5d57926777004ae2a569e5e48bd14b3d765a /drivers/scsi/aacraid/aacraid.h
parenta1367e4adee207fee7f14fdf2166022461fe76c4 (diff)
downloadlinux-8a30e50b72ca08c78474db514531ce5d9ae00fa4.tar.xz
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: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/aacraid/aacraid.h')
-rw-r--r--drivers/scsi/aacraid/aacraid.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h
index 54078bf8ab67..4cefc47dfd5e 100644
--- a/drivers/scsi/aacraid/aacraid.h
+++ b/drivers/scsi/aacraid/aacraid.h
@@ -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);
}