aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/lpfc/lpfc_scsi.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
index 1bcebbd3dfac..a22bdf9548a6 100644
--- a/drivers/scsi/lpfc/lpfc_scsi.c
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -966,10 +966,9 @@ lpfc_queuecommand(struct scsi_cmnd *cmnd, void (*done) (struct scsi_cmnd *))
966 * Catch race where our node has transitioned, but the 966 * Catch race where our node has transitioned, but the
967 * transport is still transitioning. 967 * transport is still transitioning.
968 */ 968 */
969 if (!ndlp || !NLP_CHK_NODE_ACT(ndlp)) { 969 if (!ndlp || !NLP_CHK_NODE_ACT(ndlp))
970 cmnd->result = ScsiResult(DID_BUS_BUSY, 0); 970 goto out_target_busy;
971 goto out_fail_command; 971
972 }
973 lpfc_cmd = lpfc_get_scsi_buf(phba); 972 lpfc_cmd = lpfc_get_scsi_buf(phba);
974 if (lpfc_cmd == NULL) { 973 if (lpfc_cmd == NULL) {
975 lpfc_adjust_queue_depth(phba); 974 lpfc_adjust_queue_depth(phba);
@@ -1014,6 +1013,8 @@ lpfc_queuecommand(struct scsi_cmnd *cmnd, void (*done) (struct scsi_cmnd *))
1014 lpfc_release_scsi_buf(phba, lpfc_cmd); 1013 lpfc_release_scsi_buf(phba, lpfc_cmd);
1015 out_host_busy: 1014 out_host_busy:
1016 return SCSI_MLQUEUE_HOST_BUSY; 1015 return SCSI_MLQUEUE_HOST_BUSY;
1016 out_target_busy:
1017 return SCSI_MLQUEUE_TARGET_BUSY;
1017 1018
1018 out_fail_command: 1019 out_fail_command:
1019 done(cmnd); 1020 done(cmnd);