]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
scsi: lpfc: Correct embedded io wq element size
authorJames Smart <james.smart@broadcom.com>
Thu, 13 Oct 2016 22:06:03 +0000 (15:06 -0700)
committerChuck Anderson <chuck.anderson@oracle.com>
Mon, 27 Feb 2017 06:13:10 +0000 (22:13 -0800)
Orabug: 25486030

Correct embedded io wq element size. Embedded element sizes are
128 byte elements

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit dc58f44c2140748d96e33a533cd9e80692f58518)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/scsi/lpfc/lpfc_init.c

index adf61b43eb70716f5b00d2c019fec6e4099376e1..1d131785e28b2cc8922bd64f1de3bbd38ef391c6 100644 (file)
@@ -7262,6 +7262,7 @@ int
 lpfc_sli4_queue_create(struct lpfc_hba *phba)
 {
        struct lpfc_queue *qdesc;
+       uint32_t wqesize;
        int idx;
 
        /*
@@ -7346,15 +7347,10 @@ lpfc_sli4_queue_create(struct lpfc_hba *phba)
                phba->sli4_hba.fcp_cq[idx] = qdesc;
 
                /* Create Fast Path FCP WQs */
-               if (phba->fcp_embed_io) {
-                       qdesc = lpfc_sli4_queue_alloc(phba,
-                                                     LPFC_WQE128_SIZE,
-                                                     LPFC_WQE128_DEF_COUNT);
-               } else {
-                       qdesc = lpfc_sli4_queue_alloc(phba,
-                                                     phba->sli4_hba.wq_esize,
-                                                     phba->sli4_hba.wq_ecount);
-               }
+               wqesize = (phba->fcp_embed_io) ?
+                               LPFC_WQE128_SIZE : phba->sli4_hba.wq_esize;
+               qdesc = lpfc_sli4_queue_alloc(phba, wqesize,
+                                               phba->sli4_hba.wq_ecount);
                if (!qdesc) {
                        lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
                                        "0503 Failed allocate fast-path FCP "