Lines Matching refs:elsiocb
154 struct lpfc_iocbq *elsiocb;
164 elsiocb = lpfc_sli_get_iocbq(phba);
166 if (elsiocb == NULL)
180 elsiocb->iocb_flag |= ((ELS_ID_FLOGI << LPFC_FIP_ELS_ID_SHIFT)
184 elsiocb->iocb_flag |= ((ELS_ID_FDISC << LPFC_FIP_ELS_ID_SHIFT)
188 elsiocb->iocb_flag |= ((ELS_ID_LOGO << LPFC_FIP_ELS_ID_SHIFT)
193 elsiocb->iocb_flag &= ~LPFC_FIP_ELS_ID_MASK;
195 icmd = &elsiocb->iocb;
275 elsiocb->context1 = lpfc_nlp_get(ndlp);
276 if (!elsiocb->context1)
278 elsiocb->context2 = pcmd;
279 elsiocb->context3 = pbuflist;
280 elsiocb->retry = retry;
281 elsiocb->vport = vport;
282 elsiocb->drvrTimeout = (phba->fc_ratov << 1) + LPFC_DRVR_TIMEOUT;
292 elscmd, did, elsiocb->iotag,
299 elscmd, ndlp->nlp_DID, elsiocb->iotag,
302 return elsiocb;
315 lpfc_sli_release_iocbq(phba, elsiocb);
1011 struct lpfc_iocbq *elsiocb;
1021 elsiocb = lpfc_prep_els_iocb(vport, 1, cmdsize, retry, ndlp,
1024 if (!elsiocb)
1027 icmd = &elsiocb->iocb;
1028 pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt);
1048 elsiocb->iocb.ulpCt_h = ((SLI4_CT_FCFI >> 1) & 1);
1049 elsiocb->iocb.ulpCt_l = (SLI4_CT_FCFI & 1);
1052 elsiocb->iocb.ulpContext = phba->fcf.fcfi;
1071 elsiocb->iocb_cmpl = lpfc_cmpl_els_flogi;
1077 rc = lpfc_issue_fabric_iocb(phba, elsiocb);
1079 lpfc_els_free_iocb(phba, elsiocb);
1620 struct lpfc_iocbq *elsiocb;
1634 elsiocb = lpfc_prep_els_iocb(vport, 1, cmdsize, retry, ndlp, did,
1636 if (!elsiocb)
1639 icmd = &elsiocb->iocb;
1640 pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt);
1659 elsiocb->iocb_cmpl = lpfc_cmpl_els_plogi;
1660 ret = lpfc_sli_issue_iocb(phba, LPFC_ELS_RING, elsiocb, 0);
1663 lpfc_els_free_iocb(phba, elsiocb);
1773 struct lpfc_iocbq *elsiocb;
1778 elsiocb = lpfc_prep_els_iocb(vport, 1, cmdsize, retry, ndlp,
1780 if (!elsiocb)
1783 icmd = &elsiocb->iocb;
1784 pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt);
1814 elsiocb->iocb_cmpl = lpfc_cmpl_els_prli;
1818 if (lpfc_sli_issue_iocb(phba, LPFC_ELS_RING, elsiocb, 0) ==
1823 lpfc_els_free_iocb(phba, elsiocb);
2061 struct lpfc_iocbq *elsiocb;
2066 elsiocb = lpfc_prep_els_iocb(vport, 1, cmdsize, retry, ndlp,
2068 if (!elsiocb)
2071 icmd = &elsiocb->iocb;
2072 pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt);
2090 elsiocb->iocb_cmpl = lpfc_cmpl_els_adisc;
2094 if (lpfc_sli_issue_iocb(phba, LPFC_ELS_RING, elsiocb, 0) ==
2099 lpfc_els_free_iocb(phba, elsiocb);
2213 struct lpfc_iocbq *elsiocb;
2226 elsiocb = lpfc_prep_els_iocb(vport, 1, cmdsize, retry, ndlp,
2228 if (!elsiocb)
2231 icmd = &elsiocb->iocb;
2232 pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt);
2246 elsiocb->iocb_cmpl = lpfc_cmpl_els_logo;
2250 rc = lpfc_sli_issue_iocb(phba, LPFC_ELS_RING, elsiocb, 0);
2256 lpfc_els_free_iocb(phba, elsiocb);
2329 struct lpfc_iocbq *elsiocb;
2351 elsiocb = lpfc_prep_els_iocb(vport, 1, cmdsize, retry, ndlp,
2354 if (!elsiocb) {
2362 icmd = &elsiocb->iocb;
2363 pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt);
2377 elsiocb->iocb_cmpl = lpfc_cmpl_els_cmd;
2378 if (lpfc_sli_issue_iocb(phba, LPFC_ELS_RING, elsiocb, 0) ==
2385 lpfc_els_free_iocb(phba, elsiocb);
2422 struct lpfc_iocbq *elsiocb;
2447 elsiocb = lpfc_prep_els_iocb(vport, 1, cmdsize, retry, ndlp,
2449 if (!elsiocb) {
2457 icmd = &elsiocb->iocb;
2458 pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt);
2487 elsiocb->iocb_cmpl = lpfc_cmpl_els_cmd;
2488 if (lpfc_sli_issue_iocb(phba, LPFC_ELS_RING, elsiocb, 0) ==
2495 lpfc_els_free_iocb(phba, elsiocb);
3081 * @elsiocb: pointer to lpfc els command iocb data structure.
3106 lpfc_els_free_iocb(struct lpfc_hba *phba, struct lpfc_iocbq *elsiocb)
3111 ndlp = (struct lpfc_nodelist *)elsiocb->context1;
3128 elsiocb->context1 = NULL;
3131 if (elsiocb->context2) {
3132 if (elsiocb->iocb_flag & LPFC_DELAY_MEM_FREE) {
3137 elsiocb->iocb_flag &= ~LPFC_DELAY_MEM_FREE;
3138 buf_ptr = elsiocb->context2;
3139 elsiocb->context2 = NULL;
3158 buf_ptr1 = (struct lpfc_dmabuf *) elsiocb->context2;
3163 if (elsiocb->context3) {
3164 buf_ptr = (struct lpfc_dmabuf *) elsiocb->context3;
3167 lpfc_sli_release_iocbq(phba, elsiocb);
3473 struct lpfc_iocbq *elsiocb;
3486 elsiocb = lpfc_prep_els_iocb(vport, 0, cmdsize, oldiocb->retry,
3488 if (!elsiocb) {
3495 icmd = &elsiocb->iocb;
3497 pcmd = (((struct lpfc_dmabuf *) elsiocb->context2)->virt);
3507 elsiocb = lpfc_prep_els_iocb(vport, 0, cmdsize, oldiocb->retry,
3509 if (!elsiocb)
3512 icmd = &elsiocb->iocb;
3514 pcmd = (((struct lpfc_dmabuf *) elsiocb->context2)->virt);
3517 elsiocb->context_un.mbox = mbox;
3529 elsiocb = lpfc_prep_els_iocb(vport, 0, cmdsize, oldiocb->retry,
3531 if (!elsiocb)
3534 icmd = &elsiocb->iocb;
3536 pcmd = (((struct lpfc_dmabuf *) elsiocb->context2)->virt);
3555 elsiocb->iotag, elsiocb->iocb.ulpContext,
3562 elsiocb->iocb_cmpl = lpfc_cmpl_els_logo_acc;
3564 elsiocb->iocb_cmpl = lpfc_cmpl_els_rsp;
3568 rc = lpfc_sli_issue_iocb(phba, LPFC_ELS_RING, elsiocb, 0);
3570 lpfc_els_free_iocb(phba, elsiocb);
3606 struct lpfc_iocbq *elsiocb;
3614 elsiocb = lpfc_prep_els_iocb(vport, 0, cmdsize, oldiocb->retry, ndlp,
3616 if (!elsiocb)
3619 icmd = &elsiocb->iocb;
3622 pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt);
3629 elsiocb->context_un.mbox = mbox;
3636 rejectError, elsiocb->iotag,
3637 elsiocb->iocb.ulpContext, ndlp->nlp_DID,
3644 elsiocb->iocb_cmpl = lpfc_cmpl_els_rsp;
3645 rc = lpfc_sli_issue_iocb(phba, LPFC_ELS_RING, elsiocb, 0);
3648 lpfc_els_free_iocb(phba, elsiocb);
3680 struct lpfc_iocbq *elsiocb;
3686 elsiocb = lpfc_prep_els_iocb(vport, 0, cmdsize, oldiocb->retry, ndlp,
3688 if (!elsiocb)
3691 icmd = &elsiocb->iocb;
3699 elsiocb->iotag, elsiocb->iocb.ulpContext,
3702 pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt);
3718 elsiocb->iocb_cmpl = lpfc_cmpl_els_rsp;
3719 rc = lpfc_sli_issue_iocb(phba, LPFC_ELS_RING, elsiocb, 0);
3721 lpfc_els_free_iocb(phba, elsiocb);
3755 struct lpfc_iocbq *elsiocb;
3764 elsiocb = lpfc_prep_els_iocb(vport, 0, cmdsize, oldiocb->retry, ndlp,
3766 if (!elsiocb)
3769 icmd = &elsiocb->iocb;
3776 elsiocb->iotag, elsiocb->iocb.ulpContext,
3779 pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt);
3813 elsiocb->iocb_cmpl = lpfc_cmpl_els_rsp;
3815 rc = lpfc_sli_issue_iocb(phba, LPFC_ELS_RING, elsiocb, 0);
3817 lpfc_els_free_iocb(phba, elsiocb);
3856 struct lpfc_iocbq *elsiocb;
3868 elsiocb = lpfc_prep_els_iocb(vport, 0, cmdsize, oldiocb->retry, ndlp,
3870 if (!elsiocb)
3873 icmd = &elsiocb->iocb;
3879 elsiocb->iotag, elsiocb->iocb.ulpContext);
3880 pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt);
3913 elsiocb->iocb_cmpl = lpfc_cmpl_els_rsp;
3915 elsiocb->context1 = NULL; /* Don't need ndlp for cmpl,
3918 rc = lpfc_sli_issue_iocb(phba, LPFC_ELS_RING, elsiocb, 0);
3920 lpfc_els_free_iocb(phba, elsiocb);
4761 struct lpfc_iocbq *elsiocb;
4780 elsiocb = lpfc_prep_els_iocb(phba->pport, 0, cmdsize,
4787 if (!elsiocb)
4790 icmd = &elsiocb->iocb;
4793 pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt);
4817 elsiocb->iotag, elsiocb->iocb.ulpContext,
4820 elsiocb->iocb_cmpl = lpfc_cmpl_els_rsp;
4822 if (lpfc_sli_issue_iocb(phba, LPFC_ELS_RING, elsiocb, 0) == IOCB_ERROR)
4823 lpfc_els_free_iocb(phba, elsiocb);
4930 struct lpfc_iocbq *elsiocb;
4933 elsiocb = lpfc_prep_els_iocb(vport, 0, cmdsize, oldiocb->retry, ndlp,
4936 if (!elsiocb)
4939 icmd = &elsiocb->iocb;
4943 pcmd = (((struct lpfc_dmabuf *) elsiocb->context2)->virt);
4962 elsiocb->iotag, elsiocb->iocb.ulpContext,
4965 elsiocb->iocb_cmpl = lpfc_cmpl_els_rsp;
4967 if (lpfc_sli_issue_iocb(phba, LPFC_ELS_RING, elsiocb, 0) ==
4969 lpfc_els_free_iocb(phba, elsiocb);
5604 * @elsiocb: pointer to lpfc els command iocb data structure.
5615 struct lpfc_vport *vport, struct lpfc_iocbq *elsiocb)
5622 IOCB_t *icmd = &elsiocb->iocb;
5624 if (!vport || !(elsiocb->context2))
5628 payload = ((struct lpfc_dmabuf *)elsiocb->context2)->virt;
5681 elsiocb->context1 = lpfc_nlp_get(ndlp);
5682 elsiocb->vport = vport;
5718 lpfc_disc_state_machine(vport, ndlp, elsiocb,
5728 lpfc_els_rcv_flogi(vport, elsiocb, ndlp);
5743 lpfc_disc_state_machine(vport, ndlp, elsiocb, NLP_EVT_RCV_LOGO);
5756 lpfc_disc_state_machine(vport, ndlp, elsiocb, NLP_EVT_RCV_PRLO);
5760 lpfc_els_rcv_rscn(vport, elsiocb, ndlp);
5775 lpfc_disc_state_machine(vport, ndlp, elsiocb,
5788 lpfc_disc_state_machine(vport, ndlp, elsiocb,
5797 lpfc_els_rcv_farpr(vport, elsiocb, ndlp);
5805 lpfc_els_rcv_farp(vport, elsiocb, ndlp);
5813 lpfc_els_rcv_fan(vport, elsiocb, ndlp);
5825 lpfc_disc_state_machine(vport, ndlp, elsiocb, NLP_EVT_RCV_PRLI);
5833 lpfc_els_rcv_lirr(vport, elsiocb, ndlp);
5843 lpfc_els_rcv_rps(vport, elsiocb, ndlp);
5853 lpfc_els_rcv_rpl(vport, elsiocb, ndlp);
5863 lpfc_els_rcv_rnid(vport, elsiocb, ndlp);
5873 lpfc_els_rcv_rrq(vport, elsiocb, ndlp);
5899 lpfc_els_rsp_reject(vport, stat.un.lsRjtError, elsiocb, ndlp,
5903 lpfc_nlp_put(elsiocb->context1);
5904 elsiocb->context1 = NULL;
5950 * @elsiocb: pointer to lpfc els iocb data structure.
5960 struct lpfc_iocbq *elsiocb)
5963 IOCB_t *icmd = &elsiocb->iocb;
5965 struct lpfc_dmabuf *bdeBuf1 = elsiocb->context2;
5966 struct lpfc_dmabuf *bdeBuf2 = elsiocb->context3;
5968 elsiocb->context1 = NULL;
5969 elsiocb->context2 = NULL;
5970 elsiocb->context3 = NULL;
6002 elsiocb->context2 = bdeBuf1;
6006 elsiocb->context2 = lpfc_sli_ringpostbuf_get(phba, pring,
6010 lpfc_els_unsol_buffer(phba, pring, vport, elsiocb);
6015 if (elsiocb->context2) {
6016 lpfc_in_buf_free(phba, (struct lpfc_dmabuf *)elsiocb->context2);
6017 elsiocb->context2 = NULL;
6023 elsiocb->context2 = bdeBuf2;
6024 lpfc_els_unsol_buffer(phba, pring, vport, elsiocb);
6026 if (elsiocb->context2) {
6027 lpfc_in_buf_free(phba, elsiocb->context2);
6028 elsiocb->context2 = NULL;
6498 struct lpfc_iocbq *elsiocb;
6507 elsiocb = lpfc_prep_els_iocb(vport, 1, cmdsize, retry, ndlp, did,
6509 if (!elsiocb) {
6516 icmd = &elsiocb->iocb;
6522 elsiocb->iocb.ulpCt_h = (SLI4_CT_VPI >> 1) & 1;
6523 elsiocb->iocb.ulpCt_l = SLI4_CT_VPI & 1 ;
6525 elsiocb->iocb.ulpContext = vport->vpi + phba->vpi_base;
6532 pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt);
6556 elsiocb->iocb_cmpl = lpfc_cmpl_els_fdisc;
6562 rc = lpfc_issue_fabric_iocb(phba, elsiocb);
6564 lpfc_els_free_iocb(phba, elsiocb);
6631 struct lpfc_iocbq *elsiocb;
6636 elsiocb = lpfc_prep_els_iocb(vport, 1, cmdsize, 0, ndlp, ndlp->nlp_DID,
6638 if (!elsiocb)
6641 icmd = &elsiocb->iocb;
6642 pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt);
6655 elsiocb->iocb_cmpl = lpfc_cmpl_els_npiv_logo;
6659 if (lpfc_sli_issue_iocb(phba, LPFC_ELS_RING, elsiocb, 0) ==
6664 lpfc_els_free_iocb(phba, elsiocb);