summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_sli.c
diff options
context:
space:
mode:
authorJames Smart2012-08-03 18:36:42 +0200
committerJames Bottomley2012-09-14 15:43:46 +0200
commit49aa143da98cac07f56096de0d099cb00ccd1582 (patch)
treedef5e5c8db4554a6f6e7064366a21e4013d30ef0 /drivers/scsi/lpfc/lpfc_sli.c
parent[SCSI] lpfc 8.3.33: Change Naming convention for SLI4 Interrupt vector (diff)
downloadkernel-qcow2-linux-49aa143da98cac07f56096de0d099cb00ccd1582.tar.gz
kernel-qcow2-linux-49aa143da98cac07f56096de0d099cb00ccd1582.tar.xz
kernel-qcow2-linux-49aa143da98cac07f56096de0d099cb00ccd1582.zip
[SCSI] lpfc 8.3.33: Make I/O to hw queue distribution algorithm a module parameter
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_sli.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_sli.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 0d5dab3da964..d8dbe403c37e 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -7816,7 +7816,11 @@ lpfc_sli4_scmd_to_wqidx_distr(struct lpfc_hba *phba)
{
int i;
- i = atomic_add_return(1, &phba->fcp_qidx);
+ if (phba->cfg_fcp_io_sched == LPFC_FCP_SCHED_BY_CPU)
+ i = smp_processor_id();
+ else
+ i = atomic_add_return(1, &phba->fcp_qidx);
+
i = (i % phba->cfg_fcp_io_channel);
return i;
}