Skip to content

Commit a93ce02

Browse files
Mike Christiejejb
authored andcommitted
[SCSI] lpfc: use SCSI_MLQUEUE_TARGET_BUSY when catching the rport transition race
We do want to call right back into the queuecommand during the race, so we can just use SCSI_MLQUEUE_TARGET_BUSY. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Acked-by: James Smart <James.Smart@Emulex.Com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
1 parent d6d13ee commit a93ce02

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

‎drivers/scsi/lpfc/lpfc_scsi.c‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -966,10 +966,9 @@ lpfc_queuecommand(struct scsi_cmnd *cmnd, void (*done) (struct scsi_cmnd *))
966966
* Catch race where our node has transitioned, but the
967967
* transport is still transitioning.
968968
*/
969-
if (!ndlp || !NLP_CHK_NODE_ACT(ndlp)) {
970-
cmnd->result = ScsiResult(DID_BUS_BUSY, 0);
971-
goto out_fail_command;
972-
}
969+
if (!ndlp || !NLP_CHK_NODE_ACT(ndlp))
970+
goto out_target_busy;
971+
973972
lpfc_cmd = lpfc_get_scsi_buf(phba);
974973
if (lpfc_cmd == NULL) {
975974
lpfc_adjust_queue_depth(phba);
@@ -1014,6 +1013,8 @@ lpfc_queuecommand(struct scsi_cmnd *cmnd, void (*done) (struct scsi_cmnd *))
10141013
lpfc_release_scsi_buf(phba, lpfc_cmd);
10151014
out_host_busy:
10161015
return SCSI_MLQUEUE_HOST_BUSY;
1016+
out_target_busy:
1017+
return SCSI_MLQUEUE_TARGET_BUSY;
10171018

10181019
out_fail_command:
10191020
done(cmnd);

0 commit comments

Comments
 (0)