]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
scsi: aacraid: Fix hang while scanning in eh recovery
authorRaghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
Wed, 27 Dec 2017 04:34:47 +0000 (20:34 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 4 Jan 2018 04:26:43 +0000 (23:26 -0500)
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>
drivers/scsi/aacraid/aacraid.h
drivers/scsi/aacraid/commsup.c

index 54078bf8ab67bc6121ceb3ae2ff6818c5ce96092..4cefc47dfd5e6177c934b53de2e11cf993d45251 100644 (file)
@@ -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);
 }
 
index d562053f14d736b51440ed9748fca0efa3597e7b..706aba0ed726b43e5fdfc46acab62415a1ef2b82 100644 (file)
@@ -1671,6 +1671,15 @@ out:
        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);
        }