Lines Matching refs:mbox
845 LPFC_MBOXQ_t *mbox; in lpfc_sli4_unreg_all_rpis() local
848 mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); in lpfc_sli4_unreg_all_rpis()
849 if (mbox) { in lpfc_sli4_unreg_all_rpis()
858 mbox); in lpfc_sli4_unreg_all_rpis()
859 mbox->u.mb.un.varUnregLogin.rsvd1 = 0x4000; in lpfc_sli4_unreg_all_rpis()
860 mbox->vport = vport; in lpfc_sli4_unreg_all_rpis()
861 mbox->mbox_cmpl = lpfc_sli_def_mbox_cmpl; in lpfc_sli4_unreg_all_rpis()
862 mbox->ctx_ndlp = NULL; in lpfc_sli4_unreg_all_rpis()
863 rc = lpfc_sli_issue_mbox(phba, mbox, MBX_NOWAIT); in lpfc_sli4_unreg_all_rpis()
865 mempool_free(mbox, phba->mbox_mem_pool); in lpfc_sli4_unreg_all_rpis()
1323 offset = (uint8_t *)phba->mbox - (uint8_t *)phba->slim2p.virt; in lpfc_config_port()
1380 &phba->mbox->us.s2.host[0]; in lpfc_config_port()
1382 offset = (uint8_t *)&phba->mbox->us.s2.host - in lpfc_config_port()
1625 MAILBOX_t *mbox = &mboxq->u.mb; in lpfc_mbox_tmo_val() local
1628 switch (mbox->mbxCommand) { in lpfc_mbox_tmo_val()
1685 lpfc_sli4_mbx_sge_set(struct lpfcMboxq *mbox, uint32_t sgentry, in lpfc_sli4_mbx_sge_set() argument
1691 &mbox->u.mqe.un.nembed_cmd; in lpfc_sli4_mbx_sge_set()
1707 lpfc_sli4_mbx_sge_get(struct lpfcMboxq *mbox, uint32_t sgentry, in lpfc_sli4_mbx_sge_get() argument
1713 &mbox->u.mqe.un.nembed_cmd; in lpfc_sli4_mbx_sge_get()
1727 lpfc_sli4_mbox_cmd_free(struct lpfc_hba *phba, struct lpfcMboxq *mbox) in lpfc_sli4_mbox_cmd_free() argument
1734 sli4_cfg = &mbox->u.mqe.un.sli4_config; in lpfc_sli4_mbox_cmd_free()
1738 mempool_free(mbox, phba->mbox_mem_pool); in lpfc_sli4_mbox_cmd_free()
1745 if (unlikely(!mbox->sge_array)) { in lpfc_sli4_mbox_cmd_free()
1746 mempool_free(mbox, phba->mbox_mem_pool); in lpfc_sli4_mbox_cmd_free()
1751 lpfc_sli4_mbx_sge_get(mbox, sgentry, &sge); in lpfc_sli4_mbox_cmd_free()
1754 mbox->sge_array->addr[sgentry], phyaddr); in lpfc_sli4_mbox_cmd_free()
1757 kfree(mbox->sge_array); in lpfc_sli4_mbox_cmd_free()
1759 mempool_free(mbox, phba->mbox_mem_pool); in lpfc_sli4_mbox_cmd_free()
1778 lpfc_sli4_config(struct lpfc_hba *phba, struct lpfcMboxq *mbox, in lpfc_sli4_config() argument
1790 memset(mbox, 0, sizeof(*mbox)); in lpfc_sli4_config()
1791 bf_set(lpfc_mqe_command, &mbox->u.mqe, MBX_SLI4_CONFIG); in lpfc_sli4_config()
1794 sli4_config = &mbox->u.mqe.un.sli4_config; in lpfc_sli4_config()
1816 mbox->sge_array = kzalloc(sizeof(struct lpfc_mbx_nembed_sge_virt), in lpfc_sli4_config()
1818 if (!mbox->sge_array) { in lpfc_sli4_config()
1836 mbox->sge_array->addr[pagen] = viraddr; in lpfc_sli4_config()
1842 lpfc_sli4_mbx_sge_set(mbox, pagen, phyaddr, in lpfc_sli4_config()
1846 lpfc_sli4_mbx_sge_set(mbox, pagen, phyaddr, in lpfc_sli4_config()
1886 lpfc_sli4_mbox_rsrc_extent(struct lpfc_hba *phba, struct lpfcMboxq *mbox, in lpfc_sli4_mbox_rsrc_extent() argument
1896 virtaddr = mbox->sge_array->addr[0]; in lpfc_sli4_mbox_rsrc_extent()
1908 &mbox->u.mqe.un.alloc_rsrc_extents.u.req, in lpfc_sli4_mbox_rsrc_extent()
1920 opcode = lpfc_sli_config_mbox_opcode_get(phba, mbox); in lpfc_sli4_mbox_rsrc_extent()
1925 &mbox->u.mqe.un.alloc_rsrc_extents.u.req, in lpfc_sli4_mbox_rsrc_extent()
1957 lpfc_sli_config_mbox_subsys_get(struct lpfc_hba *phba, LPFC_MBOXQ_t *mbox) in lpfc_sli_config_mbox_subsys_get() argument
1962 if (mbox->u.mb.mbxCommand != MBX_SLI4_CONFIG) in lpfc_sli_config_mbox_subsys_get()
1964 sli4_cfg = &mbox->u.mqe.un.sli4_config; in lpfc_sli_config_mbox_subsys_get()
1968 cfg_shdr = &mbox->u.mqe.un.sli4_config.header.cfg_shdr; in lpfc_sli_config_mbox_subsys_get()
1973 if (unlikely(!mbox->sge_array)) in lpfc_sli_config_mbox_subsys_get()
1975 cfg_shdr = (union lpfc_sli4_cfg_shdr *)mbox->sge_array->addr[0]; in lpfc_sli_config_mbox_subsys_get()
1990 lpfc_sli_config_mbox_opcode_get(struct lpfc_hba *phba, LPFC_MBOXQ_t *mbox) in lpfc_sli_config_mbox_opcode_get() argument
1995 if (mbox->u.mb.mbxCommand != MBX_SLI4_CONFIG) in lpfc_sli_config_mbox_opcode_get()
1997 sli4_cfg = &mbox->u.mqe.un.sli4_config; in lpfc_sli_config_mbox_opcode_get()
2001 cfg_shdr = &mbox->u.mqe.un.sli4_config.header.cfg_shdr; in lpfc_sli_config_mbox_opcode_get()
2006 if (unlikely(!mbox->sge_array)) in lpfc_sli_config_mbox_opcode_get()
2008 cfg_shdr = (union lpfc_sli4_cfg_shdr *)mbox->sge_array->addr[0]; in lpfc_sli_config_mbox_opcode_get()
2118 lpfc_init_vfi(struct lpfcMboxq *mbox, struct lpfc_vport *vport) in lpfc_init_vfi() argument
2122 memset(mbox, 0, sizeof(*mbox)); in lpfc_init_vfi()
2123 mbox->vport = vport; in lpfc_init_vfi()
2124 init_vfi = &mbox->u.mqe.un.init_vfi; in lpfc_init_vfi()
2125 bf_set(lpfc_mqe_command, &mbox->u.mqe, MBX_INIT_VFI); in lpfc_init_vfi()
2149 lpfc_reg_vfi(struct lpfcMboxq *mbox, struct lpfc_vport *vport, dma_addr_t phys) in lpfc_reg_vfi() argument
2155 memset(mbox, 0, sizeof(*mbox)); in lpfc_reg_vfi()
2156 reg_vfi = &mbox->u.mqe.un.reg_vfi; in lpfc_reg_vfi()
2157 bf_set(lpfc_mqe_command, &mbox->u.mqe, MBX_REG_VFI); in lpfc_reg_vfi()
2229 lpfc_init_vpi(struct lpfc_hba *phba, struct lpfcMboxq *mbox, uint16_t vpi) in lpfc_init_vpi() argument
2231 memset(mbox, 0, sizeof(*mbox)); in lpfc_init_vpi()
2232 bf_set(lpfc_mqe_command, &mbox->u.mqe, MBX_INIT_VPI); in lpfc_init_vpi()
2233 bf_set(lpfc_init_vpi_vpi, &mbox->u.mqe.un.init_vpi, in lpfc_init_vpi()
2235 bf_set(lpfc_init_vpi_vfi, &mbox->u.mqe.un.init_vpi, in lpfc_init_vpi()
2251 lpfc_unreg_vfi(struct lpfcMboxq *mbox, struct lpfc_vport *vport) in lpfc_unreg_vfi() argument
2253 memset(mbox, 0, sizeof(*mbox)); in lpfc_unreg_vfi()
2254 bf_set(lpfc_mqe_command, &mbox->u.mqe, MBX_UNREG_VFI); in lpfc_unreg_vfi()
2255 bf_set(lpfc_unreg_vfi_vfi, &mbox->u.mqe.un.unreg_vfi, in lpfc_unreg_vfi()
2268 lpfc_sli4_dump_cfg_rg23(struct lpfc_hba *phba, struct lpfcMboxq *mbox) in lpfc_sli4_dump_cfg_rg23() argument
2273 memset(mbox, 0, sizeof(*mbox)); in lpfc_sli4_dump_cfg_rg23()
2274 mb = &mbox->u.mb; in lpfc_sli4_dump_cfg_rg23()
2293 mbox->ctx_buf = (uint8_t *)mp; in lpfc_sli4_dump_cfg_rg23()
2326 lpfc_mbx_cmpl_rdp_page_a2(struct lpfc_hba *phba, LPFC_MBOXQ_t *mbox) in lpfc_mbx_cmpl_rdp_page_a2() argument
2328 struct lpfc_dmabuf *mp = (struct lpfc_dmabuf *)mbox->ctx_buf; in lpfc_mbx_cmpl_rdp_page_a2()
2330 (struct lpfc_rdp_context *)(mbox->ctx_ndlp); in lpfc_mbx_cmpl_rdp_page_a2()
2332 if (bf_get(lpfc_mqe_status, &mbox->u.mqe)) in lpfc_mbx_cmpl_rdp_page_a2()
2342 memset(mbox, 0, sizeof(*mbox)); in lpfc_mbx_cmpl_rdp_page_a2()
2343 lpfc_read_lnk_stat(phba, mbox); in lpfc_mbx_cmpl_rdp_page_a2()
2344 mbox->vport = rdp_context->ndlp->vport; in lpfc_mbx_cmpl_rdp_page_a2()
2345 mbox->mbox_cmpl = lpfc_mbx_cmpl_rdp_link_stat; in lpfc_mbx_cmpl_rdp_page_a2()
2346 mbox->ctx_ndlp = (struct lpfc_rdp_context *)rdp_context; in lpfc_mbx_cmpl_rdp_page_a2()
2347 if (lpfc_sli_issue_mbox(phba, mbox, MBX_NOWAIT) == MBX_NOT_FINISHED) in lpfc_mbx_cmpl_rdp_page_a2()
2356 lpfc_sli4_mbox_cmd_free(phba, mbox); in lpfc_mbx_cmpl_rdp_page_a2()
2361 lpfc_mbx_cmpl_rdp_page_a0(struct lpfc_hba *phba, LPFC_MBOXQ_t *mbox) in lpfc_mbx_cmpl_rdp_page_a0() argument
2364 struct lpfc_dmabuf *mp = (struct lpfc_dmabuf *)(mbox->ctx_buf); in lpfc_mbx_cmpl_rdp_page_a0()
2366 (struct lpfc_rdp_context *)(mbox->ctx_ndlp); in lpfc_mbx_cmpl_rdp_page_a0()
2368 if (bf_get(lpfc_mqe_status, &mbox->u.mqe)) in lpfc_mbx_cmpl_rdp_page_a0()
2374 memset(mbox, 0, sizeof(*mbox)); in lpfc_mbx_cmpl_rdp_page_a0()
2380 mbox->ctx_buf = mp; in lpfc_mbx_cmpl_rdp_page_a0()
2381 mbox->vport = rdp_context->ndlp->vport; in lpfc_mbx_cmpl_rdp_page_a0()
2383 bf_set(lpfc_mqe_command, &mbox->u.mqe, MBX_DUMP_MEMORY); in lpfc_mbx_cmpl_rdp_page_a0()
2385 &mbox->u.mqe.un.mem_dump_type3, DMP_LMSD); in lpfc_mbx_cmpl_rdp_page_a0()
2387 &mbox->u.mqe.un.mem_dump_type3, phba->sli4_hba.physical_port); in lpfc_mbx_cmpl_rdp_page_a0()
2389 &mbox->u.mqe.un.mem_dump_type3, DMP_PAGE_A2); in lpfc_mbx_cmpl_rdp_page_a0()
2391 &mbox->u.mqe.un.mem_dump_type3, DMP_SFF_PAGE_A2_SIZE); in lpfc_mbx_cmpl_rdp_page_a0()
2392 mbox->u.mqe.un.mem_dump_type3.addr_lo = putPaddrLow(mp->phys); in lpfc_mbx_cmpl_rdp_page_a0()
2393 mbox->u.mqe.un.mem_dump_type3.addr_hi = putPaddrHigh(mp->phys); in lpfc_mbx_cmpl_rdp_page_a0()
2395 mbox->mbox_cmpl = lpfc_mbx_cmpl_rdp_page_a2; in lpfc_mbx_cmpl_rdp_page_a0()
2396 mbox->ctx_ndlp = (struct lpfc_rdp_context *)rdp_context; in lpfc_mbx_cmpl_rdp_page_a0()
2397 rc = lpfc_sli_issue_mbox(phba, mbox, MBX_NOWAIT); in lpfc_mbx_cmpl_rdp_page_a0()
2406 lpfc_sli4_mbox_cmd_free(phba, mbox); in lpfc_mbx_cmpl_rdp_page_a0()
2420 lpfc_sli4_dump_page_a0(struct lpfc_hba *phba, struct lpfcMboxq *mbox) in lpfc_sli4_dump_page_a0() argument
2424 memset(mbox, 0, sizeof(*mbox)); in lpfc_sli4_dump_page_a0()
2439 bf_set(lpfc_mqe_command, &mbox->u.mqe, MBX_DUMP_MEMORY); in lpfc_sli4_dump_page_a0()
2441 mbox->ctx_buf = mp; in lpfc_sli4_dump_page_a0()
2444 &mbox->u.mqe.un.mem_dump_type3, DMP_LMSD); in lpfc_sli4_dump_page_a0()
2446 &mbox->u.mqe.un.mem_dump_type3, phba->sli4_hba.physical_port); in lpfc_sli4_dump_page_a0()
2448 &mbox->u.mqe.un.mem_dump_type3, DMP_PAGE_A0); in lpfc_sli4_dump_page_a0()
2450 &mbox->u.mqe.un.mem_dump_type3, DMP_SFF_PAGE_A0_SIZE); in lpfc_sli4_dump_page_a0()
2451 mbox->u.mqe.un.mem_dump_type3.addr_lo = putPaddrLow(mp->phys); in lpfc_sli4_dump_page_a0()
2452 mbox->u.mqe.un.mem_dump_type3.addr_hi = putPaddrHigh(mp->phys); in lpfc_sli4_dump_page_a0()
2471 lpfc_reg_fcfi(struct lpfc_hba *phba, struct lpfcMboxq *mbox) in lpfc_reg_fcfi() argument
2475 memset(mbox, 0, sizeof(*mbox)); in lpfc_reg_fcfi()
2476 reg_fcfi = &mbox->u.mqe.un.reg_fcfi; in lpfc_reg_fcfi()
2477 bf_set(lpfc_mqe_command, &mbox->u.mqe, MBX_REG_FCFI); in lpfc_reg_fcfi()
2539 lpfc_reg_fcfi_mrq(struct lpfc_hba *phba, struct lpfcMboxq *mbox, int mode) in lpfc_reg_fcfi_mrq() argument
2547 memset(mbox, 0, sizeof(*mbox)); in lpfc_reg_fcfi_mrq()
2548 reg_fcfi = &mbox->u.mqe.un.reg_fcfi_mrq; in lpfc_reg_fcfi_mrq()
2549 bf_set(lpfc_mqe_command, &mbox->u.mqe, MBX_REG_FCFI_MRQ); in lpfc_reg_fcfi_mrq()
2597 lpfc_unreg_fcfi(struct lpfcMboxq *mbox, uint16_t fcfi) in lpfc_unreg_fcfi() argument
2599 memset(mbox, 0, sizeof(*mbox)); in lpfc_unreg_fcfi()
2600 bf_set(lpfc_mqe_command, &mbox->u.mqe, MBX_UNREG_FCFI); in lpfc_unreg_fcfi()
2601 bf_set(lpfc_unreg_fcfi, &mbox->u.mqe.un.unreg_fcfi, fcfi); in lpfc_unreg_fcfi()
2613 lpfc_resume_rpi(struct lpfcMboxq *mbox, struct lpfc_nodelist *ndlp) in lpfc_resume_rpi() argument
2618 memset(mbox, 0, sizeof(*mbox)); in lpfc_resume_rpi()
2619 resume_rpi = &mbox->u.mqe.un.resume_rpi; in lpfc_resume_rpi()
2620 bf_set(lpfc_mqe_command, &mbox->u.mqe, MBX_RESUME_RPI); in lpfc_resume_rpi()