Lines Matching refs:pring

883 lpfc_cmd_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring)  in lpfc_cmd_iocb()  argument
885 return (IOCB_t *) (((char *) pring->sli.sli3.cmdringaddr) + in lpfc_cmd_iocb()
886 pring->sli.sli3.cmdidx * phba->iocb_cmd_size); in lpfc_cmd_iocb()
900 lpfc_resp_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring) in lpfc_resp_iocb() argument
902 return (IOCB_t *) (((char *) pring->sli.sli3.rspringaddr) + in lpfc_resp_iocb()
903 pring->sli.sli3.rspidx * phba->iocb_rsp_size); in lpfc_resp_iocb()
1378 struct lpfc_sli_ring *pring; in __lpfc_sli_release_iocbq_s4() local
1422 pring = lpfc_phba_elsring(phba); in __lpfc_sli_release_iocbq_s4()
1424 if (pring && (!list_empty(&pring->txq))) in __lpfc_sli_release_iocbq_s4()
1721 lpfc_sli_ringtxcmpl_put(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, in lpfc_sli_ringtxcmpl_put() argument
1729 list_add_tail(&piocb->list, &pring->txcmplq); in lpfc_sli_ringtxcmpl_put()
1731 pring->txcmplq_cnt++; in lpfc_sli_ringtxcmpl_put()
1732 if ((unlikely(pring->ringno == LPFC_ELS_RING)) && in lpfc_sli_ringtxcmpl_put()
1757 lpfc_sli_ringtx_get(struct lpfc_hba *phba, struct lpfc_sli_ring *pring) in lpfc_sli_ringtx_get() argument
1763 list_remove_head((&pring->txq), cmd_iocb, struct lpfc_iocbq, list); in lpfc_sli_ringtx_get()
2038 lpfc_sli_next_iocb_slot (struct lpfc_hba *phba, struct lpfc_sli_ring *pring) in lpfc_sli_next_iocb_slot() argument
2040 struct lpfc_pgp *pgp = &phba->port_gp[pring->ringno]; in lpfc_sli_next_iocb_slot()
2041 uint32_t max_cmd_idx = pring->sli.sli3.numCiocb; in lpfc_sli_next_iocb_slot()
2045 if ((pring->sli.sli3.next_cmdidx == pring->sli.sli3.cmdidx) && in lpfc_sli_next_iocb_slot()
2046 (++pring->sli.sli3.next_cmdidx >= max_cmd_idx)) in lpfc_sli_next_iocb_slot()
2047 pring->sli.sli3.next_cmdidx = 0; in lpfc_sli_next_iocb_slot()
2049 if (unlikely(pring->sli.sli3.local_getidx == in lpfc_sli_next_iocb_slot()
2050 pring->sli.sli3.next_cmdidx)) { in lpfc_sli_next_iocb_slot()
2052 pring->sli.sli3.local_getidx = le32_to_cpu(pgp->cmdGetInx); in lpfc_sli_next_iocb_slot()
2054 if (unlikely(pring->sli.sli3.local_getidx >= max_cmd_idx)) { in lpfc_sli_next_iocb_slot()
2058 pring->ringno, in lpfc_sli_next_iocb_slot()
2059 pring->sli.sli3.local_getidx, in lpfc_sli_next_iocb_slot()
2075 if (pring->sli.sli3.local_getidx == pring->sli.sli3.next_cmdidx) in lpfc_sli_next_iocb_slot()
2079 return lpfc_cmd_iocb(phba, pring); in lpfc_sli_next_iocb_slot()
2173 lpfc_sli_submit_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, in lpfc_sli_submit_iocb() argument
2182 if (pring->ringno == LPFC_ELS_RING) { in lpfc_sli_submit_iocb()
2195 pring->stats.iocb_cmd++; in lpfc_sli_submit_iocb()
2203 lpfc_sli_ringtxcmpl_put(phba, pring, nextiocb); in lpfc_sli_submit_iocb()
2211 pring->sli.sli3.cmdidx = pring->sli.sli3.next_cmdidx; in lpfc_sli_submit_iocb()
2212 writel(pring->sli.sli3.cmdidx, &phba->host_gp[pring->ringno].cmdPutInx); in lpfc_sli_submit_iocb()
2228 lpfc_sli_update_full_ring(struct lpfc_hba *phba, struct lpfc_sli_ring *pring) in lpfc_sli_update_full_ring() argument
2230 int ringno = pring->ringno; in lpfc_sli_update_full_ring()
2232 pring->flag |= LPFC_CALL_RING_AVAILABLE; in lpfc_sli_update_full_ring()
2243 pring->stats.iocb_cmd_full++; in lpfc_sli_update_full_ring()
2256 lpfc_sli_update_ring(struct lpfc_hba *phba, struct lpfc_sli_ring *pring) in lpfc_sli_update_ring() argument
2258 int ringno = pring->ringno; in lpfc_sli_update_ring()
2280 lpfc_sli_resume_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring) in lpfc_sli_resume_iocb() argument
2296 (!list_empty(&pring->txq)) && in lpfc_sli_resume_iocb()
2297 (pring->ringno != LPFC_FCP_RING || in lpfc_sli_resume_iocb()
2300 while ((iocb = lpfc_sli_next_iocb_slot(phba, pring)) && in lpfc_sli_resume_iocb()
2301 (nextiocb = lpfc_sli_ringtx_get(phba, pring))) in lpfc_sli_resume_iocb()
2302 lpfc_sli_submit_iocb(phba, pring, iocb, nextiocb); in lpfc_sli_resume_iocb()
2305 lpfc_sli_update_ring(phba, pring); in lpfc_sli_resume_iocb()
2307 lpfc_sli_update_full_ring(phba, pring); in lpfc_sli_resume_iocb()
3169 struct lpfc_sli_ring *pring, in lpfc_sli_get_buff() argument
3175 return lpfc_sli_ring_taggedbuf_get(phba, pring, tag); in lpfc_sli_get_buff()
3333 lpfc_complete_unsol_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, in lpfc_complete_unsol_iocb() argument
3348 if (pring->prt[0].profile) { in lpfc_complete_unsol_iocb()
3349 if (pring->prt[0].lpfc_sli_rcv_unsol_event) in lpfc_complete_unsol_iocb()
3350 (pring->prt[0].lpfc_sli_rcv_unsol_event) (phba, pring, in lpfc_complete_unsol_iocb()
3356 for (i = 0; i < pring->num_mask; i++) { in lpfc_complete_unsol_iocb()
3357 if ((pring->prt[i].rctl == fch_r_ctl) && in lpfc_complete_unsol_iocb()
3358 (pring->prt[i].type == fch_type)) { in lpfc_complete_unsol_iocb()
3359 if (pring->prt[i].lpfc_sli_rcv_unsol_event) in lpfc_complete_unsol_iocb()
3360 (pring->prt[i].lpfc_sli_rcv_unsol_event) in lpfc_complete_unsol_iocb()
3361 (phba, pring, saveq); in lpfc_complete_unsol_iocb()
3433 lpfc_sli_process_unsol_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, in lpfc_sli_process_unsol_iocb() argument
3447 if (pring->lpfc_sli_rcv_async_status) in lpfc_sli_process_unsol_iocb()
3448 pring->lpfc_sli_rcv_async_status(phba, pring, saveq); in lpfc_sli_process_unsol_iocb()
3456 pring->ringno, in lpfc_sli_process_unsol_iocb()
3464 dmzbuf = lpfc_sli_get_buff(phba, pring, in lpfc_sli_process_unsol_iocb()
3470 dmzbuf = lpfc_sli_get_buff(phba, pring, in lpfc_sli_process_unsol_iocb()
3476 dmzbuf = lpfc_sli_get_buff(phba, pring, in lpfc_sli_process_unsol_iocb()
3486 saveq->cmd_dmabuf = lpfc_sli_get_buff(phba, pring, in lpfc_sli_process_unsol_iocb()
3494 pring->ringno, in lpfc_sli_process_unsol_iocb()
3498 saveq->bpl_dmabuf = lpfc_sli_get_buff(phba, pring, in lpfc_sli_process_unsol_iocb()
3506 pring->ringno, in lpfc_sli_process_unsol_iocb()
3513 pring, in lpfc_sli_process_unsol_iocb()
3521 ". tag 0x%x\n", pring->ringno, in lpfc_sli_process_unsol_iocb()
3526 pring, in lpfc_sli_process_unsol_iocb()
3535 pring->ringno, in lpfc_sli_process_unsol_iocb()
3542 saveq->cmd_dmabuf = lpfc_sli_ringpostbuf_get(phba, pring, in lpfc_sli_process_unsol_iocb()
3548 pring, in lpfc_sli_process_unsol_iocb()
3559 list_for_each_entry(iocbq, &pring->iocb_continue_saveq, clist) { in lpfc_sli_process_unsol_iocb()
3569 &pring->iocb_continue_saveq); in lpfc_sli_process_unsol_iocb()
3590 if ((Rctl == 0) && (pring->ringno == LPFC_ELS_RING) && in lpfc_sli_process_unsol_iocb()
3613 if (!lpfc_complete_unsol_iocb(phba, pring, saveq, Rctl, Type)) in lpfc_sli_process_unsol_iocb()
3617 pring->ringno, Rctl, Type); in lpfc_sli_process_unsol_iocb()
3637 struct lpfc_sli_ring *pring, in lpfc_sli_iocbq_lookup() argument
3654 pring->txcmplq_cnt--; in lpfc_sli_iocbq_lookup()
3680 struct lpfc_sli_ring *pring, uint16_t iotag) in lpfc_sli_iocbq_lookup_by_tag() argument
3690 pring->txcmplq_cnt--; in lpfc_sli_iocbq_lookup_by_tag()
3721 lpfc_sli_process_sol_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, in lpfc_sli_process_sol_iocb() argument
3729 spin_lock_irqsave(&pring->ring_lock, iflag); in lpfc_sli_process_sol_iocb()
3732 cmdiocbp = lpfc_sli_iocbq_lookup(phba, pring, saveq); in lpfc_sli_process_sol_iocb()
3734 spin_unlock_irqrestore(&pring->ring_lock, iflag); in lpfc_sli_process_sol_iocb()
3755 (pring->ringno == LPFC_ELS_RING) && in lpfc_sli_process_sol_iocb()
3764 if (pring->ringno == LPFC_ELS_RING) { in lpfc_sli_process_sol_iocb()
3850 if (pring->ringno != LPFC_ELS_RING) { in lpfc_sli_process_sol_iocb()
3859 pring->ringno, iotag, ulp_status, in lpfc_sli_process_sol_iocb()
3878 lpfc_sli_rsp_pointers_error(struct lpfc_hba *phba, struct lpfc_sli_ring *pring) in lpfc_sli_rsp_pointers_error() argument
3880 struct lpfc_pgp *pgp = &phba->port_gp[pring->ringno]; in lpfc_sli_rsp_pointers_error()
3888 pring->ringno, le32_to_cpu(pgp->rspPutInx), in lpfc_sli_rsp_pointers_error()
3889 pring->sli.sli3.numRiocb); in lpfc_sli_rsp_pointers_error()
3972 struct lpfc_sli_ring *pring, uint32_t mask) in lpfc_sli_handle_fast_ring_event() argument
3974 struct lpfc_pgp *pgp = &phba->port_gp[pring->ringno]; in lpfc_sli_handle_fast_ring_event()
3987 pring->stats.iocb_event++; in lpfc_sli_handle_fast_ring_event()
3993 portRspMax = pring->sli.sli3.numRiocb; in lpfc_sli_handle_fast_ring_event()
3996 lpfc_sli_rsp_pointers_error(phba, pring); in lpfc_sli_handle_fast_ring_event()
4007 while (pring->sli.sli3.rspidx != portRspPut) { in lpfc_sli_handle_fast_ring_event()
4013 entry = lpfc_resp_iocb(phba, pring); in lpfc_sli_handle_fast_ring_event()
4016 if (++pring->sli.sli3.rspidx >= portRspMax) in lpfc_sli_handle_fast_ring_event()
4017 pring->sli.sli3.rspidx = 0; in lpfc_sli_handle_fast_ring_event()
4026 pring->stats.iocb_rsp++; in lpfc_sli_handle_fast_ring_event()
4046 pring->ringno, in lpfc_sli_handle_fast_ring_event()
4073 cmdiocbq = lpfc_sli_iocbq_lookup(phba, pring, in lpfc_sli_handle_fast_ring_event()
4087 lpfc_sli_process_unsol_iocb(phba, pring, &rspiocbq); in lpfc_sli_handle_fast_ring_event()
4118 writel(pring->sli.sli3.rspidx, in lpfc_sli_handle_fast_ring_event()
4119 &phba->host_gp[pring->ringno].rspGetInx); in lpfc_sli_handle_fast_ring_event()
4121 if (pring->sli.sli3.rspidx == portRspPut) in lpfc_sli_handle_fast_ring_event()
4126 pring->stats.iocb_rsp_full++; in lpfc_sli_handle_fast_ring_event()
4127 status = ((CA_R0ATT | CA_R0RE_RSP) << (pring->ringno * 4)); in lpfc_sli_handle_fast_ring_event()
4131 if ((mask & HA_R0CE_RSP) && (pring->flag & LPFC_CALL_RING_AVAILABLE)) { in lpfc_sli_handle_fast_ring_event()
4132 pring->flag &= ~LPFC_CALL_RING_AVAILABLE; in lpfc_sli_handle_fast_ring_event()
4133 pring->stats.iocb_cmd_empty++; in lpfc_sli_handle_fast_ring_event()
4136 pring->sli.sli3.local_getidx = le32_to_cpu(pgp->cmdGetInx); in lpfc_sli_handle_fast_ring_event()
4137 lpfc_sli_resume_iocb(phba, pring); in lpfc_sli_handle_fast_ring_event()
4139 if ((pring->lpfc_sli_cmd_available)) in lpfc_sli_handle_fast_ring_event()
4140 (pring->lpfc_sli_cmd_available) (phba, pring); in lpfc_sli_handle_fast_ring_event()
4168 lpfc_sli_sp_handle_rspiocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, in lpfc_sli_sp_handle_rspiocb() argument
4186 list_add_tail(&rspiocbp->list, &pring->iocb_continueq); in lpfc_sli_sp_handle_rspiocb()
4187 pring->iocb_continueq_cnt++; in lpfc_sli_sp_handle_rspiocb()
4194 saveq = list_get_first(&pring->iocb_continueq, in lpfc_sli_sp_handle_rspiocb()
4196 list_del_init(&pring->iocb_continueq); in lpfc_sli_sp_handle_rspiocb()
4197 pring->iocb_continueq_cnt = 0; in lpfc_sli_sp_handle_rspiocb()
4199 pring->stats.iocb_rsp++; in lpfc_sli_sp_handle_rspiocb()
4224 pring->ringno, ulp_status, in lpfc_sli_sp_handle_rspiocb()
4246 pring->ringno, in lpfc_sli_sp_handle_rspiocb()
4266 rc = lpfc_sli_process_sol_iocb(phba, pring, saveq); in lpfc_sli_sp_handle_rspiocb()
4271 rc = lpfc_sli_process_unsol_iocb(phba, pring, saveq); in lpfc_sli_sp_handle_rspiocb()
4279 cmdiocb = lpfc_sli_iocbq_lookup(phba, pring, in lpfc_sli_sp_handle_rspiocb()
4340 struct lpfc_sli_ring *pring, uint32_t mask) in lpfc_sli_handle_slow_ring_event() argument
4342 phba->lpfc_sli_handle_slow_ring_event(phba, pring, mask); in lpfc_sli_handle_slow_ring_event()
4358 struct lpfc_sli_ring *pring, uint32_t mask) in lpfc_sli_handle_slow_ring_event_s3() argument
4368 pgp = &phba->port_gp[pring->ringno]; in lpfc_sli_handle_slow_ring_event_s3()
4370 pring->stats.iocb_event++; in lpfc_sli_handle_slow_ring_event_s3()
4376 portRspMax = pring->sli.sli3.numRiocb; in lpfc_sli_handle_slow_ring_event_s3()
4386 pring->ringno, portRspPut, portRspMax); in lpfc_sli_handle_slow_ring_event_s3()
4398 while (pring->sli.sli3.rspidx != portRspPut) { in lpfc_sli_handle_slow_ring_event_s3()
4412 entry = lpfc_resp_iocb(phba, pring); in lpfc_sli_handle_slow_ring_event_s3()
4426 if (++pring->sli.sli3.rspidx >= portRspMax) in lpfc_sli_handle_slow_ring_event_s3()
4427 pring->sli.sli3.rspidx = 0; in lpfc_sli_handle_slow_ring_event_s3()
4429 if (pring->ringno == LPFC_ELS_RING) { in lpfc_sli_handle_slow_ring_event_s3()
4437 writel(pring->sli.sli3.rspidx, in lpfc_sli_handle_slow_ring_event_s3()
4438 &phba->host_gp[pring->ringno].rspGetInx); in lpfc_sli_handle_slow_ring_event_s3()
4442 rspiocbp = lpfc_sli_sp_handle_rspiocb(phba, pring, rspiocbp); in lpfc_sli_handle_slow_ring_event_s3()
4450 if (pring->sli.sli3.rspidx == portRspPut) { in lpfc_sli_handle_slow_ring_event_s3()
4457 pring->stats.iocb_rsp_full++; in lpfc_sli_handle_slow_ring_event_s3()
4459 status = ((CA_R0ATT | CA_R0RE_RSP) << (pring->ringno * 4)); in lpfc_sli_handle_slow_ring_event_s3()
4463 if ((mask & HA_R0CE_RSP) && (pring->flag & LPFC_CALL_RING_AVAILABLE)) { in lpfc_sli_handle_slow_ring_event_s3()
4464 pring->flag &= ~LPFC_CALL_RING_AVAILABLE; in lpfc_sli_handle_slow_ring_event_s3()
4465 pring->stats.iocb_cmd_empty++; in lpfc_sli_handle_slow_ring_event_s3()
4468 pring->sli.sli3.local_getidx = le32_to_cpu(pgp->cmdGetInx); in lpfc_sli_handle_slow_ring_event_s3()
4469 lpfc_sli_resume_iocb(phba, pring); in lpfc_sli_handle_slow_ring_event_s3()
4471 if ((pring->lpfc_sli_cmd_available)) in lpfc_sli_handle_slow_ring_event_s3()
4472 (pring->lpfc_sli_cmd_available) (phba, pring); in lpfc_sli_handle_slow_ring_event_s3()
4494 struct lpfc_sli_ring *pring, uint32_t mask) in lpfc_sli_handle_slow_ring_event_s4() argument
4520 lpfc_sli_sp_handle_rspiocb(phba, pring, in lpfc_sli_handle_slow_ring_event_s4()
4552 lpfc_sli_abort_iocb_ring(struct lpfc_hba *phba, struct lpfc_sli_ring *pring) in lpfc_sli_abort_iocb_ring() argument
4559 if (pring->ringno == LPFC_ELS_RING) { in lpfc_sli_abort_iocb_ring()
4568 spin_lock_irq(&pring->ring_lock); in lpfc_sli_abort_iocb_ring()
4569 list_splice_init(&pring->txq, &tx_completions); in lpfc_sli_abort_iocb_ring()
4570 pring->txq_cnt = 0; in lpfc_sli_abort_iocb_ring()
4573 list_splice_init(&pring->txcmplq, in lpfc_sli_abort_iocb_ring()
4578 &pring->txcmplq, list) in lpfc_sli_abort_iocb_ring()
4579 lpfc_sli_issue_abort_iotag(phba, pring, in lpfc_sli_abort_iocb_ring()
4582 spin_unlock_irq(&pring->ring_lock); in lpfc_sli_abort_iocb_ring()
4585 list_splice_init(&pring->txq, &tx_completions); in lpfc_sli_abort_iocb_ring()
4586 pring->txq_cnt = 0; in lpfc_sli_abort_iocb_ring()
4589 list_splice_init(&pring->txcmplq, &txcmplq_completions); in lpfc_sli_abort_iocb_ring()
4593 &pring->txcmplq, list) in lpfc_sli_abort_iocb_ring()
4594 lpfc_sli_issue_abort_iotag(phba, pring, in lpfc_sli_abort_iocb_ring()
4626 struct lpfc_sli_ring *pring; in lpfc_sli_abort_fcp_rings() local
4632 pring = phba->sli4_hba.hdwq[i].io_wq->pring; in lpfc_sli_abort_fcp_rings()
4633 lpfc_sli_abort_iocb_ring(phba, pring); in lpfc_sli_abort_fcp_rings()
4636 pring = &psli->sli3_ring[LPFC_FCP_RING]; in lpfc_sli_abort_fcp_rings()
4637 lpfc_sli_abort_iocb_ring(phba, pring); in lpfc_sli_abort_fcp_rings()
4657 struct lpfc_sli_ring *pring; in lpfc_sli_flush_io_rings() local
4669 pring = phba->sli4_hba.hdwq[i].io_wq->pring; in lpfc_sli_flush_io_rings()
4671 spin_lock_irq(&pring->ring_lock); in lpfc_sli_flush_io_rings()
4673 list_splice_init(&pring->txq, &txq); in lpfc_sli_flush_io_rings()
4675 &pring->txcmplq, list) in lpfc_sli_flush_io_rings()
4678 list_splice_init(&pring->txcmplq, &txcmplq); in lpfc_sli_flush_io_rings()
4679 pring->txq_cnt = 0; in lpfc_sli_flush_io_rings()
4680 pring->txcmplq_cnt = 0; in lpfc_sli_flush_io_rings()
4681 spin_unlock_irq(&pring->ring_lock); in lpfc_sli_flush_io_rings()
4695 pring = &psli->sli3_ring[LPFC_FCP_RING]; in lpfc_sli_flush_io_rings()
4699 list_splice_init(&pring->txq, &txq); in lpfc_sli_flush_io_rings()
4701 &pring->txcmplq, list) in lpfc_sli_flush_io_rings()
4704 list_splice_init(&pring->txcmplq, &txcmplq); in lpfc_sli_flush_io_rings()
4705 pring->txq_cnt = 0; in lpfc_sli_flush_io_rings()
4706 pring->txcmplq_cnt = 0; in lpfc_sli_flush_io_rings()
5058 struct lpfc_sli_ring *pring; in lpfc_sli_brdreset() local
5101 pring = &psli->sli3_ring[i]; in lpfc_sli_brdreset()
5102 pring->flag = 0; in lpfc_sli_brdreset()
5103 pring->sli.sli3.rspidx = 0; in lpfc_sli_brdreset()
5104 pring->sli.sli3.next_cmdidx = 0; in lpfc_sli_brdreset()
5105 pring->sli.sli3.local_getidx = 0; in lpfc_sli_brdreset()
5106 pring->sli.sli3.cmdidx = 0; in lpfc_sli_brdreset()
5107 pring->missbufcnt = 0; in lpfc_sli_brdreset()
10364 __lpfc_sli_ringtx_put(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, in __lpfc_sli_ringtx_put() argument
10368 lockdep_assert_held(&pring->ring_lock); in __lpfc_sli_ringtx_put()
10372 list_add_tail(&piocb->list, &pring->txq); in __lpfc_sli_ringtx_put()
10393 lpfc_sli_next_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, in lpfc_sli_next_iocb() argument
10400 nextiocb = lpfc_sli_ringtx_get(phba, pring); in lpfc_sli_next_iocb()
10437 struct lpfc_sli_ring *pring = &phba->sli.sli3_ring[ring_number]; in __lpfc_sli_issue_iocb_s3() local
10470 if (unlikely(pring->flag & LPFC_STOP_IOCB_EVENT)) in __lpfc_sli_issue_iocb_s3()
10500 } else if (unlikely(pring->ringno == LPFC_FCP_RING && in __lpfc_sli_issue_iocb_s3()
10505 while ((iocb = lpfc_sli_next_iocb_slot(phba, pring)) && in __lpfc_sli_issue_iocb_s3()
10506 (nextiocb = lpfc_sli_next_iocb(phba, pring, &piocb))) in __lpfc_sli_issue_iocb_s3()
10507 lpfc_sli_submit_iocb(phba, pring, iocb, nextiocb); in __lpfc_sli_issue_iocb_s3()
10510 lpfc_sli_update_ring(phba, pring); in __lpfc_sli_issue_iocb_s3()
10512 lpfc_sli_update_full_ring(phba, pring); in __lpfc_sli_issue_iocb_s3()
10520 pring->stats.iocb_cmd_delay++; in __lpfc_sli_issue_iocb_s3()
10525 __lpfc_sli_ringtx_put(phba, pring, piocb); in __lpfc_sli_issue_iocb_s3()
10660 struct lpfc_sli_ring *pring; in __lpfc_sli_issue_iocb_s4() local
10672 pring = wq->pring; in __lpfc_sli_issue_iocb_s4()
10678 lockdep_assert_held(&pring->ring_lock); in __lpfc_sli_issue_iocb_s4()
10688 pring, in __lpfc_sli_issue_iocb_s4()
10733 lpfc_sli_ringtxcmpl_put(phba, pring, piocb); in __lpfc_sli_issue_iocb_s4()
11247 return phba->sli4_hba.hdwq[piocb->hba_wqidx].io_wq->pring; in lpfc_sli4_calc_ring()
11252 return phba->sli4_hba.els_wq->pring; in lpfc_sli4_calc_ring()
11273 struct lpfc_sli_ring *pring; in lpfc_sli_issue_iocb() local
11287 pring = lpfc_sli4_calc_ring(phba, piocb); in lpfc_sli_issue_iocb()
11288 if (unlikely(pring == NULL)) in lpfc_sli_issue_iocb()
11291 spin_lock_irqsave(&pring->ring_lock, iflags); in lpfc_sli_issue_iocb()
11293 spin_unlock_irqrestore(&pring->ring_lock, iflags); in lpfc_sli_issue_iocb()
11320 struct lpfc_sli_ring *pring; in lpfc_extra_ring_setup() local
11327 pring = &psli->sli3_ring[LPFC_FCP_RING]; in lpfc_extra_ring_setup()
11328 pring->sli.sli3.numCiocb -= SLI2_IOCB_CMD_R1XTRA_ENTRIES; in lpfc_extra_ring_setup()
11329 pring->sli.sli3.numRiocb -= SLI2_IOCB_RSP_R1XTRA_ENTRIES; in lpfc_extra_ring_setup()
11330 pring->sli.sli3.numCiocb -= SLI2_IOCB_CMD_R3XTRA_ENTRIES; in lpfc_extra_ring_setup()
11331 pring->sli.sli3.numRiocb -= SLI2_IOCB_RSP_R3XTRA_ENTRIES; in lpfc_extra_ring_setup()
11334 pring = &psli->sli3_ring[LPFC_EXTRA_RING]; in lpfc_extra_ring_setup()
11336 pring->sli.sli3.numCiocb += SLI2_IOCB_CMD_R1XTRA_ENTRIES; in lpfc_extra_ring_setup()
11337 pring->sli.sli3.numRiocb += SLI2_IOCB_RSP_R1XTRA_ENTRIES; in lpfc_extra_ring_setup()
11338 pring->sli.sli3.numCiocb += SLI2_IOCB_CMD_R3XTRA_ENTRIES; in lpfc_extra_ring_setup()
11339 pring->sli.sli3.numRiocb += SLI2_IOCB_RSP_R3XTRA_ENTRIES; in lpfc_extra_ring_setup()
11342 pring->iotag_max = 4096; in lpfc_extra_ring_setup()
11343 pring->num_mask = 1; in lpfc_extra_ring_setup()
11344 pring->prt[0].profile = 0; /* Mask 0 */ in lpfc_extra_ring_setup()
11345 pring->prt[0].rctl = phba->cfg_multi_ring_rctl; in lpfc_extra_ring_setup()
11346 pring->prt[0].type = phba->cfg_multi_ring_type; in lpfc_extra_ring_setup()
11347 pring->prt[0].lpfc_sli_rcv_unsol_event = NULL; in lpfc_extra_ring_setup()
11483 struct lpfc_sli_ring * pring, struct lpfc_iocbq * iocbq) in lpfc_sli_async_event_handler() argument
11531 pring->ringno, icmd->un.asyncstat.evt_code, in lpfc_sli_async_event_handler()
11556 struct lpfc_sli_ring *pring; in lpfc_sli4_setup() local
11558 pring = phba->sli4_hba.els_wq->pring; in lpfc_sli4_setup()
11559 pring->num_mask = LPFC_MAX_RING_MASK; in lpfc_sli4_setup()
11560 pring->prt[0].profile = 0; /* Mask 0 */ in lpfc_sli4_setup()
11561 pring->prt[0].rctl = FC_RCTL_ELS_REQ; in lpfc_sli4_setup()
11562 pring->prt[0].type = FC_TYPE_ELS; in lpfc_sli4_setup()
11563 pring->prt[0].lpfc_sli_rcv_unsol_event = in lpfc_sli4_setup()
11565 pring->prt[1].profile = 0; /* Mask 1 */ in lpfc_sli4_setup()
11566 pring->prt[1].rctl = FC_RCTL_ELS_REP; in lpfc_sli4_setup()
11567 pring->prt[1].type = FC_TYPE_ELS; in lpfc_sli4_setup()
11568 pring->prt[1].lpfc_sli_rcv_unsol_event = in lpfc_sli4_setup()
11570 pring->prt[2].profile = 0; /* Mask 2 */ in lpfc_sli4_setup()
11572 pring->prt[2].rctl = FC_RCTL_DD_UNSOL_CTL; in lpfc_sli4_setup()
11574 pring->prt[2].type = FC_TYPE_CT; in lpfc_sli4_setup()
11575 pring->prt[2].lpfc_sli_rcv_unsol_event = in lpfc_sli4_setup()
11577 pring->prt[3].profile = 0; /* Mask 3 */ in lpfc_sli4_setup()
11579 pring->prt[3].rctl = FC_RCTL_DD_SOL_CTL; in lpfc_sli4_setup()
11581 pring->prt[3].type = FC_TYPE_CT; in lpfc_sli4_setup()
11582 pring->prt[3].lpfc_sli_rcv_unsol_event = in lpfc_sli4_setup()
11603 struct lpfc_sli_ring *pring; in lpfc_sli_setup() local
11613 pring = &psli->sli3_ring[i]; in lpfc_sli_setup()
11617 pring->sli.sli3.numCiocb = SLI2_IOCB_CMD_R0_ENTRIES; in lpfc_sli_setup()
11618 pring->sli.sli3.numRiocb = SLI2_IOCB_RSP_R0_ENTRIES; in lpfc_sli_setup()
11619 pring->sli.sli3.numCiocb += in lpfc_sli_setup()
11621 pring->sli.sli3.numRiocb += in lpfc_sli_setup()
11623 pring->sli.sli3.numCiocb += in lpfc_sli_setup()
11625 pring->sli.sli3.numRiocb += in lpfc_sli_setup()
11627 pring->sli.sli3.sizeCiocb = (phba->sli_rev == 3) ? in lpfc_sli_setup()
11630 pring->sli.sli3.sizeRiocb = (phba->sli_rev == 3) ? in lpfc_sli_setup()
11633 pring->iotag_ctr = 0; in lpfc_sli_setup()
11634 pring->iotag_max = in lpfc_sli_setup()
11636 pring->fast_iotag = pring->iotag_max; in lpfc_sli_setup()
11637 pring->num_mask = 0; in lpfc_sli_setup()
11641 pring->sli.sli3.numCiocb = SLI2_IOCB_CMD_R1_ENTRIES; in lpfc_sli_setup()
11642 pring->sli.sli3.numRiocb = SLI2_IOCB_RSP_R1_ENTRIES; in lpfc_sli_setup()
11643 pring->sli.sli3.sizeCiocb = (phba->sli_rev == 3) ? in lpfc_sli_setup()
11646 pring->sli.sli3.sizeRiocb = (phba->sli_rev == 3) ? in lpfc_sli_setup()
11649 pring->iotag_max = phba->cfg_hba_queue_depth; in lpfc_sli_setup()
11650 pring->num_mask = 0; in lpfc_sli_setup()
11654 pring->sli.sli3.numCiocb = SLI2_IOCB_CMD_R2_ENTRIES; in lpfc_sli_setup()
11655 pring->sli.sli3.numRiocb = SLI2_IOCB_RSP_R2_ENTRIES; in lpfc_sli_setup()
11656 pring->sli.sli3.sizeCiocb = (phba->sli_rev == 3) ? in lpfc_sli_setup()
11659 pring->sli.sli3.sizeRiocb = (phba->sli_rev == 3) ? in lpfc_sli_setup()
11662 pring->fast_iotag = 0; in lpfc_sli_setup()
11663 pring->iotag_ctr = 0; in lpfc_sli_setup()
11664 pring->iotag_max = 4096; in lpfc_sli_setup()
11665 pring->lpfc_sli_rcv_async_status = in lpfc_sli_setup()
11667 pring->num_mask = LPFC_MAX_RING_MASK; in lpfc_sli_setup()
11668 pring->prt[0].profile = 0; /* Mask 0 */ in lpfc_sli_setup()
11669 pring->prt[0].rctl = FC_RCTL_ELS_REQ; in lpfc_sli_setup()
11670 pring->prt[0].type = FC_TYPE_ELS; in lpfc_sli_setup()
11671 pring->prt[0].lpfc_sli_rcv_unsol_event = in lpfc_sli_setup()
11673 pring->prt[1].profile = 0; /* Mask 1 */ in lpfc_sli_setup()
11674 pring->prt[1].rctl = FC_RCTL_ELS_REP; in lpfc_sli_setup()
11675 pring->prt[1].type = FC_TYPE_ELS; in lpfc_sli_setup()
11676 pring->prt[1].lpfc_sli_rcv_unsol_event = in lpfc_sli_setup()
11678 pring->prt[2].profile = 0; /* Mask 2 */ in lpfc_sli_setup()
11680 pring->prt[2].rctl = FC_RCTL_DD_UNSOL_CTL; in lpfc_sli_setup()
11682 pring->prt[2].type = FC_TYPE_CT; in lpfc_sli_setup()
11683 pring->prt[2].lpfc_sli_rcv_unsol_event = in lpfc_sli_setup()
11685 pring->prt[3].profile = 0; /* Mask 3 */ in lpfc_sli_setup()
11687 pring->prt[3].rctl = FC_RCTL_DD_SOL_CTL; in lpfc_sli_setup()
11689 pring->prt[3].type = FC_TYPE_CT; in lpfc_sli_setup()
11690 pring->prt[3].lpfc_sli_rcv_unsol_event = in lpfc_sli_setup()
11694 totiocbsize += (pring->sli.sli3.numCiocb * in lpfc_sli_setup()
11695 pring->sli.sli3.sizeCiocb) + in lpfc_sli_setup()
11696 (pring->sli.sli3.numRiocb * pring->sli.sli3.sizeRiocb); in lpfc_sli_setup()
11726 struct lpfc_sli_ring *pring; in lpfc_sli4_queue_init() local
11735 pring = phba->sli4_hba.hdwq[i].io_wq->pring; in lpfc_sli4_queue_init()
11736 pring->flag = 0; in lpfc_sli4_queue_init()
11737 pring->ringno = LPFC_FCP_RING; in lpfc_sli4_queue_init()
11738 pring->txcmplq_cnt = 0; in lpfc_sli4_queue_init()
11739 INIT_LIST_HEAD(&pring->txq); in lpfc_sli4_queue_init()
11740 INIT_LIST_HEAD(&pring->txcmplq); in lpfc_sli4_queue_init()
11741 INIT_LIST_HEAD(&pring->iocb_continueq); in lpfc_sli4_queue_init()
11742 spin_lock_init(&pring->ring_lock); in lpfc_sli4_queue_init()
11744 pring = phba->sli4_hba.els_wq->pring; in lpfc_sli4_queue_init()
11745 pring->flag = 0; in lpfc_sli4_queue_init()
11746 pring->ringno = LPFC_ELS_RING; in lpfc_sli4_queue_init()
11747 pring->txcmplq_cnt = 0; in lpfc_sli4_queue_init()
11748 INIT_LIST_HEAD(&pring->txq); in lpfc_sli4_queue_init()
11749 INIT_LIST_HEAD(&pring->txcmplq); in lpfc_sli4_queue_init()
11750 INIT_LIST_HEAD(&pring->iocb_continueq); in lpfc_sli4_queue_init()
11751 spin_lock_init(&pring->ring_lock); in lpfc_sli4_queue_init()
11754 pring = phba->sli4_hba.nvmels_wq->pring; in lpfc_sli4_queue_init()
11755 pring->flag = 0; in lpfc_sli4_queue_init()
11756 pring->ringno = LPFC_ELS_RING; in lpfc_sli4_queue_init()
11757 pring->txcmplq_cnt = 0; in lpfc_sli4_queue_init()
11758 INIT_LIST_HEAD(&pring->txq); in lpfc_sli4_queue_init()
11759 INIT_LIST_HEAD(&pring->txcmplq); in lpfc_sli4_queue_init()
11760 INIT_LIST_HEAD(&pring->iocb_continueq); in lpfc_sli4_queue_init()
11761 spin_lock_init(&pring->ring_lock); in lpfc_sli4_queue_init()
11782 struct lpfc_sli_ring *pring; in lpfc_sli_queue_init() local
11791 pring = &psli->sli3_ring[i]; in lpfc_sli_queue_init()
11792 pring->ringno = i; in lpfc_sli_queue_init()
11793 pring->sli.sli3.next_cmdidx = 0; in lpfc_sli_queue_init()
11794 pring->sli.sli3.local_getidx = 0; in lpfc_sli_queue_init()
11795 pring->sli.sli3.cmdidx = 0; in lpfc_sli_queue_init()
11796 INIT_LIST_HEAD(&pring->iocb_continueq); in lpfc_sli_queue_init()
11797 INIT_LIST_HEAD(&pring->iocb_continue_saveq); in lpfc_sli_queue_init()
11798 INIT_LIST_HEAD(&pring->postbufq); in lpfc_sli_queue_init()
11799 pring->flag = 0; in lpfc_sli_queue_init()
11800 INIT_LIST_HEAD(&pring->txq); in lpfc_sli_queue_init()
11801 INIT_LIST_HEAD(&pring->txcmplq); in lpfc_sli_queue_init()
11802 spin_lock_init(&pring->ring_lock); in lpfc_sli_queue_init()
11884 struct lpfc_sli_ring *pring; in lpfc_sli_host_down() local
11901 pring = &psli->sli3_ring[i]; in lpfc_sli_host_down()
11902 prev_pring_flag = pring->flag; in lpfc_sli_host_down()
11904 if (pring->ringno == LPFC_ELS_RING) { in lpfc_sli_host_down()
11905 pring->flag |= LPFC_DEFERRED_RING_EVENT; in lpfc_sli_host_down()
11910 &pring->txq, list) { in lpfc_sli_host_down()
11916 &pring->txcmplq, list) { in lpfc_sli_host_down()
11919 lpfc_sli_issue_abort_iotag(phba, pring, iocb, in lpfc_sli_host_down()
11922 pring->flag = prev_pring_flag; in lpfc_sli_host_down()
11926 pring = qp->pring; in lpfc_sli_host_down()
11927 if (!pring) in lpfc_sli_host_down()
11929 if (pring == phba->sli4_hba.els_wq->pring) { in lpfc_sli_host_down()
11930 pring->flag |= LPFC_DEFERRED_RING_EVENT; in lpfc_sli_host_down()
11934 prev_pring_flag = pring->flag; in lpfc_sli_host_down()
11935 spin_lock(&pring->ring_lock); in lpfc_sli_host_down()
11937 &pring->txq, list) { in lpfc_sli_host_down()
11942 spin_unlock(&pring->ring_lock); in lpfc_sli_host_down()
11944 &pring->txcmplq, list) { in lpfc_sli_host_down()
11947 lpfc_sli_issue_abort_iotag(phba, pring, iocb, in lpfc_sli_host_down()
11950 pring->flag = prev_pring_flag; in lpfc_sli_host_down()
11985 struct lpfc_sli_ring *pring; in lpfc_sli_hba_down() local
12008 pring = &psli->sli3_ring[i]; in lpfc_sli_hba_down()
12010 if (pring->ringno == LPFC_ELS_RING) { in lpfc_sli_hba_down()
12011 pring->flag |= LPFC_DEFERRED_RING_EVENT; in lpfc_sli_hba_down()
12015 list_splice_init(&pring->txq, &completions); in lpfc_sli_hba_down()
12019 pring = qp->pring; in lpfc_sli_hba_down()
12020 if (!pring) in lpfc_sli_hba_down()
12022 spin_lock(&pring->ring_lock); in lpfc_sli_hba_down()
12023 list_splice_init(&pring->txq, &completions); in lpfc_sli_hba_down()
12024 spin_unlock(&pring->ring_lock); in lpfc_sli_hba_down()
12025 if (pring == phba->sli4_hba.els_wq->pring) { in lpfc_sli_hba_down()
12026 pring->flag |= LPFC_DEFERRED_RING_EVENT; in lpfc_sli_hba_down()
12132 lpfc_sli_ringpostbuf_put(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, in lpfc_sli_ringpostbuf_put() argument
12138 list_add_tail(&mp->list, &pring->postbufq); in lpfc_sli_ringpostbuf_put()
12139 pring->postbufq_cnt++; in lpfc_sli_ringpostbuf_put()
12185 lpfc_sli_ring_taggedbuf_get(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, in lpfc_sli_ring_taggedbuf_get() argument
12189 struct list_head *slp = &pring->postbufq; in lpfc_sli_ring_taggedbuf_get()
12193 list_for_each_entry_safe(mp, next_mp, &pring->postbufq, list) { in lpfc_sli_ring_taggedbuf_get()
12196 pring->postbufq_cnt--; in lpfc_sli_ring_taggedbuf_get()
12206 pring->ringno, (unsigned long) tag, in lpfc_sli_ring_taggedbuf_get()
12207 slp->next, slp->prev, pring->postbufq_cnt); in lpfc_sli_ring_taggedbuf_get()
12229 lpfc_sli_ringpostbuf_get(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, in lpfc_sli_ringpostbuf_get() argument
12233 struct list_head *slp = &pring->postbufq; in lpfc_sli_ringpostbuf_get()
12237 list_for_each_entry_safe(mp, next_mp, &pring->postbufq, list) { in lpfc_sli_ringpostbuf_get()
12240 pring->postbufq_cnt--; in lpfc_sli_ringpostbuf_get()
12250 pring->ringno, (unsigned long long)phys, in lpfc_sli_ringpostbuf_get()
12251 slp->next, slp->prev, pring->postbufq_cnt); in lpfc_sli_ringpostbuf_get()
12378 lpfc_sli_issue_abort_iotag(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, in lpfc_sli_issue_abort_iotag() argument
12401 if (!pring) { in lpfc_sli_issue_abort_iotag()
12414 pring->ringno == LPFC_ELS_RING) { in lpfc_sli_issue_abort_iotag()
12437 if (pring->ringno == LPFC_ELS_RING) { in lpfc_sli_issue_abort_iotag()
12474 pring = lpfc_sli4_calc_ring(phba, abtsiocbp); in lpfc_sli_issue_abort_iotag()
12475 if (unlikely(pring == NULL)) in lpfc_sli_issue_abort_iotag()
12478 spin_lock_irqsave(&pring->ring_lock, iflags); in lpfc_sli_issue_abort_iotag()
12479 retval = __lpfc_sli_issue_iocb(phba, pring->ringno, in lpfc_sli_issue_abort_iotag()
12481 spin_unlock_irqrestore(&pring->ring_lock, iflags); in lpfc_sli_issue_abort_iotag()
12483 retval = __lpfc_sli_issue_iocb(phba, pring->ringno, in lpfc_sli_issue_abort_iotag()
12519 struct lpfc_sli_ring *pring; in lpfc_sli_hba_iocb_abort() local
12525 pring = &psli->sli3_ring[i]; in lpfc_sli_hba_iocb_abort()
12526 lpfc_sli_abort_iocb_ring(phba, pring); in lpfc_sli_hba_iocb_abort()
12531 pring = qp->pring; in lpfc_sli_hba_iocb_abort()
12532 if (!pring) in lpfc_sli_hba_iocb_abort()
12534 lpfc_sli_abort_iocb_ring(phba, pring); in lpfc_sli_hba_iocb_abort()
12753 struct lpfc_sli_ring *pring = NULL; in lpfc_sli_abort_iocb() local
12775 pring = &phba->sli.sli3_ring[LPFC_FCP_RING]; in lpfc_sli_abort_iocb()
12777 pring = lpfc_sli4_calc_ring(phba, iocbq); in lpfc_sli_abort_iocb()
12779 ret_val = lpfc_sli_issue_abort_iotag(phba, pring, iocbq, in lpfc_sli_abort_iocb()
12816 lpfc_sli_abort_taskmgmt(struct lpfc_vport *vport, struct lpfc_sli_ring *pring, in lpfc_sli_abort_taskmgmt() argument
12860 phba->sli4_hba.hdwq[iocbq->hba_wqidx].io_wq->pring; in lpfc_sli_abort_taskmgmt()
12896 if (pring->ringno == LPFC_ELS_RING) { in lpfc_sli_abort_taskmgmt()
12940 ret_val = __lpfc_sli_issue_iocb(phba, pring->ringno, in lpfc_sli_abort_taskmgmt()
13101 struct lpfc_sli_ring *pring; in lpfc_sli_issue_iocb_wait() local
13108 pring = lpfc_sli4_calc_ring(phba, piocb); in lpfc_sli_issue_iocb_wait()
13110 pring = &phba->sli.sli3_ring[ring_number]; in lpfc_sli_issue_iocb_wait()
13175 list_for_each_entry(iocb, &pring->txq, list) { in lpfc_sli_issue_iocb_wait()
13178 list_for_each_entry(iocb, &pring->txcmplq, list) { in lpfc_sli_issue_iocb_wait()
13927 struct lpfc_sli_ring *pring; in lpfc_sli_fp_intr_handler() local
13972 pring = &phba->sli.sli3_ring[LPFC_FCP_RING]; in lpfc_sli_fp_intr_handler()
13974 lpfc_sli_handle_fast_ring_event(phba, pring, status); in lpfc_sli_fp_intr_handler()
14160 struct lpfc_sli_ring *pring; in lpfc_sli4_els_preprocess_rspiocbq() local
14165 pring = lpfc_phba_elsring(phba); in lpfc_sli4_els_preprocess_rspiocbq()
14166 if (unlikely(!pring)) in lpfc_sli4_els_preprocess_rspiocbq()
14170 spin_lock_irqsave(&pring->ring_lock, iflags); in lpfc_sli4_els_preprocess_rspiocbq()
14171 pring->stats.iocb_event++; in lpfc_sli4_els_preprocess_rspiocbq()
14173 cmdiocbq = lpfc_sli_iocbq_lookup_by_tag(phba, pring, in lpfc_sli4_els_preprocess_rspiocbq()
14176 spin_unlock_irqrestore(&pring->ring_lock, iflags); in lpfc_sli4_els_preprocess_rspiocbq()
14190 lpfc_sli_ringtxcmpl_put(phba, pring, cmdiocbq); in lpfc_sli4_els_preprocess_rspiocbq()
14191 spin_unlock_irqrestore(&pring->ring_lock, iflags); in lpfc_sli4_els_preprocess_rspiocbq()
14457 struct lpfc_sli_ring *pring = cq->pring; in lpfc_sli4_sp_handle_els_wcqe() local
14475 if (!list_empty(&pring->txq)) in lpfc_sli4_sp_handle_els_wcqe()
14477 if (!list_empty(&pring->txcmplq)) in lpfc_sli4_sp_handle_els_wcqe()
14996 struct lpfc_sli_ring *pring = cq->pring; in lpfc_sli4_fp_handle_fcp_wcqe() local
15021 spin_lock_irqsave(&pring->ring_lock, iflags); in lpfc_sli4_fp_handle_fcp_wcqe()
15022 pring->stats.iocb_event++; in lpfc_sli4_fp_handle_fcp_wcqe()
15023 cmdiocbq = lpfc_sli_iocbq_lookup_by_tag(phba, pring, in lpfc_sli4_fp_handle_fcp_wcqe()
15025 spin_unlock_irqrestore(&pring->ring_lock, iflags); in lpfc_sli4_fp_handle_fcp_wcqe()
17008 wq->pring = kzalloc(sizeof(struct lpfc_sli_ring), GFP_KERNEL); in lpfc_wq_create()
17009 if (wq->pring == NULL) { in lpfc_wq_create()
17729 kfree(wq->pring); in lpfc_wq_destroy()
17730 wq->pring = NULL; in lpfc_wq_destroy()
19198 phba->sli4_hba.els_wq->pring, in lpfc_sli4_send_seq_to_ulp()
21016 struct lpfc_sli_ring *pring; in lpfc_drain_txq() local
21029 pring = wq->pring; in lpfc_drain_txq()
21034 pring = lpfc_phba_elsring(phba); in lpfc_drain_txq()
21037 if (unlikely(!pring) || list_empty(&pring->txq)) in lpfc_drain_txq()
21040 spin_lock_irqsave(&pring->ring_lock, iflags); in lpfc_drain_txq()
21041 list_for_each_entry(piocbq, &pring->txq, list) { in lpfc_drain_txq()
21045 if (txq_cnt > pring->txq_max) in lpfc_drain_txq()
21046 pring->txq_max = txq_cnt; in lpfc_drain_txq()
21048 spin_unlock_irqrestore(&pring->ring_lock, iflags); in lpfc_drain_txq()
21050 while (!list_empty(&pring->txq)) { in lpfc_drain_txq()
21051 spin_lock_irqsave(&pring->ring_lock, iflags); in lpfc_drain_txq()
21053 piocbq = lpfc_sli_ringtx_get(phba, pring); in lpfc_drain_txq()
21055 spin_unlock_irqrestore(&pring->ring_lock, iflags); in lpfc_drain_txq()
21063 ret = __lpfc_sli_issue_iocb(phba, pring->ringno, piocbq, 0); in lpfc_drain_txq()
21081 spin_unlock_irqrestore(&pring->ring_lock, iflags); in lpfc_drain_txq()
21231 struct lpfc_sli_ring *pring; in lpfc_sli4_issue_wqe() local
21237 pring = phba->sli4_hba.nvmels_wq->pring; in lpfc_sli4_issue_wqe()
21238 lpfc_qp_spin_lock_irqsave(&pring->ring_lock, iflags, in lpfc_sli4_issue_wqe()
21242 spin_unlock_irqrestore(&pring->ring_lock, iflags); in lpfc_sli4_issue_wqe()
21248 spin_unlock_irqrestore(&pring->ring_lock, iflags); in lpfc_sli4_issue_wqe()
21255 spin_unlock_irqrestore(&pring->ring_lock, iflags); in lpfc_sli4_issue_wqe()
21259 lpfc_sli_ringtxcmpl_put(phba, pring, pwqe); in lpfc_sli4_issue_wqe()
21260 spin_unlock_irqrestore(&pring->ring_lock, iflags); in lpfc_sli4_issue_wqe()
21270 pring = wq->pring; in lpfc_sli4_issue_wqe()
21274 lpfc_qp_spin_lock_irqsave(&pring->ring_lock, iflags, in lpfc_sli4_issue_wqe()
21278 spin_unlock_irqrestore(&pring->ring_lock, iflags); in lpfc_sli4_issue_wqe()
21281 lpfc_sli_ringtxcmpl_put(phba, pring, pwqe); in lpfc_sli4_issue_wqe()
21282 spin_unlock_irqrestore(&pring->ring_lock, iflags); in lpfc_sli4_issue_wqe()
21292 pring = wq->pring; in lpfc_sli4_issue_wqe()
21304 lpfc_qp_spin_lock_irqsave(&pring->ring_lock, iflags, in lpfc_sli4_issue_wqe()
21308 spin_unlock_irqrestore(&pring->ring_lock, iflags); in lpfc_sli4_issue_wqe()
21311 lpfc_sli_ringtxcmpl_put(phba, pring, pwqe); in lpfc_sli4_issue_wqe()
21312 spin_unlock_irqrestore(&pring->ring_lock, iflags); in lpfc_sli4_issue_wqe()
21431 txcmplq_cnt = qp->io_wq->pring->txcmplq_cnt; in lpfc_snapshot_mxp()
21501 txcmplq_cnt = qp->io_wq->pring->txcmplq_cnt; in lpfc_adjust_high_watermark()
21785 txcmplq_cnt = qp->io_wq->pring->txcmplq_cnt; in lpfc_release_io_buf()