diff options
author | John Soni Jose <sony.john-n@emulex.com> | 2012-10-20 01:15:51 +0200 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-11-27 05:59:42 +0100 |
commit | 7a15800357e382b095b5dcb8edf79c3b2c8317e4 (patch) | |
tree | d9d6ab86b14a5e16a443504cc39d1742047a0fa1 /drivers/scsi/be2iscsi/be_cmds.c | |
parent | [SCSI] be2iscsi: Fix for MBX timeout issue (diff) | |
download | linux-7a15800357e382b095b5dcb8edf79c3b2c8317e4.tar.xz linux-7a15800357e382b095b5dcb8edf79c3b2c8317e4.zip |
[SCSI] be2iscsi: Fix Unrecoverable Error Detection
Driver periodically checks adapter state,is up fine or not.
Based on the value updates the internal structures of driver.
Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/be2iscsi/be_cmds.c')
-rw-r--r-- | drivers/scsi/be2iscsi/be_cmds.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/scsi/be2iscsi/be_cmds.c b/drivers/scsi/be2iscsi/be_cmds.c index 352fc53e91b8..5c87768c109c 100644 --- a/drivers/scsi/be2iscsi/be_cmds.c +++ b/drivers/scsi/be2iscsi/be_cmds.c @@ -157,6 +157,9 @@ int beiscsi_mccq_compl(struct beiscsi_hba *phba, struct be_cmd_req_hdr *ioctl_hdr; struct be_queue_info *mccq = &phba->ctrl.mcc_obj.q; + if (beiscsi_error(phba)) + return -EIO; + /* wait for the mccq completion */ rc = wait_event_interruptible_timeout( phba->ctrl.mcc_wait[tag], @@ -423,7 +426,7 @@ static int be_mcc_wait_compl(struct beiscsi_hba *phba) { int i, status; for (i = 0; i < mcc_timeout; i++) { - if (phba->fw_timeout) + if (beiscsi_error(phba)) return -EIO; status = beiscsi_process_mcc(phba); @@ -439,6 +442,7 @@ static int be_mcc_wait_compl(struct beiscsi_hba *phba) BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX, "BC_%d : FW Timed Out\n"); phba->fw_timeout = true; + beiscsi_ue_detect(phba); return -EBUSY; } return 0; @@ -479,7 +483,8 @@ static int be_mbox_db_ready_wait(struct be_ctrl_info *ctrl) u32 ready; do { - if (phba->fw_timeout) + + if (beiscsi_error(phba)) return -EIO; ready = ioread32(db) & MPU_MAILBOX_DB_RDY_MASK; @@ -491,6 +496,7 @@ static int be_mbox_db_ready_wait(struct be_ctrl_info *ctrl) BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX, "BC_%d : FW Timed Out\n"); phba->fw_timeout = true; + beiscsi_ue_detect(phba); return -EBUSY; } |