Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Mike Christie and committed by
James Bottomley
a93ce024 d6d13ee1

+5 -4
+5 -4
drivers/scsi/lpfc/lpfc_scsi.c
··· 966 966 * Catch race where our node has transitioned, but the 967 967 * transport is still transitioning. 968 968 */ 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 + 973 972 lpfc_cmd = lpfc_get_scsi_buf(phba); 974 973 if (lpfc_cmd == NULL) { 975 974 lpfc_adjust_queue_depth(phba); ··· 1013 1014 lpfc_release_scsi_buf(phba, lpfc_cmd); 1014 1015 out_host_busy: 1015 1016 return SCSI_MLQUEUE_HOST_BUSY; 1017 + out_target_busy: 1018 + return SCSI_MLQUEUE_TARGET_BUSY; 1016 1019 1017 1020 out_fail_command: 1018 1021 done(cmnd);