[SCSI] aacraid: kdump fix
authorMahesh Rajashekhara <Mahesh.Rajashekhara@pmcs.com>
Mon, 13 Jan 2014 08:20:30 +0000 (13:50 +0530)
committerJames Bottomley <JBottomley@Parallels.com>
Sat, 15 Mar 2014 17:19:00 +0000 (10:19 -0700)
This patch fixes kernel panic issue while booting into the kdump kernel.

We have triggered crash and kdump vmcore was successful. No issues seen while
booting into the OS.

Signed-off-by: Mahesh Rajashekhara <Mahesh.Rajashekhara@pmcs.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/aacraid/aacraid.h
drivers/scsi/aacraid/rx.c

index 9323d058706b9987f3cba212928912c29060bb16..eaaf8705a5f4d173c47bf45d81202300dd99f3e2 100644 (file)
@@ -12,7 +12,7 @@
  *----------------------------------------------------------------------------*/
 
 #ifndef AAC_DRIVER_BUILD
-# define AAC_DRIVER_BUILD 30200
+# define AAC_DRIVER_BUILD 30300
 # define AAC_DRIVER_BRANCH "-ms"
 #endif
 #define MAXIMUM_NUM_CONTAINERS 32
index dada38aeacc090f73321c871f8238a11da7c7843..bb9917c57760c0d28bb6ee2c4a01c82c98d9aebb 100644 (file)
@@ -480,7 +480,7 @@ static int aac_rx_ioremap(struct aac_dev * dev, u32 size)
 
 static int aac_rx_restart_adapter(struct aac_dev *dev, int bled)
 {
-       u32 var;
+       u32 var = 0;
 
        if (!(dev->supplement_adapter_info.SupportedOptions2 &
          AAC_OPTION_MU_RESET) || (bled >= 0) || (bled == -2)) {
@@ -500,13 +500,14 @@ static int aac_rx_restart_adapter(struct aac_dev *dev, int bled)
                if (bled && (bled != -ETIMEDOUT))
                        return -EINVAL;
        }
-       if (bled || (var == 0x3803000F)) { /* USE_OTHER_METHOD */
+       if (bled && (var == 0x3803000F)) { /* USE_OTHER_METHOD */
                rx_writel(dev, MUnit.reserved2, 3);
                msleep(5000); /* Delay 5 seconds */
                var = 0x00000001;
        }
-       if (var != 0x00000001)
+       if (bled && (var != 0x00000001))
                return -EINVAL;
+       ssleep(5);
        if (rx_readl(dev, MUnit.OMRx[0]) & KERNEL_PANIC)
                return -ENODEV;
        if (startup_timeout < 300)