lpfc: Fix setting of EQ (interrupt) delay Multiplier
authorJames Smart <james.smart@emulex.com>
Tue, 7 Apr 2015 19:07:15 +0000 (15:07 -0400)
committerJames Bottomley <JBottomley@Odin.com>
Fri, 10 Apr 2015 14:47:27 +0000 (07:47 -0700)
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>
drivers/scsi/lpfc/lpfc_init.c
drivers/scsi/lpfc/lpfc_sli.c
drivers/scsi/lpfc/lpfc_sli4.h

index 74672e0263ff5b775de56c03e6ed562538bc194e..e01619c4a992a86a32ab6bedae399db7f99132b5 100644 (file)
@@ -7721,6 +7721,14 @@ lpfc_sli4_queue_setup(struct lpfc_hba *phba)
                        goto out_destroy_els_rq;
                }
        }
+
+       /*
+        * Configure EQ delay multipier for interrupt coalescing using
+        * MODIFY_EQ_DELAY for all EQs created, LPFC_MAX_EQ_DELAY at a time.
+        */
+       for (fcp_eqidx = 0; fcp_eqidx < phba->cfg_fcp_io_channel;
+                       fcp_eqidx += LPFC_MAX_EQ_DELAY)
+               lpfc_modify_fcp_eq_delay(phba, fcp_eqidx);
        return 0;
 
 out_destroy_els_rq:
index 207a43d952fa47e290894c2ade6dc19df3b1f026..303b231b5ef798e274bf49bac2b1ca8c759edd35 100644 (file)
@@ -12842,7 +12842,7 @@ lpfc_dual_chute_pci_bar_map(struct lpfc_hba *phba, uint16_t pci_barset)
  * fails this function will return -ENXIO.
  **/
 int
-lpfc_modify_fcp_eq_delay(struct lpfc_hba *phba, uint16_t startq)
+lpfc_modify_fcp_eq_delay(struct lpfc_hba *phba, uint32_t startq)
 {
        struct lpfc_mbx_modify_eq_delay *eq_delay;
        LPFC_MBOXQ_t *mbox;
@@ -12959,11 +12959,8 @@ lpfc_eq_create(struct lpfc_hba *phba, struct lpfc_queue *eq, uint32_t imax)
        bf_set(lpfc_eq_context_size, &eq_create->u.request.context,
               LPFC_EQE_SIZE);
        bf_set(lpfc_eq_context_valid, &eq_create->u.request.context, 1);
-       /* Calculate delay multiper from maximum interrupt per second */
-       if (imax > LPFC_DMULT_CONST)
-               dmult = 0;
-       else
-               dmult = LPFC_DMULT_CONST/imax - 1;
+       /* don't setup delay multiplier using EQ_CREATE */
+       dmult = 0;
        bf_set(lpfc_eq_context_delay_multi, &eq_create->u.request.context,
               dmult);
        switch (eq->entry_count) {
index 22ceb2b05ba1bcfb98c6e62c162f9d633e0a2c71..935b8eb87ed8cea178233f354b7a1f03c2c98107 100644 (file)
@@ -671,7 +671,7 @@ struct lpfc_queue *lpfc_sli4_queue_alloc(struct lpfc_hba *, uint32_t,
                        uint32_t);
 void lpfc_sli4_queue_free(struct lpfc_queue *);
 int lpfc_eq_create(struct lpfc_hba *, struct lpfc_queue *, uint32_t);
-int lpfc_modify_fcp_eq_delay(struct lpfc_hba *, uint16_t);
+int lpfc_modify_fcp_eq_delay(struct lpfc_hba *, uint32_t);
 int lpfc_cq_create(struct lpfc_hba *, struct lpfc_queue *,
                        struct lpfc_queue *, uint32_t, uint32_t);
 int32_t lpfc_mq_create(struct lpfc_hba *, struct lpfc_queue *,