Commit a93ce024 authored by Mike Christie's avatar Mike Christie Committed by James Bottomley

[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: default avatarMike Christie <michaelc@cs.wisc.edu>
Acked-by: default avatarJames Smart <James.Smart@Emulex.Com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
parent d6d13ee1
...@@ -966,10 +966,9 @@ lpfc_queuecommand(struct scsi_cmnd *cmnd, void (*done) (struct scsi_cmnd *)) ...@@ -966,10 +966,9 @@ lpfc_queuecommand(struct scsi_cmnd *cmnd, void (*done) (struct scsi_cmnd *))
* Catch race where our node has transitioned, but the * Catch race where our node has transitioned, but the
* transport is still transitioning. * transport is still transitioning.
*/ */
if (!ndlp || !NLP_CHK_NODE_ACT(ndlp)) { if (!ndlp || !NLP_CHK_NODE_ACT(ndlp))
cmnd->result = ScsiResult(DID_BUS_BUSY, 0); goto out_target_busy;
goto out_fail_command;
}
lpfc_cmd = lpfc_get_scsi_buf(phba); lpfc_cmd = lpfc_get_scsi_buf(phba);
if (lpfc_cmd == NULL) { if (lpfc_cmd == NULL) {
lpfc_adjust_queue_depth(phba); lpfc_adjust_queue_depth(phba);
...@@ -1014,6 +1013,8 @@ lpfc_queuecommand(struct scsi_cmnd *cmnd, void (*done) (struct scsi_cmnd *)) ...@@ -1014,6 +1013,8 @@ lpfc_queuecommand(struct scsi_cmnd *cmnd, void (*done) (struct scsi_cmnd *))
lpfc_release_scsi_buf(phba, lpfc_cmd); lpfc_release_scsi_buf(phba, lpfc_cmd);
out_host_busy: out_host_busy:
return SCSI_MLQUEUE_HOST_BUSY; return SCSI_MLQUEUE_HOST_BUSY;
out_target_busy:
return SCSI_MLQUEUE_TARGET_BUSY;
out_fail_command: out_fail_command:
done(cmnd); done(cmnd);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment