aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/megaraid
diff options
context:
space:
mode:
authoradam radford <aradford@gmail.com>2011-10-08 21:14:27 -0400
committerJames Bottomley <JBottomley@Parallels.com>2011-10-16 12:18:00 -0400
commit058a8facfe1ee091b7188661937240fd0d950cf4 (patch)
tree2c9e493ceb3b4fb1ccc77ad79a7e5d1d8f2c72aa /drivers/scsi/megaraid
parenta748dcc2b1d0723d229e13c97e8e3b0602eda593 (diff)
[SCSI] megaraid_sas: Continue booting immediately if FW in FAULT at driver load time
Signed-off-by: Adam Radford <aradford@gmail.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/megaraid')
-rw-r--r--drivers/scsi/megaraid/megaraid_sas_base.c20
-rw-r--r--drivers/scsi/megaraid/megaraid_sas_fusion.c4
2 files changed, 13 insertions, 11 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index 776d01988660..9d5a14a2c5b1 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -84,7 +84,7 @@ MODULE_VERSION(MEGASAS_VERSION);
84MODULE_AUTHOR("megaraidlinux@lsi.com"); 84MODULE_AUTHOR("megaraidlinux@lsi.com");
85MODULE_DESCRIPTION("LSI MegaRAID SAS Driver"); 85MODULE_DESCRIPTION("LSI MegaRAID SAS Driver");
86 86
87int megasas_transition_to_ready(struct megasas_instance *instance); 87int megasas_transition_to_ready(struct megasas_instance *instance, int ocr);
88static int megasas_get_pd_list(struct megasas_instance *instance); 88static int megasas_get_pd_list(struct megasas_instance *instance);
89static int megasas_issue_init_mfi(struct megasas_instance *instance); 89static int megasas_issue_init_mfi(struct megasas_instance *instance);
90static int megasas_register_aen(struct megasas_instance *instance, 90static int megasas_register_aen(struct megasas_instance *instance,
@@ -2477,7 +2477,7 @@ process_fw_state_change_wq(struct work_struct *work)
2477 msleep(1000); 2477 msleep(1000);
2478 } 2478 }
2479 2479
2480 if (megasas_transition_to_ready(instance)) { 2480 if (megasas_transition_to_ready(instance, 1)) {
2481 printk(KERN_NOTICE "megaraid_sas:adapter not ready\n"); 2481 printk(KERN_NOTICE "megaraid_sas:adapter not ready\n");
2482 2482
2483 megaraid_sas_kill_hba(instance); 2483 megaraid_sas_kill_hba(instance);
@@ -2617,7 +2617,7 @@ static irqreturn_t megasas_isr(int irq, void *devp)
2617 * has to wait for the ready state. 2617 * has to wait for the ready state.
2618 */ 2618 */
2619int 2619int
2620megasas_transition_to_ready(struct megasas_instance* instance) 2620megasas_transition_to_ready(struct megasas_instance *instance, int ocr)
2621{ 2621{
2622 int i; 2622 int i;
2623 u8 max_wait; 2623 u8 max_wait;
@@ -2639,11 +2639,13 @@ megasas_transition_to_ready(struct megasas_instance* instance)
2639 switch (fw_state) { 2639 switch (fw_state) {
2640 2640
2641 case MFI_STATE_FAULT: 2641 case MFI_STATE_FAULT:
2642
2643 printk(KERN_DEBUG "megasas: FW in FAULT state!!\n"); 2642 printk(KERN_DEBUG "megasas: FW in FAULT state!!\n");
2644 max_wait = MEGASAS_RESET_WAIT_TIME; 2643 if (ocr) {
2645 cur_state = MFI_STATE_FAULT; 2644 max_wait = MEGASAS_RESET_WAIT_TIME;
2646 break; 2645 cur_state = MFI_STATE_FAULT;
2646 break;
2647 } else
2648 return -ENODEV;
2647 2649
2648 case MFI_STATE_WAIT_HANDSHAKE: 2650 case MFI_STATE_WAIT_HANDSHAKE:
2649 /* 2651 /*
@@ -3520,7 +3522,7 @@ static int megasas_init_fw(struct megasas_instance *instance)
3520 /* 3522 /*
3521 * We expect the FW state to be READY 3523 * We expect the FW state to be READY
3522 */ 3524 */
3523 if (megasas_transition_to_ready(instance)) 3525 if (megasas_transition_to_ready(instance, 0))
3524 goto fail_ready_state; 3526 goto fail_ready_state;
3525 3527
3526 /* Check if MSI-X is supported while in ready state */ 3528 /* Check if MSI-X is supported while in ready state */
@@ -4357,7 +4359,7 @@ megasas_resume(struct pci_dev *pdev)
4357 /* 4359 /*
4358 * We expect the FW state to be READY 4360 * We expect the FW state to be READY
4359 */ 4361 */
4360 if (megasas_transition_to_ready(instance)) 4362 if (megasas_transition_to_ready(instance, 0))
4361 goto fail_ready_state; 4363 goto fail_ready_state;
4362 4364
4363 /* Now re-enable MSI-X */ 4365 /* Now re-enable MSI-X */
diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c
index f13e7abd345a..392b49d93b55 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
@@ -89,7 +89,7 @@ u8 MR_ValidateMapInfo(struct MR_FW_RAID_MAP_ALL *map,
89 struct LD_LOAD_BALANCE_INFO *lbInfo); 89 struct LD_LOAD_BALANCE_INFO *lbInfo);
90u16 get_updated_dev_handle(struct LD_LOAD_BALANCE_INFO *lbInfo, 90u16 get_updated_dev_handle(struct LD_LOAD_BALANCE_INFO *lbInfo,
91 struct IO_REQUEST_INFO *in_info); 91 struct IO_REQUEST_INFO *in_info);
92int megasas_transition_to_ready(struct megasas_instance *instance); 92int megasas_transition_to_ready(struct megasas_instance *instance, int ocr);
93void megaraid_sas_kill_hba(struct megasas_instance *instance); 93void megaraid_sas_kill_hba(struct megasas_instance *instance);
94 94
95extern u32 megasas_dbg_lvl; 95extern u32 megasas_dbg_lvl;
@@ -2173,7 +2173,7 @@ int megasas_reset_fusion(struct Scsi_Host *shost)
2173 } 2173 }
2174 2174
2175 /* Wait for FW to become ready */ 2175 /* Wait for FW to become ready */
2176 if (megasas_transition_to_ready(instance)) { 2176 if (megasas_transition_to_ready(instance, 1)) {
2177 printk(KERN_WARNING "megaraid_sas: Failed to " 2177 printk(KERN_WARNING "megaraid_sas: Failed to "
2178 "transition controller to ready.\n"); 2178 "transition controller to ready.\n");
2179 continue; 2179 continue;