diff options
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, | |||
157 | struct be_cmd_req_hdr *ioctl_hdr; | 157 | struct be_cmd_req_hdr *ioctl_hdr; |
158 | struct be_queue_info *mccq = &phba->ctrl.mcc_obj.q; | 158 | struct be_queue_info *mccq = &phba->ctrl.mcc_obj.q; |
159 | 159 | ||
160 | if (beiscsi_error(phba)) | ||
161 | return -EIO; | ||
162 | |||
160 | /* wait for the mccq completion */ | 163 | /* wait for the mccq completion */ |
161 | rc = wait_event_interruptible_timeout( | 164 | rc = wait_event_interruptible_timeout( |
162 | phba->ctrl.mcc_wait[tag], | 165 | phba->ctrl.mcc_wait[tag], |
@@ -423,7 +426,7 @@ static int be_mcc_wait_compl(struct beiscsi_hba *phba) | |||
423 | { | 426 | { |
424 | int i, status; | 427 | int i, status; |
425 | for (i = 0; i < mcc_timeout; i++) { | 428 | for (i = 0; i < mcc_timeout; i++) { |
426 | if (phba->fw_timeout) | 429 | if (beiscsi_error(phba)) |
427 | return -EIO; | 430 | return -EIO; |
428 | 431 | ||
429 | status = beiscsi_process_mcc(phba); | 432 | status = beiscsi_process_mcc(phba); |
@@ -439,6 +442,7 @@ static int be_mcc_wait_compl(struct beiscsi_hba *phba) | |||
439 | BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX, | 442 | BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX, |
440 | "BC_%d : FW Timed Out\n"); | 443 | "BC_%d : FW Timed Out\n"); |
441 | phba->fw_timeout = true; | 444 | phba->fw_timeout = true; |
445 | beiscsi_ue_detect(phba); | ||
442 | return -EBUSY; | 446 | return -EBUSY; |
443 | } | 447 | } |
444 | return 0; | 448 | return 0; |
@@ -479,7 +483,8 @@ static int be_mbox_db_ready_wait(struct be_ctrl_info *ctrl) | |||
479 | u32 ready; | 483 | u32 ready; |
480 | 484 | ||
481 | do { | 485 | do { |
482 | if (phba->fw_timeout) | 486 | |
487 | if (beiscsi_error(phba)) | ||
483 | return -EIO; | 488 | return -EIO; |
484 | 489 | ||
485 | ready = ioread32(db) & MPU_MAILBOX_DB_RDY_MASK; | 490 | ready = ioread32(db) & MPU_MAILBOX_DB_RDY_MASK; |
@@ -491,6 +496,7 @@ static int be_mbox_db_ready_wait(struct be_ctrl_info *ctrl) | |||
491 | BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX, | 496 | BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX, |
492 | "BC_%d : FW Timed Out\n"); | 497 | "BC_%d : FW Timed Out\n"); |
493 | phba->fw_timeout = true; | 498 | phba->fw_timeout = true; |
499 | beiscsi_ue_detect(phba); | ||
494 | return -EBUSY; | 500 | return -EBUSY; |
495 | } | 501 | } |
496 | 502 | ||