Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 271121
b: refs/heads/master
c: 058a8fa
h: refs/heads/master
i:
  271119: 2a792e1
v: v3
  • Loading branch information
adam radford authored and James Bottomley committed Oct 16, 2011
1 parent aceef62 commit 99ec3d9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a748dcc2b1d0723d229e13c97e8e3b0602eda593
refs/heads/master: 058a8facfe1ee091b7188661937240fd0d950cf4
20 changes: 11 additions & 9 deletions trunk/drivers/scsi/megaraid/megaraid_sas_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ MODULE_VERSION(MEGASAS_VERSION);
MODULE_AUTHOR("megaraidlinux@lsi.com");
MODULE_DESCRIPTION("LSI MegaRAID SAS Driver");

int megasas_transition_to_ready(struct megasas_instance *instance);
int megasas_transition_to_ready(struct megasas_instance *instance, int ocr);
static int megasas_get_pd_list(struct megasas_instance *instance);
static int megasas_issue_init_mfi(struct megasas_instance *instance);
static int megasas_register_aen(struct megasas_instance *instance,
Expand Down Expand Up @@ -2477,7 +2477,7 @@ process_fw_state_change_wq(struct work_struct *work)
msleep(1000);
}

if (megasas_transition_to_ready(instance)) {
if (megasas_transition_to_ready(instance, 1)) {
printk(KERN_NOTICE "megaraid_sas:adapter not ready\n");

megaraid_sas_kill_hba(instance);
Expand Down Expand Up @@ -2617,7 +2617,7 @@ static irqreturn_t megasas_isr(int irq, void *devp)
* has to wait for the ready state.
*/
int
megasas_transition_to_ready(struct megasas_instance* instance)
megasas_transition_to_ready(struct megasas_instance *instance, int ocr)
{
int i;
u8 max_wait;
Expand All @@ -2639,11 +2639,13 @@ megasas_transition_to_ready(struct megasas_instance* instance)
switch (fw_state) {

case MFI_STATE_FAULT:

printk(KERN_DEBUG "megasas: FW in FAULT state!!\n");
max_wait = MEGASAS_RESET_WAIT_TIME;
cur_state = MFI_STATE_FAULT;
break;
if (ocr) {
max_wait = MEGASAS_RESET_WAIT_TIME;
cur_state = MFI_STATE_FAULT;
break;
} else
return -ENODEV;

case MFI_STATE_WAIT_HANDSHAKE:
/*
Expand Down Expand Up @@ -3520,7 +3522,7 @@ static int megasas_init_fw(struct megasas_instance *instance)
/*
* We expect the FW state to be READY
*/
if (megasas_transition_to_ready(instance))
if (megasas_transition_to_ready(instance, 0))
goto fail_ready_state;

/* Check if MSI-X is supported while in ready state */
Expand Down Expand Up @@ -4357,7 +4359,7 @@ megasas_resume(struct pci_dev *pdev)
/*
* We expect the FW state to be READY
*/
if (megasas_transition_to_ready(instance))
if (megasas_transition_to_ready(instance, 0))
goto fail_ready_state;

/* Now re-enable MSI-X */
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/scsi/megaraid/megaraid_sas_fusion.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ u8 MR_ValidateMapInfo(struct MR_FW_RAID_MAP_ALL *map,
struct LD_LOAD_BALANCE_INFO *lbInfo);
u16 get_updated_dev_handle(struct LD_LOAD_BALANCE_INFO *lbInfo,
struct IO_REQUEST_INFO *in_info);
int megasas_transition_to_ready(struct megasas_instance *instance);
int megasas_transition_to_ready(struct megasas_instance *instance, int ocr);
void megaraid_sas_kill_hba(struct megasas_instance *instance);

extern u32 megasas_dbg_lvl;
Expand Down Expand Up @@ -2173,7 +2173,7 @@ int megasas_reset_fusion(struct Scsi_Host *shost)
}

/* Wait for FW to become ready */
if (megasas_transition_to_ready(instance)) {
if (megasas_transition_to_ready(instance, 1)) {
printk(KERN_WARNING "megaraid_sas: Failed to "
"transition controller to ready.\n");
continue;
Expand Down

0 comments on commit 99ec3d9

Please sign in to comment.