diff options
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_scsi.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_scsi.c | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index 66e09069f281..925975d2d765 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c | |||
@@ -4275,10 +4275,8 @@ lpfc_queuecommand_lck(struct scsi_cmnd *cmnd, void (*done) (struct scsi_cmnd *)) | |||
4275 | * Catch race where our node has transitioned, but the | 4275 | * Catch race where our node has transitioned, but the |
4276 | * transport is still transitioning. | 4276 | * transport is still transitioning. |
4277 | */ | 4277 | */ |
4278 | if (!ndlp || !NLP_CHK_NODE_ACT(ndlp)) { | 4278 | if (!ndlp || !NLP_CHK_NODE_ACT(ndlp)) |
4279 | cmnd->result = ScsiResult(DID_IMM_RETRY, 0); | 4279 | goto out_tgt_busy; |
4280 | goto out_fail_command; | ||
4281 | } | ||
4282 | if (atomic_read(&ndlp->cmd_pending) >= ndlp->cmd_qdepth) | 4280 | if (atomic_read(&ndlp->cmd_pending) >= ndlp->cmd_qdepth) |
4283 | goto out_tgt_busy; | 4281 | goto out_tgt_busy; |
4284 | 4282 | ||
@@ -4412,12 +4410,12 @@ lpfc_abort_handler(struct scsi_cmnd *cmnd) | |||
4412 | struct lpfc_iocbq *abtsiocb; | 4410 | struct lpfc_iocbq *abtsiocb; |
4413 | struct lpfc_scsi_buf *lpfc_cmd; | 4411 | struct lpfc_scsi_buf *lpfc_cmd; |
4414 | IOCB_t *cmd, *icmd; | 4412 | IOCB_t *cmd, *icmd; |
4415 | int ret = SUCCESS; | 4413 | int ret = SUCCESS, status = 0; |
4416 | DECLARE_WAIT_QUEUE_HEAD_ONSTACK(waitq); | 4414 | DECLARE_WAIT_QUEUE_HEAD_ONSTACK(waitq); |
4417 | 4415 | ||
4418 | ret = fc_block_scsi_eh(cmnd); | 4416 | status = fc_block_scsi_eh(cmnd); |
4419 | if (ret) | 4417 | if (status) |
4420 | return ret; | 4418 | return status; |
4421 | 4419 | ||
4422 | spin_lock_irq(&phba->hbalock); | 4420 | spin_lock_irq(&phba->hbalock); |
4423 | /* driver queued commands are in process of being flushed */ | 4421 | /* driver queued commands are in process of being flushed */ |
@@ -4435,7 +4433,7 @@ lpfc_abort_handler(struct scsi_cmnd *cmnd) | |||
4435 | lpfc_printf_vlog(vport, KERN_WARNING, LOG_FCP, | 4433 | lpfc_printf_vlog(vport, KERN_WARNING, LOG_FCP, |
4436 | "2873 SCSI Layer I/O Abort Request IO CMPL Status " | 4434 | "2873 SCSI Layer I/O Abort Request IO CMPL Status " |
4437 | "x%x ID %d LUN %d\n", | 4435 | "x%x ID %d LUN %d\n", |
4438 | ret, cmnd->device->id, cmnd->device->lun); | 4436 | SUCCESS, cmnd->device->id, cmnd->device->lun); |
4439 | return SUCCESS; | 4437 | return SUCCESS; |
4440 | } | 4438 | } |
4441 | 4439 | ||
@@ -4762,7 +4760,7 @@ lpfc_device_reset_handler(struct scsi_cmnd *cmnd) | |||
4762 | unsigned tgt_id = cmnd->device->id; | 4760 | unsigned tgt_id = cmnd->device->id; |
4763 | unsigned int lun_id = cmnd->device->lun; | 4761 | unsigned int lun_id = cmnd->device->lun; |
4764 | struct lpfc_scsi_event_header scsi_event; | 4762 | struct lpfc_scsi_event_header scsi_event; |
4765 | int status; | 4763 | int status, ret = SUCCESS; |
4766 | 4764 | ||
4767 | if (!rdata) { | 4765 | if (!rdata) { |
4768 | lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP, | 4766 | lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP, |
@@ -4803,9 +4801,9 @@ lpfc_device_reset_handler(struct scsi_cmnd *cmnd) | |||
4803 | * So, continue on. | 4801 | * So, continue on. |
4804 | * We will report success if all the i/o aborts successfully. | 4802 | * We will report success if all the i/o aborts successfully. |
4805 | */ | 4803 | */ |
4806 | status = lpfc_reset_flush_io_context(vport, tgt_id, lun_id, | 4804 | ret = lpfc_reset_flush_io_context(vport, tgt_id, lun_id, |
4807 | LPFC_CTX_LUN); | 4805 | LPFC_CTX_LUN); |
4808 | return status; | 4806 | return ret; |
4809 | } | 4807 | } |
4810 | 4808 | ||
4811 | /** | 4809 | /** |
@@ -4829,7 +4827,7 @@ lpfc_target_reset_handler(struct scsi_cmnd *cmnd) | |||
4829 | unsigned tgt_id = cmnd->device->id; | 4827 | unsigned tgt_id = cmnd->device->id; |
4830 | unsigned int lun_id = cmnd->device->lun; | 4828 | unsigned int lun_id = cmnd->device->lun; |
4831 | struct lpfc_scsi_event_header scsi_event; | 4829 | struct lpfc_scsi_event_header scsi_event; |
4832 | int status; | 4830 | int status, ret = SUCCESS; |
4833 | 4831 | ||
4834 | if (!rdata) { | 4832 | if (!rdata) { |
4835 | lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP, | 4833 | lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP, |
@@ -4870,9 +4868,9 @@ lpfc_target_reset_handler(struct scsi_cmnd *cmnd) | |||
4870 | * So, continue on. | 4868 | * So, continue on. |
4871 | * We will report success if all the i/o aborts successfully. | 4869 | * We will report success if all the i/o aborts successfully. |
4872 | */ | 4870 | */ |
4873 | status = lpfc_reset_flush_io_context(vport, tgt_id, lun_id, | 4871 | ret = lpfc_reset_flush_io_context(vport, tgt_id, lun_id, |
4874 | LPFC_CTX_TGT); | 4872 | LPFC_CTX_TGT); |
4875 | return status; | 4873 | return ret; |
4876 | } | 4874 | } |
4877 | 4875 | ||
4878 | /** | 4876 | /** |
@@ -4982,7 +4980,7 @@ lpfc_host_reset_handler(struct scsi_cmnd *cmnd) | |||
4982 | struct lpfc_hba *phba = vport->phba; | 4980 | struct lpfc_hba *phba = vport->phba; |
4983 | int rc, ret = SUCCESS; | 4981 | int rc, ret = SUCCESS; |
4984 | 4982 | ||
4985 | lpfc_offline_prep(phba); | 4983 | lpfc_offline_prep(phba, LPFC_MBX_WAIT); |
4986 | lpfc_offline(phba); | 4984 | lpfc_offline(phba); |
4987 | rc = lpfc_sli_brdrestart(phba); | 4985 | rc = lpfc_sli_brdrestart(phba); |
4988 | if (rc) | 4986 | if (rc) |