Lines Matching refs:mbox
847 LPFC_MBOXQ_t *mbox; in lpfc_sli4_unreg_all_rpis() local
850 mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); in lpfc_sli4_unreg_all_rpis()
851 if (mbox) { in lpfc_sli4_unreg_all_rpis()
860 mbox); in lpfc_sli4_unreg_all_rpis()
861 mbox->u.mb.un.varUnregLogin.rsvd1 = 0x4000; in lpfc_sli4_unreg_all_rpis()
862 mbox->vport = vport; in lpfc_sli4_unreg_all_rpis()
863 mbox->mbox_cmpl = lpfc_sli_def_mbox_cmpl; in lpfc_sli4_unreg_all_rpis()
864 mbox->ctx_ndlp = NULL; in lpfc_sli4_unreg_all_rpis()
865 rc = lpfc_sli_issue_mbox(phba, mbox, MBX_NOWAIT); in lpfc_sli4_unreg_all_rpis()
867 mempool_free(mbox, phba->mbox_mem_pool); in lpfc_sli4_unreg_all_rpis()
1325 offset = (uint8_t *)phba->mbox - (uint8_t *)phba->slim2p.virt; in lpfc_config_port()
1382 &phba->mbox->us.s2.host[0]; in lpfc_config_port()
1384 offset = (uint8_t *)&phba->mbox->us.s2.host - in lpfc_config_port()
1627 MAILBOX_t *mbox = &mboxq->u.mb; in lpfc_mbox_tmo_val() local
1630 switch (mbox->mbxCommand) { in lpfc_mbox_tmo_val()
1687 lpfc_sli4_mbx_sge_set(struct lpfcMboxq *mbox, uint32_t sgentry, in lpfc_sli4_mbx_sge_set() argument
1693 &mbox->u.mqe.un.nembed_cmd; in lpfc_sli4_mbx_sge_set()
1709 lpfc_sli4_mbx_sge_get(struct lpfcMboxq *mbox, uint32_t sgentry, in lpfc_sli4_mbx_sge_get() argument
1715 &mbox->u.mqe.un.nembed_cmd; in lpfc_sli4_mbx_sge_get()
1729 lpfc_sli4_mbox_cmd_free(struct lpfc_hba *phba, struct lpfcMboxq *mbox) in lpfc_sli4_mbox_cmd_free() argument
1736 sli4_cfg = &mbox->u.mqe.un.sli4_config; in lpfc_sli4_mbox_cmd_free()
1740 mempool_free(mbox, phba->mbox_mem_pool); in lpfc_sli4_mbox_cmd_free()
1747 if (unlikely(!mbox->sge_array)) { in lpfc_sli4_mbox_cmd_free()
1748 mempool_free(mbox, phba->mbox_mem_pool); in lpfc_sli4_mbox_cmd_free()
1753 lpfc_sli4_mbx_sge_get(mbox, sgentry, &sge); in lpfc_sli4_mbox_cmd_free()
1756 mbox->sge_array->addr[sgentry], phyaddr); in lpfc_sli4_mbox_cmd_free()
1759 kfree(mbox->sge_array); in lpfc_sli4_mbox_cmd_free()
1761 mempool_free(mbox, phba->mbox_mem_pool); in lpfc_sli4_mbox_cmd_free()
1780 lpfc_sli4_config(struct lpfc_hba *phba, struct lpfcMboxq *mbox, in lpfc_sli4_config() argument
1792 memset(mbox, 0, sizeof(*mbox)); in lpfc_sli4_config()
1793 bf_set(lpfc_mqe_command, &mbox->u.mqe, MBX_SLI4_CONFIG); in lpfc_sli4_config()
1796 sli4_config = &mbox->u.mqe.un.sli4_config; in lpfc_sli4_config()
1818 mbox->sge_array = kzalloc(sizeof(struct lpfc_mbx_nembed_sge_virt), in lpfc_sli4_config()
1820 if (!mbox->sge_array) { in lpfc_sli4_config()
1838 mbox->sge_array->addr[pagen] = viraddr; in lpfc_sli4_config()
1844 lpfc_sli4_mbx_sge_set(mbox, pagen, phyaddr, in lpfc_sli4_config()
1848 lpfc_sli4_mbx_sge_set(mbox, pagen, phyaddr, in lpfc_sli4_config()
1888 lpfc_sli4_mbox_rsrc_extent(struct lpfc_hba *phba, struct lpfcMboxq *mbox, in lpfc_sli4_mbox_rsrc_extent() argument
1898 virtaddr = mbox->sge_array->addr[0]; in lpfc_sli4_mbox_rsrc_extent()
1910 &mbox->u.mqe.un.alloc_rsrc_extents.u.req, in lpfc_sli4_mbox_rsrc_extent()
1922 opcode = lpfc_sli_config_mbox_opcode_get(phba, mbox); in lpfc_sli4_mbox_rsrc_extent()
1927 &mbox->u.mqe.un.alloc_rsrc_extents.u.req, in lpfc_sli4_mbox_rsrc_extent()
1959 lpfc_sli_config_mbox_subsys_get(struct lpfc_hba *phba, LPFC_MBOXQ_t *mbox) in lpfc_sli_config_mbox_subsys_get() argument
1964 if (mbox->u.mb.mbxCommand != MBX_SLI4_CONFIG) in lpfc_sli_config_mbox_subsys_get()
1966 sli4_cfg = &mbox->u.mqe.un.sli4_config; in lpfc_sli_config_mbox_subsys_get()
1970 cfg_shdr = &mbox->u.mqe.un.sli4_config.header.cfg_shdr; in lpfc_sli_config_mbox_subsys_get()
1975 if (unlikely(!mbox->sge_array)) in lpfc_sli_config_mbox_subsys_get()
1977 cfg_shdr = (union lpfc_sli4_cfg_shdr *)mbox->sge_array->addr[0]; in lpfc_sli_config_mbox_subsys_get()
1992 lpfc_sli_config_mbox_opcode_get(struct lpfc_hba *phba, LPFC_MBOXQ_t *mbox) in lpfc_sli_config_mbox_opcode_get() argument
1997 if (mbox->u.mb.mbxCommand != MBX_SLI4_CONFIG) in lpfc_sli_config_mbox_opcode_get()
1999 sli4_cfg = &mbox->u.mqe.un.sli4_config; in lpfc_sli_config_mbox_opcode_get()
2003 cfg_shdr = &mbox->u.mqe.un.sli4_config.header.cfg_shdr; in lpfc_sli_config_mbox_opcode_get()
2008 if (unlikely(!mbox->sge_array)) in lpfc_sli_config_mbox_opcode_get()
2010 cfg_shdr = (union lpfc_sli4_cfg_shdr *)mbox->sge_array->addr[0]; in lpfc_sli_config_mbox_opcode_get()
2126 lpfc_init_vfi(struct lpfcMboxq *mbox, struct lpfc_vport *vport) in lpfc_init_vfi() argument
2130 memset(mbox, 0, sizeof(*mbox)); in lpfc_init_vfi()
2131 mbox->vport = vport; in lpfc_init_vfi()
2132 init_vfi = &mbox->u.mqe.un.init_vfi; in lpfc_init_vfi()
2133 bf_set(lpfc_mqe_command, &mbox->u.mqe, MBX_INIT_VFI); in lpfc_init_vfi()
2157 lpfc_reg_vfi(struct lpfcMboxq *mbox, struct lpfc_vport *vport, dma_addr_t phys) in lpfc_reg_vfi() argument
2163 memset(mbox, 0, sizeof(*mbox)); in lpfc_reg_vfi()
2164 reg_vfi = &mbox->u.mqe.un.reg_vfi; in lpfc_reg_vfi()
2165 bf_set(lpfc_mqe_command, &mbox->u.mqe, MBX_REG_VFI); in lpfc_reg_vfi()
2237 lpfc_init_vpi(struct lpfc_hba *phba, struct lpfcMboxq *mbox, uint16_t vpi) in lpfc_init_vpi() argument
2239 memset(mbox, 0, sizeof(*mbox)); in lpfc_init_vpi()
2240 bf_set(lpfc_mqe_command, &mbox->u.mqe, MBX_INIT_VPI); in lpfc_init_vpi()
2241 bf_set(lpfc_init_vpi_vpi, &mbox->u.mqe.un.init_vpi, in lpfc_init_vpi()
2243 bf_set(lpfc_init_vpi_vfi, &mbox->u.mqe.un.init_vpi, in lpfc_init_vpi()
2259 lpfc_unreg_vfi(struct lpfcMboxq *mbox, struct lpfc_vport *vport) in lpfc_unreg_vfi() argument
2261 memset(mbox, 0, sizeof(*mbox)); in lpfc_unreg_vfi()
2262 bf_set(lpfc_mqe_command, &mbox->u.mqe, MBX_UNREG_VFI); in lpfc_unreg_vfi()
2263 bf_set(lpfc_unreg_vfi_vfi, &mbox->u.mqe.un.unreg_vfi, in lpfc_unreg_vfi()
2276 lpfc_sli4_dump_cfg_rg23(struct lpfc_hba *phba, struct lpfcMboxq *mbox) in lpfc_sli4_dump_cfg_rg23() argument
2281 memset(mbox, 0, sizeof(*mbox)); in lpfc_sli4_dump_cfg_rg23()
2282 mb = &mbox->u.mb; in lpfc_sli4_dump_cfg_rg23()
2301 mbox->ctx_buf = (uint8_t *)mp; in lpfc_sli4_dump_cfg_rg23()
2334 lpfc_mbx_cmpl_rdp_page_a2(struct lpfc_hba *phba, LPFC_MBOXQ_t *mbox) in lpfc_mbx_cmpl_rdp_page_a2() argument
2336 struct lpfc_dmabuf *mp = (struct lpfc_dmabuf *)mbox->ctx_buf; in lpfc_mbx_cmpl_rdp_page_a2()
2338 (struct lpfc_rdp_context *)(mbox->ctx_ndlp); in lpfc_mbx_cmpl_rdp_page_a2()
2340 if (bf_get(lpfc_mqe_status, &mbox->u.mqe)) in lpfc_mbx_cmpl_rdp_page_a2()
2350 memset(mbox, 0, sizeof(*mbox)); in lpfc_mbx_cmpl_rdp_page_a2()
2351 lpfc_read_lnk_stat(phba, mbox); in lpfc_mbx_cmpl_rdp_page_a2()
2352 mbox->vport = rdp_context->ndlp->vport; in lpfc_mbx_cmpl_rdp_page_a2()
2353 mbox->mbox_cmpl = lpfc_mbx_cmpl_rdp_link_stat; in lpfc_mbx_cmpl_rdp_page_a2()
2354 mbox->ctx_ndlp = (struct lpfc_rdp_context *)rdp_context; in lpfc_mbx_cmpl_rdp_page_a2()
2355 if (lpfc_sli_issue_mbox(phba, mbox, MBX_NOWAIT) == MBX_NOT_FINISHED) in lpfc_mbx_cmpl_rdp_page_a2()
2364 lpfc_sli4_mbox_cmd_free(phba, mbox); in lpfc_mbx_cmpl_rdp_page_a2()
2369 lpfc_mbx_cmpl_rdp_page_a0(struct lpfc_hba *phba, LPFC_MBOXQ_t *mbox) in lpfc_mbx_cmpl_rdp_page_a0() argument
2372 struct lpfc_dmabuf *mp = (struct lpfc_dmabuf *)(mbox->ctx_buf); in lpfc_mbx_cmpl_rdp_page_a0()
2374 (struct lpfc_rdp_context *)(mbox->ctx_ndlp); in lpfc_mbx_cmpl_rdp_page_a0()
2376 if (bf_get(lpfc_mqe_status, &mbox->u.mqe)) in lpfc_mbx_cmpl_rdp_page_a0()
2382 memset(mbox, 0, sizeof(*mbox)); in lpfc_mbx_cmpl_rdp_page_a0()
2388 mbox->ctx_buf = mp; in lpfc_mbx_cmpl_rdp_page_a0()
2389 mbox->vport = rdp_context->ndlp->vport; in lpfc_mbx_cmpl_rdp_page_a0()
2391 bf_set(lpfc_mqe_command, &mbox->u.mqe, MBX_DUMP_MEMORY); in lpfc_mbx_cmpl_rdp_page_a0()
2393 &mbox->u.mqe.un.mem_dump_type3, DMP_LMSD); in lpfc_mbx_cmpl_rdp_page_a0()
2395 &mbox->u.mqe.un.mem_dump_type3, phba->sli4_hba.physical_port); in lpfc_mbx_cmpl_rdp_page_a0()
2397 &mbox->u.mqe.un.mem_dump_type3, DMP_PAGE_A2); in lpfc_mbx_cmpl_rdp_page_a0()
2399 &mbox->u.mqe.un.mem_dump_type3, DMP_SFF_PAGE_A2_SIZE); in lpfc_mbx_cmpl_rdp_page_a0()
2400 mbox->u.mqe.un.mem_dump_type3.addr_lo = putPaddrLow(mp->phys); in lpfc_mbx_cmpl_rdp_page_a0()
2401 mbox->u.mqe.un.mem_dump_type3.addr_hi = putPaddrHigh(mp->phys); in lpfc_mbx_cmpl_rdp_page_a0()
2403 mbox->mbox_cmpl = lpfc_mbx_cmpl_rdp_page_a2; in lpfc_mbx_cmpl_rdp_page_a0()
2404 mbox->ctx_ndlp = (struct lpfc_rdp_context *)rdp_context; in lpfc_mbx_cmpl_rdp_page_a0()
2405 rc = lpfc_sli_issue_mbox(phba, mbox, MBX_NOWAIT); in lpfc_mbx_cmpl_rdp_page_a0()
2414 lpfc_sli4_mbox_cmd_free(phba, mbox); in lpfc_mbx_cmpl_rdp_page_a0()
2428 lpfc_sli4_dump_page_a0(struct lpfc_hba *phba, struct lpfcMboxq *mbox) in lpfc_sli4_dump_page_a0() argument
2432 memset(mbox, 0, sizeof(*mbox)); in lpfc_sli4_dump_page_a0()
2447 bf_set(lpfc_mqe_command, &mbox->u.mqe, MBX_DUMP_MEMORY); in lpfc_sli4_dump_page_a0()
2449 mbox->ctx_buf = mp; in lpfc_sli4_dump_page_a0()
2452 &mbox->u.mqe.un.mem_dump_type3, DMP_LMSD); in lpfc_sli4_dump_page_a0()
2454 &mbox->u.mqe.un.mem_dump_type3, phba->sli4_hba.physical_port); in lpfc_sli4_dump_page_a0()
2456 &mbox->u.mqe.un.mem_dump_type3, DMP_PAGE_A0); in lpfc_sli4_dump_page_a0()
2458 &mbox->u.mqe.un.mem_dump_type3, DMP_SFF_PAGE_A0_SIZE); in lpfc_sli4_dump_page_a0()
2459 mbox->u.mqe.un.mem_dump_type3.addr_lo = putPaddrLow(mp->phys); in lpfc_sli4_dump_page_a0()
2460 mbox->u.mqe.un.mem_dump_type3.addr_hi = putPaddrHigh(mp->phys); in lpfc_sli4_dump_page_a0()
2479 lpfc_reg_fcfi(struct lpfc_hba *phba, struct lpfcMboxq *mbox) in lpfc_reg_fcfi() argument
2483 memset(mbox, 0, sizeof(*mbox)); in lpfc_reg_fcfi()
2484 reg_fcfi = &mbox->u.mqe.un.reg_fcfi; in lpfc_reg_fcfi()
2485 bf_set(lpfc_mqe_command, &mbox->u.mqe, MBX_REG_FCFI); in lpfc_reg_fcfi()
2547 lpfc_reg_fcfi_mrq(struct lpfc_hba *phba, struct lpfcMboxq *mbox, int mode) in lpfc_reg_fcfi_mrq() argument
2555 memset(mbox, 0, sizeof(*mbox)); in lpfc_reg_fcfi_mrq()
2556 reg_fcfi = &mbox->u.mqe.un.reg_fcfi_mrq; in lpfc_reg_fcfi_mrq()
2557 bf_set(lpfc_mqe_command, &mbox->u.mqe, MBX_REG_FCFI_MRQ); in lpfc_reg_fcfi_mrq()
2605 lpfc_unreg_fcfi(struct lpfcMboxq *mbox, uint16_t fcfi) in lpfc_unreg_fcfi() argument
2607 memset(mbox, 0, sizeof(*mbox)); in lpfc_unreg_fcfi()
2608 bf_set(lpfc_mqe_command, &mbox->u.mqe, MBX_UNREG_FCFI); in lpfc_unreg_fcfi()
2609 bf_set(lpfc_unreg_fcfi, &mbox->u.mqe.un.unreg_fcfi, fcfi); in lpfc_unreg_fcfi()
2621 lpfc_resume_rpi(struct lpfcMboxq *mbox, struct lpfc_nodelist *ndlp) in lpfc_resume_rpi() argument
2626 memset(mbox, 0, sizeof(*mbox)); in lpfc_resume_rpi()
2627 resume_rpi = &mbox->u.mqe.un.resume_rpi; in lpfc_resume_rpi()
2628 bf_set(lpfc_mqe_command, &mbox->u.mqe, MBX_RESUME_RPI); in lpfc_resume_rpi()