There is a chance of the driver to be stuck in kdump if drives start
acting up in kdump discovery process and the kernel decides to send eh
resets, which would prompt rescan to be scheduled.

Do not perform a rescan in kdump context, since we do not expect a hotplug
event during kdump and all the devices are going to go away anyway.

Signed-off-by: Raghava Aditya Renukunta <raghavaaditya.renuku...@microsemi.com>

---
Changes in V2:
None

 drivers/scsi/aacraid/commsup.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c
index 706aba0..f0c3e7d 100644
--- a/drivers/scsi/aacraid/commsup.c
+++ b/drivers/scsi/aacraid/commsup.c
@@ -33,6 +33,7 @@
 
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/crash_dump.h>
 #include <linux/types.h>
 #include <linux/sched.h>
 #include <linux/pci.h>
@@ -1675,7 +1676,7 @@ static int _aac_reset_adapter(struct aac_dev *aac, int 
forced, u8 reset_type)
         * Issue bus rescan to catch any configuration that might have
         * occurred
         */
-       if (!retval) {
+       if (!retval && !is_kdump_kernel()) {
                dev_info(&aac->pdev->dev, "Scheduling bus rescan\n");
                aac_schedule_safw_scan_worker(aac);
        }
-- 
2.9.4

Reply via email to