[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>
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 0d5dab3..d8dbe40 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -7816,7 +7816,11 @@
{
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;
}