diff options
author | James Smart <james.smart@emulex.com> | 2012-08-03 12:35:54 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-09-14 09:39:22 -0400 |
commit | 2a76a28314993d27668fc7f9d5b6427facce4318 (patch) | |
tree | 4d05de5a9562632c4536e1ee9f7c87d964d70e2a /drivers | |
parent | 027140eab7d45f406e3397cc9373767d191ac6b4 (diff) |
[SCSI] lpfc 8.3.33: Parallelize SLI-4 Q distribution
Commonize SLI-3/4 Ring/Queue framework, to keep SLI-3 compatibility
Parallelize SLI-4 Q distribution - to use multiple posting/completion queues
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/lpfc/lpfc.h | 2 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_hw.h | 14 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_init.c | 35 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_sli.c | 52 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_sli.h | 8 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_sli4.h | 2 |
6 files changed, 77 insertions, 36 deletions
diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h index a65c05a8d488..a870af1b5478 100644 --- a/drivers/scsi/lpfc/lpfc.h +++ b/drivers/scsi/lpfc/lpfc.h | |||
@@ -732,7 +732,7 @@ struct lpfc_hba { | |||
732 | uint32_t hbq_count; /* Count of configured HBQs */ | 732 | uint32_t hbq_count; /* Count of configured HBQs */ |
733 | struct hbq_s hbqs[LPFC_MAX_HBQS]; /* local copy of hbq indicies */ | 733 | struct hbq_s hbqs[LPFC_MAX_HBQS]; /* local copy of hbq indicies */ |
734 | 734 | ||
735 | uint32_t fcp_qidx; /* next work queue to post work to */ | 735 | atomic_t fcp_qidx; /* next work queue to post work to */ |
736 | 736 | ||
737 | unsigned long pci_bar0_map; /* Physical address for PCI BAR0 */ | 737 | unsigned long pci_bar0_map; /* Physical address for PCI BAR0 */ |
738 | unsigned long pci_bar1_map; /* Physical address for PCI BAR1 */ | 738 | unsigned long pci_bar1_map; /* Physical address for PCI BAR1 */ |
diff --git a/drivers/scsi/lpfc/lpfc_hw.h b/drivers/scsi/lpfc/lpfc_hw.h index 4ab0e3542c5d..d74470481ca6 100644 --- a/drivers/scsi/lpfc/lpfc_hw.h +++ b/drivers/scsi/lpfc/lpfc_hw.h | |||
@@ -1188,8 +1188,8 @@ typedef struct { | |||
1188 | */ | 1188 | */ |
1189 | 1189 | ||
1190 | /* Number of rings currently used and available. */ | 1190 | /* Number of rings currently used and available. */ |
1191 | #define MAX_CONFIGURED_RINGS 3 | 1191 | #define MAX_SLI3_CONFIGURED_RINGS 3 |
1192 | #define MAX_RINGS 4 | 1192 | #define MAX_SLI3_RINGS 4 |
1193 | 1193 | ||
1194 | /* IOCB / Mailbox is owned by FireFly */ | 1194 | /* IOCB / Mailbox is owned by FireFly */ |
1195 | #define OWN_CHIP 1 | 1195 | #define OWN_CHIP 1 |
@@ -2993,7 +2993,7 @@ typedef struct _PCB { | |||
2993 | 2993 | ||
2994 | uint32_t pgpAddrLow; | 2994 | uint32_t pgpAddrLow; |
2995 | uint32_t pgpAddrHigh; | 2995 | uint32_t pgpAddrHigh; |
2996 | SLI2_RDSC rdsc[MAX_RINGS]; | 2996 | SLI2_RDSC rdsc[MAX_SLI3_RINGS]; |
2997 | } PCB_t; | 2997 | } PCB_t; |
2998 | 2998 | ||
2999 | /* NEW_FEATURE */ | 2999 | /* NEW_FEATURE */ |
@@ -3103,18 +3103,18 @@ struct lpfc_pgp { | |||
3103 | 3103 | ||
3104 | struct sli2_desc { | 3104 | struct sli2_desc { |
3105 | uint32_t unused1[16]; | 3105 | uint32_t unused1[16]; |
3106 | struct lpfc_hgp host[MAX_RINGS]; | 3106 | struct lpfc_hgp host[MAX_SLI3_RINGS]; |
3107 | struct lpfc_pgp port[MAX_RINGS]; | 3107 | struct lpfc_pgp port[MAX_SLI3_RINGS]; |
3108 | }; | 3108 | }; |
3109 | 3109 | ||
3110 | struct sli3_desc { | 3110 | struct sli3_desc { |
3111 | struct lpfc_hgp host[MAX_RINGS]; | 3111 | struct lpfc_hgp host[MAX_SLI3_RINGS]; |
3112 | uint32_t reserved[8]; | 3112 | uint32_t reserved[8]; |
3113 | uint32_t hbq_put[16]; | 3113 | uint32_t hbq_put[16]; |
3114 | }; | 3114 | }; |
3115 | 3115 | ||
3116 | struct sli3_pgp { | 3116 | struct sli3_pgp { |
3117 | struct lpfc_pgp port[MAX_RINGS]; | 3117 | struct lpfc_pgp port[MAX_SLI3_RINGS]; |
3118 | uint32_t hbq_get[16]; | 3118 | uint32_t hbq_get[16]; |
3119 | }; | 3119 | }; |
3120 | 3120 | ||
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 9efe5f82a6a1..176302f0e02c 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c | |||
@@ -4551,6 +4551,13 @@ lpfc_sli_driver_resource_setup(struct lpfc_hba *phba) | |||
4551 | phba->cfg_sg_seg_cnt = LPFC_DEFAULT_MENLO_SG_SEG_CNT; | 4551 | phba->cfg_sg_seg_cnt = LPFC_DEFAULT_MENLO_SG_SEG_CNT; |
4552 | } | 4552 | } |
4553 | 4553 | ||
4554 | if (!phba->sli.ring) | ||
4555 | phba->sli.ring = (struct lpfc_sli_ring *) | ||
4556 | kzalloc(LPFC_SLI3_MAX_RING * | ||
4557 | sizeof(struct lpfc_sli_ring), GFP_KERNEL); | ||
4558 | if (!phba->sli.ring) | ||
4559 | return -ENOMEM; | ||
4560 | |||
4554 | /* | 4561 | /* |
4555 | * Since the sg_tablesize is module parameter, the sg_dma_buf_size | 4562 | * Since the sg_tablesize is module parameter, the sg_dma_buf_size |
4556 | * used to create the sg_dma_buf_pool must be dynamically calculated. | 4563 | * used to create the sg_dma_buf_pool must be dynamically calculated. |
@@ -4710,6 +4717,16 @@ lpfc_sli4_driver_resource_setup(struct lpfc_hba *phba) | |||
4710 | sges_per_segment = 2; | 4717 | sges_per_segment = 2; |
4711 | 4718 | ||
4712 | /* | 4719 | /* |
4720 | * For SLI4, instead of using ring 0 (LPFC_FCP_RING) for FCP commands | ||
4721 | * we will associate a new ring, for each FCP fastpath EQ/CQ/WQ tuple. | ||
4722 | */ | ||
4723 | if (!phba->sli.ring) | ||
4724 | phba->sli.ring = kzalloc( | ||
4725 | (LPFC_SLI3_MAX_RING + phba->cfg_fcp_eq_count) * | ||
4726 | sizeof(struct lpfc_sli_ring), GFP_KERNEL); | ||
4727 | if (!phba->sli.ring) | ||
4728 | return -ENOMEM; | ||
4729 | /* | ||
4713 | * Since the sg_tablesize is module parameter, the sg_dma_buf_size | 4730 | * Since the sg_tablesize is module parameter, the sg_dma_buf_size |
4714 | * used to create the sg_dma_buf_pool must be dynamically calculated. | 4731 | * used to create the sg_dma_buf_pool must be dynamically calculated. |
4715 | * 2 segments are added since the IOCB needs a command and response bde. | 4732 | * 2 segments are added since the IOCB needs a command and response bde. |
@@ -5555,6 +5572,10 @@ lpfc_hba_free(struct lpfc_hba *phba) | |||
5555 | /* Release the driver assigned board number */ | 5572 | /* Release the driver assigned board number */ |
5556 | idr_remove(&lpfc_hba_index, phba->brd_no); | 5573 | idr_remove(&lpfc_hba_index, phba->brd_no); |
5557 | 5574 | ||
5575 | /* Free memory allocated with sli rings */ | ||
5576 | kfree(phba->sli.ring); | ||
5577 | phba->sli.ring = NULL; | ||
5578 | |||
5558 | kfree(phba); | 5579 | kfree(phba); |
5559 | return; | 5580 | return; |
5560 | } | 5581 | } |
@@ -6924,6 +6945,8 @@ lpfc_sli4_queue_destroy(struct lpfc_hba *phba) | |||
6924 | int | 6945 | int |
6925 | lpfc_sli4_queue_setup(struct lpfc_hba *phba) | 6946 | lpfc_sli4_queue_setup(struct lpfc_hba *phba) |
6926 | { | 6947 | { |
6948 | struct lpfc_sli *psli = &phba->sli; | ||
6949 | struct lpfc_sli_ring *pring; | ||
6927 | int rc = -ENOMEM; | 6950 | int rc = -ENOMEM; |
6928 | int fcp_eqidx, fcp_cqidx, fcp_wqidx; | 6951 | int fcp_eqidx, fcp_cqidx, fcp_wqidx; |
6929 | int fcp_cq_index = 0; | 6952 | int fcp_cq_index = 0; |
@@ -7107,6 +7130,12 @@ lpfc_sli4_queue_setup(struct lpfc_hba *phba) | |||
7107 | "rc = 0x%x\n", rc); | 7130 | "rc = 0x%x\n", rc); |
7108 | goto out_destroy_mbx_wq; | 7131 | goto out_destroy_mbx_wq; |
7109 | } | 7132 | } |
7133 | |||
7134 | /* Bind this WQ to the ELS ring */ | ||
7135 | pring = &psli->ring[LPFC_ELS_RING]; | ||
7136 | pring->sli.sli4.wqp = (void *)phba->sli4_hba.els_wq; | ||
7137 | phba->sli4_hba.els_cq->pring = pring; | ||
7138 | |||
7110 | lpfc_printf_log(phba, KERN_INFO, LOG_INIT, | 7139 | lpfc_printf_log(phba, KERN_INFO, LOG_INIT, |
7111 | "2590 ELS WQ setup: wq-id=%d, parent cq-id=%d\n", | 7140 | "2590 ELS WQ setup: wq-id=%d, parent cq-id=%d\n", |
7112 | phba->sli4_hba.els_wq->queue_id, | 7141 | phba->sli4_hba.els_wq->queue_id, |
@@ -7137,6 +7166,12 @@ lpfc_sli4_queue_setup(struct lpfc_hba *phba) | |||
7137 | "WQ (%d), rc = 0x%x\n", fcp_wqidx, rc); | 7166 | "WQ (%d), rc = 0x%x\n", fcp_wqidx, rc); |
7138 | goto out_destroy_fcp_wq; | 7167 | goto out_destroy_fcp_wq; |
7139 | } | 7168 | } |
7169 | |||
7170 | /* Bind this WQ to the next FCP ring */ | ||
7171 | pring = &psli->ring[MAX_SLI3_CONFIGURED_RINGS + fcp_wqidx]; | ||
7172 | pring->sli.sli4.wqp = (void *)phba->sli4_hba.fcp_wq[fcp_wqidx]; | ||
7173 | phba->sli4_hba.fcp_cq[fcp_cq_index]->pring = pring; | ||
7174 | |||
7140 | lpfc_printf_log(phba, KERN_INFO, LOG_INIT, | 7175 | lpfc_printf_log(phba, KERN_INFO, LOG_INIT, |
7141 | "2591 FCP WQ setup: wq[%d]-id=%d, " | 7176 | "2591 FCP WQ setup: wq[%d]-id=%d, " |
7142 | "parent cq[%d]-id=%d\n", | 7177 | "parent cq[%d]-id=%d\n", |
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index d7afd0fb4579..982bd40353ec 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c | |||
@@ -7796,14 +7796,14 @@ lpfc_sli4_bpl2sgl(struct lpfc_hba *phba, struct lpfc_iocbq *piocbq, | |||
7796 | * | 7796 | * |
7797 | * Return: index into SLI4 fast-path FCP queue index. | 7797 | * Return: index into SLI4 fast-path FCP queue index. |
7798 | **/ | 7798 | **/ |
7799 | static uint32_t | 7799 | static inline uint32_t |
7800 | lpfc_sli4_scmd_to_wqidx_distr(struct lpfc_hba *phba) | 7800 | lpfc_sli4_scmd_to_wqidx_distr(struct lpfc_hba *phba) |
7801 | { | 7801 | { |
7802 | ++phba->fcp_qidx; | 7802 | int i; |
7803 | if (phba->fcp_qidx >= phba->cfg_fcp_wq_count) | ||
7804 | phba->fcp_qidx = 0; | ||
7805 | 7803 | ||
7806 | return phba->fcp_qidx; | 7804 | i = atomic_add_return(1, &phba->fcp_qidx); |
7805 | i = (i % phba->cfg_fcp_wq_count); | ||
7806 | return i; | ||
7807 | } | 7807 | } |
7808 | 7808 | ||
7809 | /** | 7809 | /** |
@@ -8323,16 +8323,6 @@ __lpfc_sli_issue_iocb_s4(struct lpfc_hba *phba, uint32_t ring_number, | |||
8323 | 8323 | ||
8324 | if ((piocb->iocb_flag & LPFC_IO_FCP) || | 8324 | if ((piocb->iocb_flag & LPFC_IO_FCP) || |
8325 | (piocb->iocb_flag & LPFC_USE_FCPWQIDX)) { | 8325 | (piocb->iocb_flag & LPFC_USE_FCPWQIDX)) { |
8326 | /* | ||
8327 | * For FCP command IOCB, get a new WQ index to distribute | ||
8328 | * WQE across the WQsr. On the other hand, for abort IOCB, | ||
8329 | * it carries the same WQ index to the original command | ||
8330 | * IOCB. | ||
8331 | */ | ||
8332 | if (piocb->iocb_flag & LPFC_IO_FCP) | ||
8333 | piocb->fcp_wqidx = lpfc_sli4_scmd_to_wqidx_distr(phba); | ||
8334 | if (unlikely(!phba->sli4_hba.fcp_wq)) | ||
8335 | return IOCB_ERROR; | ||
8336 | if (lpfc_sli4_wq_put(phba->sli4_hba.fcp_wq[piocb->fcp_wqidx], | 8326 | if (lpfc_sli4_wq_put(phba->sli4_hba.fcp_wq[piocb->fcp_wqidx], |
8337 | &wqe)) | 8327 | &wqe)) |
8338 | return IOCB_ERROR; | 8328 | return IOCB_ERROR; |
@@ -8413,11 +8403,18 @@ int | |||
8413 | lpfc_sli_issue_iocb(struct lpfc_hba *phba, uint32_t ring_number, | 8403 | lpfc_sli_issue_iocb(struct lpfc_hba *phba, uint32_t ring_number, |
8414 | struct lpfc_iocbq *piocb, uint32_t flag) | 8404 | struct lpfc_iocbq *piocb, uint32_t flag) |
8415 | { | 8405 | { |
8416 | struct lpfc_sli_ring *pring = &phba->sli.ring[LPFC_ELS_RING]; | 8406 | struct lpfc_sli_ring *pring; |
8417 | unsigned long iflags; | 8407 | unsigned long iflags; |
8418 | int rc; | 8408 | int rc, idx; |
8419 | 8409 | ||
8420 | if (phba->sli_rev == LPFC_SLI_REV4) { | 8410 | if (phba->sli_rev == LPFC_SLI_REV4) { |
8411 | if (piocb->iocb_flag & LPFC_IO_FCP) { | ||
8412 | if (unlikely(!phba->sli4_hba.fcp_wq)) | ||
8413 | return IOCB_ERROR; | ||
8414 | idx = lpfc_sli4_scmd_to_wqidx_distr(phba); | ||
8415 | piocb->fcp_wqidx = idx; | ||
8416 | ring_number = MAX_SLI3_CONFIGURED_RINGS + idx; | ||
8417 | } | ||
8421 | pring = &phba->sli.ring[ring_number]; | 8418 | pring = &phba->sli.ring[ring_number]; |
8422 | spin_lock_irqsave(&pring->ring_lock, iflags); | 8419 | spin_lock_irqsave(&pring->ring_lock, iflags); |
8423 | rc = __lpfc_sli_issue_iocb(phba, ring_number, piocb, flag); | 8420 | rc = __lpfc_sli_issue_iocb(phba, ring_number, piocb, flag); |
@@ -8712,7 +8709,9 @@ lpfc_sli_setup(struct lpfc_hba *phba) | |||
8712 | struct lpfc_sli *psli = &phba->sli; | 8709 | struct lpfc_sli *psli = &phba->sli; |
8713 | struct lpfc_sli_ring *pring; | 8710 | struct lpfc_sli_ring *pring; |
8714 | 8711 | ||
8715 | psli->num_rings = MAX_CONFIGURED_RINGS; | 8712 | psli->num_rings = MAX_SLI3_CONFIGURED_RINGS; |
8713 | if (phba->sli_rev == LPFC_SLI_REV4) | ||
8714 | psli->num_rings += phba->cfg_fcp_eq_count; | ||
8716 | psli->sli_flag = 0; | 8715 | psli->sli_flag = 0; |
8717 | psli->fcp_ring = LPFC_FCP_RING; | 8716 | psli->fcp_ring = LPFC_FCP_RING; |
8718 | psli->next_ring = LPFC_FCP_NEXT_RING; | 8717 | psli->next_ring = LPFC_FCP_NEXT_RING; |
@@ -11191,6 +11190,7 @@ lpfc_sli4_sp_handle_mcqe(struct lpfc_hba *phba, struct lpfc_cqe *cqe) | |||
11191 | /** | 11190 | /** |
11192 | * lpfc_sli4_sp_handle_els_wcqe - Handle els work-queue completion event | 11191 | * lpfc_sli4_sp_handle_els_wcqe - Handle els work-queue completion event |
11193 | * @phba: Pointer to HBA context object. | 11192 | * @phba: Pointer to HBA context object. |
11193 | * @cq: Pointer to associated CQ | ||
11194 | * @wcqe: Pointer to work-queue completion queue entry. | 11194 | * @wcqe: Pointer to work-queue completion queue entry. |
11195 | * | 11195 | * |
11196 | * This routine handles an ELS work-queue completion event. | 11196 | * This routine handles an ELS work-queue completion event. |
@@ -11198,12 +11198,12 @@ lpfc_sli4_sp_handle_mcqe(struct lpfc_hba *phba, struct lpfc_cqe *cqe) | |||
11198 | * Return: true if work posted to worker thread, otherwise false. | 11198 | * Return: true if work posted to worker thread, otherwise false. |
11199 | **/ | 11199 | **/ |
11200 | static bool | 11200 | static bool |
11201 | lpfc_sli4_sp_handle_els_wcqe(struct lpfc_hba *phba, | 11201 | lpfc_sli4_sp_handle_els_wcqe(struct lpfc_hba *phba, struct lpfc_queue *cq, |
11202 | struct lpfc_wcqe_complete *wcqe) | 11202 | struct lpfc_wcqe_complete *wcqe) |
11203 | { | 11203 | { |
11204 | struct lpfc_iocbq *irspiocbq; | 11204 | struct lpfc_iocbq *irspiocbq; |
11205 | unsigned long iflags; | 11205 | unsigned long iflags; |
11206 | struct lpfc_sli_ring *pring = &phba->sli.ring[LPFC_ELS_RING]; | 11206 | struct lpfc_sli_ring *pring = cq->pring; |
11207 | 11207 | ||
11208 | /* Get an irspiocbq for later ELS response processing use */ | 11208 | /* Get an irspiocbq for later ELS response processing use */ |
11209 | irspiocbq = lpfc_sli_get_iocbq(phba); | 11209 | irspiocbq = lpfc_sli_get_iocbq(phba); |
@@ -11408,7 +11408,7 @@ lpfc_sli4_sp_handle_cqe(struct lpfc_hba *phba, struct lpfc_queue *cq, | |||
11408 | case CQE_CODE_COMPL_WQE: | 11408 | case CQE_CODE_COMPL_WQE: |
11409 | /* Process the WQ/RQ complete event */ | 11409 | /* Process the WQ/RQ complete event */ |
11410 | phba->last_completion_time = jiffies; | 11410 | phba->last_completion_time = jiffies; |
11411 | workposted = lpfc_sli4_sp_handle_els_wcqe(phba, | 11411 | workposted = lpfc_sli4_sp_handle_els_wcqe(phba, cq, |
11412 | (struct lpfc_wcqe_complete *)&cqevt); | 11412 | (struct lpfc_wcqe_complete *)&cqevt); |
11413 | break; | 11413 | break; |
11414 | case CQE_CODE_RELEASE_WQE: | 11414 | case CQE_CODE_RELEASE_WQE: |
@@ -11540,16 +11540,18 @@ lpfc_sli4_sp_handle_eqe(struct lpfc_hba *phba, struct lpfc_eqe *eqe) | |||
11540 | 11540 | ||
11541 | /** | 11541 | /** |
11542 | * lpfc_sli4_fp_handle_fcp_wcqe - Process fast-path work queue completion entry | 11542 | * lpfc_sli4_fp_handle_fcp_wcqe - Process fast-path work queue completion entry |
11543 | * @eqe: Pointer to fast-path completion queue entry. | 11543 | * @phba: Pointer to HBA context object. |
11544 | * @cq: Pointer to associated CQ | ||
11545 | * @wcqe: Pointer to work-queue completion queue entry. | ||
11544 | * | 11546 | * |
11545 | * This routine process a fast-path work queue completion entry from fast-path | 11547 | * This routine process a fast-path work queue completion entry from fast-path |
11546 | * event queue for FCP command response completion. | 11548 | * event queue for FCP command response completion. |
11547 | **/ | 11549 | **/ |
11548 | static void | 11550 | static void |
11549 | lpfc_sli4_fp_handle_fcp_wcqe(struct lpfc_hba *phba, | 11551 | lpfc_sli4_fp_handle_fcp_wcqe(struct lpfc_hba *phba, struct lpfc_queue *cq, |
11550 | struct lpfc_wcqe_complete *wcqe) | 11552 | struct lpfc_wcqe_complete *wcqe) |
11551 | { | 11553 | { |
11552 | struct lpfc_sli_ring *pring = &phba->sli.ring[LPFC_FCP_RING]; | 11554 | struct lpfc_sli_ring *pring = cq->pring; |
11553 | struct lpfc_iocbq *cmdiocbq; | 11555 | struct lpfc_iocbq *cmdiocbq; |
11554 | struct lpfc_iocbq irspiocbq; | 11556 | struct lpfc_iocbq irspiocbq; |
11555 | unsigned long iflags; | 11557 | unsigned long iflags; |
@@ -11667,7 +11669,7 @@ lpfc_sli4_fp_handle_wcqe(struct lpfc_hba *phba, struct lpfc_queue *cq, | |||
11667 | cq->CQ_wq++; | 11669 | cq->CQ_wq++; |
11668 | /* Process the WQ complete event */ | 11670 | /* Process the WQ complete event */ |
11669 | phba->last_completion_time = jiffies; | 11671 | phba->last_completion_time = jiffies; |
11670 | lpfc_sli4_fp_handle_fcp_wcqe(phba, | 11672 | lpfc_sli4_fp_handle_fcp_wcqe(phba, cq, |
11671 | (struct lpfc_wcqe_complete *)&wcqe); | 11673 | (struct lpfc_wcqe_complete *)&wcqe); |
11672 | break; | 11674 | break; |
11673 | case CQE_CODE_RELEASE_WQE: | 11675 | case CQE_CODE_RELEASE_WQE: |
diff --git a/drivers/scsi/lpfc/lpfc_sli.h b/drivers/scsi/lpfc/lpfc_sli.h index 2d64a2bab36a..4b9b44e8e064 100644 --- a/drivers/scsi/lpfc/lpfc_sli.h +++ b/drivers/scsi/lpfc/lpfc_sli.h | |||
@@ -131,7 +131,9 @@ typedef struct lpfcMboxq { | |||
131 | 131 | ||
132 | #define LPFC_MAX_RING_MASK 5 /* max num of rctl/type masks allowed per | 132 | #define LPFC_MAX_RING_MASK 5 /* max num of rctl/type masks allowed per |
133 | ring */ | 133 | ring */ |
134 | #define LPFC_MAX_RING 4 /* max num of SLI rings used by driver */ | 134 | #define LPFC_SLI3_MAX_RING 4 /* Max num of SLI3 rings used by driver. |
135 | For SLI4, an additional ring for each | ||
136 | FCP WQ will be allocated. */ | ||
135 | 137 | ||
136 | struct lpfc_sli_ring; | 138 | struct lpfc_sli_ring; |
137 | 139 | ||
@@ -172,7 +174,7 @@ struct lpfc_sli3_ring { | |||
172 | }; | 174 | }; |
173 | 175 | ||
174 | struct lpfc_sli4_ring { | 176 | struct lpfc_sli4_ring { |
175 | void *wqp; /* Pointer to associated WQ */ | 177 | struct lpfc_queue *wqp; /* Pointer to associated WQ */ |
176 | }; | 178 | }; |
177 | 179 | ||
178 | 180 | ||
@@ -284,7 +286,7 @@ struct lpfc_sli { | |||
284 | #define LPFC_MENLO_MAINT 0x1000 /* need for menl fw download */ | 286 | #define LPFC_MENLO_MAINT 0x1000 /* need for menl fw download */ |
285 | #define LPFC_SLI_ASYNC_MBX_BLK 0x2000 /* Async mailbox is blocked */ | 287 | #define LPFC_SLI_ASYNC_MBX_BLK 0x2000 /* Async mailbox is blocked */ |
286 | 288 | ||
287 | struct lpfc_sli_ring ring[LPFC_MAX_RING]; | 289 | struct lpfc_sli_ring *ring; |
288 | int fcp_ring; /* ring used for FCP initiator commands */ | 290 | int fcp_ring; /* ring used for FCP initiator commands */ |
289 | int next_ring; | 291 | int next_ring; |
290 | 292 | ||
diff --git a/drivers/scsi/lpfc/lpfc_sli4.h b/drivers/scsi/lpfc/lpfc_sli4.h index f4b57654787b..e7d84134beb1 100644 --- a/drivers/scsi/lpfc/lpfc_sli4.h +++ b/drivers/scsi/lpfc/lpfc_sli4.h | |||
@@ -142,6 +142,8 @@ struct lpfc_queue { | |||
142 | uint32_t host_index; /* The host's index for putting or getting */ | 142 | uint32_t host_index; /* The host's index for putting or getting */ |
143 | uint32_t hba_index; /* The last known hba index for get or put */ | 143 | uint32_t hba_index; /* The last known hba index for get or put */ |
144 | 144 | ||
145 | struct lpfc_sli_ring *pring; /* ptr to io ring associated with q */ | ||
146 | |||
145 | /* For q stats */ | 147 | /* For q stats */ |
146 | uint32_t q_cnt_1; | 148 | uint32_t q_cnt_1; |
147 | uint32_t q_cnt_2; | 149 | uint32_t q_cnt_2; |