summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSumit.Saxena@lsi.com2013-07-15 22:56:05 +0200
committerJames Bottomley2013-08-02 22:01:29 +0200
commit6431f5d7c6025f8b007af06ea090de308f7e6881 (patch)
treeb4dc694bc8b0b12cebe61dc177db1973809e85b8
parentMerge tag 'firewire-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/iee... (diff)
downloadkernel-qcow2-linux-6431f5d7c6025f8b007af06ea090de308f7e6881.tar.gz
kernel-qcow2-linux-6431f5d7c6025f8b007af06ea090de308f7e6881.tar.xz
kernel-qcow2-linux-6431f5d7c6025f8b007af06ea090de308f7e6881.zip
[SCSI] megaraid_sas: megaraid_sas driver init fails in kdump kernel
Problem: When Hardware IOMMU is on, megaraid_sas driver initialization fails in kdump kernel with LSI MegaRAID controller(device id-0x73). Actually this issue needs fix in firmware, but for firmware running in field, this driver fix is proposed to resolve the issue. At firmware initialization time, if firmware does not come to ready state, driver will reset the adapter and retry for firmware transition to ready state unconditionally(not only executed for kdump kernel). Signed-off-by: Sumit Saxena <sumit.saxena@lsi.com> Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Cc: stable@vger.kernel.org Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-rw-r--r--drivers/scsi/megaraid/megaraid_sas_base.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index 0177295599e0..1f0ca68409d4 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -3547,11 +3547,21 @@ static int megasas_init_fw(struct megasas_instance *instance)
break;
}
- /*
- * We expect the FW state to be READY
- */
- if (megasas_transition_to_ready(instance, 0))
- goto fail_ready_state;
+ if (megasas_transition_to_ready(instance, 0)) {
+ atomic_set(&instance->fw_reset_no_pci_access, 1);
+ instance->instancet->adp_reset
+ (instance, instance->reg_set);
+ atomic_set(&instance->fw_reset_no_pci_access, 0);
+ dev_info(&instance->pdev->dev,
+ "megasas: FW restarted successfully from %s!\n",
+ __func__);
+
+ /*waitting for about 30 second before retry*/
+ ssleep(30);
+
+ if (megasas_transition_to_ready(instance, 0))
+ goto fail_ready_state;
+ }
/*
* MSI-X host index 0 is common for all adapter.