aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Smart <james.smart@emulex.com>2015-04-07 15:07:15 -0400
committerJames Bottomley <JBottomley@Odin.com>2015-04-10 10:47:27 -0400
commit2c9c5a001002cf95d36636c2debd897a17781b06 (patch)
treeaa3a072884a351594f446d2019f9501bc9d45d3c
parentea4142f6b10585f271a40ee52eec2f55e48aeccf (diff)
lpfc: Fix setting of EQ (interrupt) delay Multiplier
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
-rw-r--r--drivers/scsi/lpfc/lpfc_init.c8
-rw-r--r--drivers/scsi/lpfc/lpfc_sli.c9
-rw-r--r--drivers/scsi/lpfc/lpfc_sli4.h2
3 files changed, 12 insertions, 7 deletions
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 74672e0263ff..e01619c4a992 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -7721,6 +7721,14 @@ lpfc_sli4_queue_setup(struct lpfc_hba *phba)
7721 goto out_destroy_els_rq; 7721 goto out_destroy_els_rq;
7722 } 7722 }
7723 } 7723 }
7724
7725 /*
7726 * Configure EQ delay multipier for interrupt coalescing using
7727 * MODIFY_EQ_DELAY for all EQs created, LPFC_MAX_EQ_DELAY at a time.
7728 */
7729 for (fcp_eqidx = 0; fcp_eqidx < phba->cfg_fcp_io_channel;
7730 fcp_eqidx += LPFC_MAX_EQ_DELAY)
7731 lpfc_modify_fcp_eq_delay(phba, fcp_eqidx);
7724 return 0; 7732 return 0;
7725 7733
7726out_destroy_els_rq: 7734out_destroy_els_rq:
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 207a43d952fa..303b231b5ef7 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -12842,7 +12842,7 @@ lpfc_dual_chute_pci_bar_map(struct lpfc_hba *phba, uint16_t pci_barset)
12842 * fails this function will return -ENXIO. 12842 * fails this function will return -ENXIO.
12843 **/ 12843 **/
12844int 12844int
12845lpfc_modify_fcp_eq_delay(struct lpfc_hba *phba, uint16_t startq) 12845lpfc_modify_fcp_eq_delay(struct lpfc_hba *phba, uint32_t startq)
12846{ 12846{
12847 struct lpfc_mbx_modify_eq_delay *eq_delay; 12847 struct lpfc_mbx_modify_eq_delay *eq_delay;
12848 LPFC_MBOXQ_t *mbox; 12848 LPFC_MBOXQ_t *mbox;
@@ -12959,11 +12959,8 @@ lpfc_eq_create(struct lpfc_hba *phba, struct lpfc_queue *eq, uint32_t imax)
12959 bf_set(lpfc_eq_context_size, &eq_create->u.request.context, 12959 bf_set(lpfc_eq_context_size, &eq_create->u.request.context,
12960 LPFC_EQE_SIZE); 12960 LPFC_EQE_SIZE);
12961 bf_set(lpfc_eq_context_valid, &eq_create->u.request.context, 1); 12961 bf_set(lpfc_eq_context_valid, &eq_create->u.request.context, 1);
12962 /* Calculate delay multiper from maximum interrupt per second */ 12962 /* don't setup delay multiplier using EQ_CREATE */
12963 if (imax > LPFC_DMULT_CONST) 12963 dmult = 0;
12964 dmult = 0;
12965 else
12966 dmult = LPFC_DMULT_CONST/imax - 1;
12967 bf_set(lpfc_eq_context_delay_multi, &eq_create->u.request.context, 12964 bf_set(lpfc_eq_context_delay_multi, &eq_create->u.request.context,
12968 dmult); 12965 dmult);
12969 switch (eq->entry_count) { 12966 switch (eq->entry_count) {
diff --git a/drivers/scsi/lpfc/lpfc_sli4.h b/drivers/scsi/lpfc/lpfc_sli4.h
index 22ceb2b05ba1..935b8eb87ed8 100644
--- a/drivers/scsi/lpfc/lpfc_sli4.h
+++ b/drivers/scsi/lpfc/lpfc_sli4.h
@@ -671,7 +671,7 @@ struct lpfc_queue *lpfc_sli4_queue_alloc(struct lpfc_hba *, uint32_t,
671 uint32_t); 671 uint32_t);
672void lpfc_sli4_queue_free(struct lpfc_queue *); 672void lpfc_sli4_queue_free(struct lpfc_queue *);
673int lpfc_eq_create(struct lpfc_hba *, struct lpfc_queue *, uint32_t); 673int lpfc_eq_create(struct lpfc_hba *, struct lpfc_queue *, uint32_t);
674int lpfc_modify_fcp_eq_delay(struct lpfc_hba *, uint16_t); 674int lpfc_modify_fcp_eq_delay(struct lpfc_hba *, uint32_t);
675int lpfc_cq_create(struct lpfc_hba *, struct lpfc_queue *, 675int lpfc_cq_create(struct lpfc_hba *, struct lpfc_queue *,
676 struct lpfc_queue *, uint32_t, uint32_t); 676 struct lpfc_queue *, uint32_t, uint32_t);
677int32_t lpfc_mq_create(struct lpfc_hba *, struct lpfc_queue *, 677int32_t lpfc_mq_create(struct lpfc_hba *, struct lpfc_queue *,