aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2011-02-25 15:04:28 -0500
committerJames Bottomley <James.Bottomley@suse.de>2011-02-28 12:21:53 -0500
commit3496343df5062d36354a106f19c9688a6ecf9734 (patch)
tree7c7c10526f9181211640b05e074fa45884d44eb3 /drivers/scsi/lpfc
parentf55ca84d92d0c249ce4f4b8d493657a59c359c5d (diff)
[SCSI] lpfc: block target when port queueing limit is hit
Instead of blocking the entire host when the port's queueing limit is hit, we should only block the port's target. This will allow IO to other ports to execute. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Acked-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/lpfc')
-rw-r--r--drivers/scsi/lpfc/lpfc_scsi.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
index ff20abdc5095..bf34178b80bf 100644
--- a/drivers/scsi/lpfc/lpfc_scsi.c
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -3062,7 +3062,7 @@ lpfc_queuecommand_lck(struct scsi_cmnd *cmnd, void (*done) (struct scsi_cmnd *))
3062 goto out_fail_command; 3062 goto out_fail_command;
3063 } 3063 }
3064 if (atomic_read(&ndlp->cmd_pending) >= ndlp->cmd_qdepth) 3064 if (atomic_read(&ndlp->cmd_pending) >= ndlp->cmd_qdepth)
3065 goto out_host_busy; 3065 goto out_tgt_busy;
3066 3066
3067 lpfc_cmd = lpfc_get_scsi_buf(phba, ndlp); 3067 lpfc_cmd = lpfc_get_scsi_buf(phba, ndlp);
3068 if (lpfc_cmd == NULL) { 3068 if (lpfc_cmd == NULL) {
@@ -3179,6 +3179,9 @@ lpfc_queuecommand_lck(struct scsi_cmnd *cmnd, void (*done) (struct scsi_cmnd *))
3179 out_host_busy: 3179 out_host_busy:
3180 return SCSI_MLQUEUE_HOST_BUSY; 3180 return SCSI_MLQUEUE_HOST_BUSY;
3181 3181
3182 out_tgt_busy:
3183 return SCSI_MLQUEUE_TARGET_BUSY;
3184
3182 out_fail_command: 3185 out_fail_command:
3183 done(cmnd); 3186 done(cmnd);
3184 return 0; 3187 return 0;