Lines Matching defs:mbox

201 	q->phba->mbox = (MAILBOX_t *)temp_mqe;
232 q->phba->mbox = NULL;
1251 * lpfc_sli_ring_map - Issue config_ring mbox for all rings
1610 * (d) IOCB processing is not blocked by the outstanding mbox command.
2115 * lpfc_sli_wake_mbox_wait - lpfc_sli_issue_mbox_wait mbox completion handler
2273 * It is a fatal error if unknown mbox command completion.
3753 volatile uint32_t mbox;
3785 mbox = 0;
3786 ((MAILBOX_t *)&mbox)->mbxCommand = MBX_KILL_BOARD;
3787 ((MAILBOX_t *)&mbox)->mbxOwner = OWN_CHIP;
3791 writel(mbox, mbox_buf);
3812 ((MAILBOX_t *)&mbox)->mbxOwner = OWN_HOST;
3817 if (resp_data != mbox)
3912 /* There is no completion for a KILL_BOARD mbox cmd. Check for an error
4552 phba->hbq_get = phba->mbox->us.s3_pgp.hbq_get;
4553 phba->port_gp = phba->mbox->us.s3_pgp.port;
4565 phba->port_gp = phba->mbox->us.s2.port;
5075 LPFC_MBOXQ_t *mbox;
5077 mbox = (LPFC_MBOXQ_t *) mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL);
5078 if (!mbox)
5084 lpfc_sli4_config(phba, mbox, LPFC_MBOX_SUBSYSTEM_COMMON,
5089 rc = lpfc_sli4_mbox_rsrc_extent(phba, mbox, 0, type,
5097 rc = lpfc_sli_issue_mbox(phba, mbox, MBX_POLL);
5099 mbox_tmo = lpfc_mbox_tmo_val(phba, mbox);
5100 rc = lpfc_sli_issue_mbox_wait(phba, mbox, mbox_tmo);
5107 rsrc_info = &mbox->u.mqe.un.rsrc_extent_info;
5131 mempool_free(mbox, phba->mbox_mem_pool);
5202 * @mbox - pointer to the caller's allocated mailbox structure.
5215 uint16_t type, bool *emb, LPFC_MBOXQ_t *mbox)
5244 alloc_len = lpfc_sli4_config(phba, mbox, LPFC_MBOX_SUBSYSTEM_COMMON,
5254 rc = lpfc_sli4_mbox_rsrc_extent(phba, mbox, extnt_cnt, type, *emb);
5259 rc = lpfc_sli_issue_mbox(phba, mbox, MBX_POLL);
5261 mbox_tmo = lpfc_mbox_tmo_val(phba, mbox);
5262 rc = lpfc_sli_issue_mbox_wait(phba, mbox, mbox_tmo);
5289 LPFC_MBOXQ_t *mbox;
5316 mbox = (LPFC_MBOXQ_t *) mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL);
5317 if (!mbox)
5320 rc = lpfc_sli4_cfg_post_extnts(phba, rsrc_cnt, type, &emb, mbox);
5333 rsrc_ext = &mbox->u.mqe.un.alloc_rsrc_extents;
5337 virtaddr = mbox->sge_array->addr[0];
5496 lpfc_sli4_mbox_cmd_free(phba, mbox);
5514 LPFC_MBOXQ_t *mbox;
5518 mbox = (LPFC_MBOXQ_t *) mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL);
5519 if (!mbox)
5529 lpfc_sli4_config(phba, mbox, LPFC_MBOX_SUBSYSTEM_COMMON,
5534 rc = lpfc_sli4_mbox_rsrc_extent(phba, mbox, 0, type,
5541 rc = lpfc_sli_issue_mbox(phba, mbox, MBX_POLL);
5543 mbox_tmo = lpfc_mbox_tmo_val(phba, mbox);
5544 rc = lpfc_sli_issue_mbox_wait(phba, mbox, mbox_tmo);
5551 dealloc_rsrc = &mbox->u.mqe.un.dealloc_rsrc_extents;
5614 mempool_free(mbox, phba->mbox_mem_pool);
5914 LPFC_MBOXQ_t *mbox;
5972 mbox = (LPFC_MBOXQ_t *) mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL);
5973 if (!mbox)
5975 memset(mbox, 0, sizeof(LPFC_MBOXQ_t));
5977 alloc_len = lpfc_sli4_config(phba, mbox, LPFC_MBOX_SUBSYSTEM_COMMON,
5988 rc = lpfc_sli4_mbox_rsrc_extent(phba, mbox, curr_blks, type, emb);
5995 rc = lpfc_sli_issue_mbox(phba, mbox, MBX_POLL);
5997 mbox_tmo = lpfc_mbox_tmo_val(phba, mbox);
5998 rc = lpfc_sli_issue_mbox_wait(phba, mbox, mbox_tmo);
6013 rsrc_ext = &mbox->u.mqe.un.alloc_rsrc_extents;
6017 virtaddr = mbox->sge_array->addr[0];
6034 lpfc_sli4_mbox_cmd_free(phba, mbox);
6090 /* enough sgls for non-embed sgl mbox command */
6592 "DOWN_LINK mbox cmd, rc:x%x\n", rc);
6618 * lpfc_mbox_timeout - Timeout call back function for mbox timer
6687 * lpfc_sli4_process_missed_mbox_completions - process mbox completions
6691 * For sli4, it is possible to miss an interrupt. As such mbox completions
6693 * checks to see if mbox completions are on the mailbox completion queue
6725 /* Check to see if a mbox completion is pending */
6730 * If a mbox completion is pending, process all the events on EQ
6731 * associated with the mbox completion queue (this could include
6773 * between the mbox timeout handler getting executed in the
6861 /* processing mbox queue from intr_handler */
6887 /* If the PCI channel is in offline state, do not post mbox. */
6930 /* Polling for a mbox command when another one is already active
6932 * SLI2 mode to queue and process multiple mbox commands.
7011 /* timeout active mbox command */
7049 /* Populate mbox extension offset word. */
7053 - (uint8_t *)phba->mbox;
7063 lpfc_sli_pcimem_bcopy(mbx, phba->mbox, MAILBOX_CMD_SIZE);
7065 /* Populate mbox extension offset word. */
7078 /* copy command data into host mbox for cmpl */
7079 lpfc_sli_pcimem_bcopy(mbx, phba->mbox, MAILBOX_CMD_SIZE);
7082 /* First copy mbox command data to HBA SLIM, skip past first
7120 /* First read mbox status word */
7121 word0 = *((uint32_t *)phba->mbox);
7124 /* First read mbox status word */
7152 /* Check if we took a mbox interrupt while we were
7167 word0 = *((uint32_t *)phba->mbox);
7196 lpfc_sli_pcimem_bcopy(phba->mbox, mbx, MAILBOX_CMD_SIZE);
7408 /* wait for bootstrap mbox register for readyness */
7427 /* wait for bootstrap mbox register for hi-address write done */
7435 /* wait for bootstrap mbox register for low address write done */
7563 /* Successfully blocked, now issue sync mbox cmd */
7685 /* Prepare the mbox command to be posted */
7767 * lpfc_mbox_api_table_setup - Set up mbox api function jump table
7771 * This routine sets up the mbox interface API function jump table in @phba
9259 /* Flush all the mailbox commands in the mbox system */
9419 /* Return any active mbox cmds */
10876 MAILBOX_t *mbox, *pmbox;
11029 mbox = phba->mbox;
11033 lpfc_sli_pcimem_bcopy(mbox, pmbox, sizeof(uint32_t));
11056 lpfc_sli_pcimem_bcopy(mbox, pmbox,
11084 * same mbox buffer.
11626 MAILBOX_t *mbox, *pmbox;
11640 /* Get the reference to the active mbox command */
11652 mbox = phba->mbox;
11659 /* Move mbox data to caller's mailbox region, do endian swapping */
11660 if (pmb->mbox_cmpl && mbox)
11661 lpfc_sli_pcimem_bcopy(mbox, mqe, sizeof(struct lpfc_mqe));
11665 * the mbox so that the error will not be missed.
11683 * RID of the PPI using the same mbox buffer.
12848 LPFC_MBOXQ_t *mbox;
12860 mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL);
12861 if (!mbox)
12865 lpfc_sli4_config(phba, mbox, LPFC_MBOX_SUBSYSTEM_COMMON,
12868 eq_delay = &mbox->u.mqe.un.eq_delay;
12892 mbox->vport = phba->pport;
12893 mbox->mbox_cmpl = lpfc_sli_def_mbox_cmpl;
12894 mbox->context1 = NULL;
12895 rc = lpfc_sli_issue_mbox(phba, mbox, MBX_POLL);
12906 mempool_free(mbox, phba->mbox_mem_pool);
12934 LPFC_MBOXQ_t *mbox;
12948 mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL);
12949 if (!mbox)
12953 lpfc_sli4_config(phba, mbox, LPFC_MBOX_SUBSYSTEM_COMMON,
12956 eq_create = &mbox->u.mqe.un.eq_create;
13005 mbox->vport = phba->pport;
13006 mbox->mbox_cmpl = lpfc_sli_def_mbox_cmpl;
13007 mbox->context1 = NULL;
13008 rc = lpfc_sli_issue_mbox(phba, mbox, MBX_POLL);
13027 mempool_free(mbox, phba->mbox_mem_pool);
13058 LPFC_MBOXQ_t *mbox;
13070 mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL);
13071 if (!mbox)
13075 lpfc_sli4_config(phba, mbox, LPFC_MBOX_SUBSYSTEM_COMMON,
13078 cq_create = &mbox->u.mqe.un.cq_create;
13125 rc = lpfc_sli_issue_mbox(phba, mbox, MBX_POLL);
13154 mempool_free(mbox, phba->mbox_mem_pool);
13162 * @mbox: An allocated pointer to type LPFC_MBOXQ_t
13174 LPFC_MBOXQ_t *mbox, struct lpfc_queue *cq)
13182 lpfc_sli4_config(phba, mbox, LPFC_MBOX_SUBSYSTEM_COMMON,
13185 mq_create = &mbox->u.mqe.un.mq_create;
13245 LPFC_MBOXQ_t *mbox;
13257 mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL);
13258 if (!mbox)
13262 lpfc_sli4_config(phba, mbox, LPFC_MBOX_SUBSYSTEM_COMMON,
13266 mq_create_ext = &mbox->u.mqe.un.mq_create_ext;
13327 rc = lpfc_sli_issue_mbox(phba, mbox, MBX_POLL);
13335 lpfc_mq_create_fb_init(phba, mq, mbox, cq);
13336 mq_create = &mbox->u.mqe.un.mq_create;
13337 rc = lpfc_sli_issue_mbox(phba, mbox, MBX_POLL);
13367 mempool_free(mbox, phba->mbox_mem_pool);
13399 LPFC_MBOXQ_t *mbox;
13415 mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL);
13416 if (!mbox)
13420 lpfc_sli4_config(phba, mbox, LPFC_MBOX_SUBSYSTEM_FCOE,
13423 wq_create = &mbox->u.mqe.un.wq_create;
13505 rc = lpfc_sli_issue_mbox(phba, mbox, MBX_POLL);
13574 mempool_free(mbox, phba->mbox_mem_pool);
13635 LPFC_MBOXQ_t *mbox;
13652 mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL);
13653 if (!mbox)
13657 lpfc_sli4_config(phba, mbox, LPFC_MBOX_SUBSYSTEM_FCOE,
13660 rq_create = &mbox->u.mqe.un.rq_create;
13724 rc = lpfc_sli_issue_mbox(phba, mbox, MBX_POLL);
13793 lpfc_sli4_config(phba, mbox, LPFC_MBOX_SUBSYSTEM_FCOE,
13853 rc = lpfc_sli_issue_mbox(phba, mbox, MBX_POLL);
13878 mempool_free(mbox, phba->mbox_mem_pool);
13897 LPFC_MBOXQ_t *mbox;
13905 mbox = mempool_alloc(eq->phba->mbox_mem_pool, GFP_KERNEL);
13906 if (!mbox)
13910 lpfc_sli4_config(phba, mbox, LPFC_MBOX_SUBSYSTEM_COMMON,
13913 bf_set(lpfc_mbx_eq_destroy_q_id, &mbox->u.mqe.un.eq_destroy.u.request,
13915 mbox->vport = eq->phba->pport;
13916 mbox->mbox_cmpl = lpfc_sli_def_mbox_cmpl;
13918 rc = lpfc_sli_issue_mbox(eq->phba, mbox, MBX_POLL);
13921 &mbox->u.mqe.un.eq_destroy.header.cfg_shdr;
13934 mempool_free(mbox, eq->phba->mbox_mem_pool);
13953 LPFC_MBOXQ_t *mbox;
13961 mbox = mempool_alloc(cq->phba->mbox_mem_pool, GFP_KERNEL);
13962 if (!mbox)
13966 lpfc_sli4_config(phba, mbox, LPFC_MBOX_SUBSYSTEM_COMMON,
13969 bf_set(lpfc_mbx_cq_destroy_q_id, &mbox->u.mqe.un.cq_destroy.u.request,
13971 mbox->vport = cq->phba->pport;
13972 mbox->mbox_cmpl = lpfc_sli_def_mbox_cmpl;
13973 rc = lpfc_sli_issue_mbox(cq->phba, mbox, MBX_POLL);
13976 &mbox->u.mqe.un.wq_create.header.cfg_shdr;
13988 mempool_free(mbox, cq->phba->mbox_mem_pool);
14007 LPFC_MBOXQ_t *mbox;
14015 mbox = mempool_alloc(mq->phba->mbox_mem_pool, GFP_KERNEL);
14016 if (!mbox)
14020 lpfc_sli4_config(phba, mbox, LPFC_MBOX_SUBSYSTEM_COMMON,
14023 bf_set(lpfc_mbx_mq_destroy_q_id, &mbox->u.mqe.un.mq_destroy.u.request,
14025 mbox->vport = mq->phba->pport;
14026 mbox->mbox_cmpl = lpfc_sli_def_mbox_cmpl;
14027 rc = lpfc_sli_issue_mbox(mq->phba, mbox, MBX_POLL);
14030 &mbox->u.mqe.un.mq_destroy.header.cfg_shdr;
14042 mempool_free(mbox, mq->phba->mbox_mem_pool);
14061 LPFC_MBOXQ_t *mbox;
14069 mbox = mempool_alloc(wq->phba->mbox_mem_pool, GFP_KERNEL);
14070 if (!mbox)
14074 lpfc_sli4_config(phba, mbox, LPFC_MBOX_SUBSYSTEM_FCOE,
14077 bf_set(lpfc_mbx_wq_destroy_q_id, &mbox->u.mqe.un.wq_destroy.u.request,
14079 mbox->vport = wq->phba->pport;
14080 mbox->mbox_cmpl = lpfc_sli_def_mbox_cmpl;
14081 rc = lpfc_sli_issue_mbox(wq->phba, mbox, MBX_POLL);
14083 &mbox->u.mqe.un.wq_destroy.header.cfg_shdr;
14095 mempool_free(mbox, wq->phba->mbox_mem_pool);
14115 LPFC_MBOXQ_t *mbox;
14123 mbox = mempool_alloc(hrq->phba->mbox_mem_pool, GFP_KERNEL);
14124 if (!mbox)
14128 lpfc_sli4_config(phba, mbox, LPFC_MBOX_SUBSYSTEM_FCOE,
14131 bf_set(lpfc_mbx_rq_destroy_q_id, &mbox->u.mqe.un.rq_destroy.u.request,
14133 mbox->vport = hrq->phba->pport;
14134 mbox->mbox_cmpl = lpfc_sli_def_mbox_cmpl;
14135 rc = lpfc_sli_issue_mbox(hrq->phba, mbox, MBX_POLL);
14138 &mbox->u.mqe.un.rq_destroy.header.cfg_shdr;
14147 mempool_free(mbox, hrq->phba->mbox_mem_pool);
14150 bf_set(lpfc_mbx_rq_destroy_q_id, &mbox->u.mqe.un.rq_destroy.u.request,
14152 rc = lpfc_sli_issue_mbox(drq->phba, mbox, MBX_POLL);
14154 &mbox->u.mqe.un.rq_destroy.header.cfg_shdr;
14166 mempool_free(mbox, hrq->phba->mbox_mem_pool);
14199 LPFC_MBOXQ_t *mbox;
14211 mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL);
14212 if (!mbox)
14215 lpfc_sli4_config(phba, mbox, LPFC_MBOX_SUBSYSTEM_FCOE,
14221 &mbox->u.mqe.un.post_sgl_pages;
14235 rc = lpfc_sli_issue_mbox(phba, mbox, MBX_POLL);
14237 mbox_tmo = lpfc_mbox_tmo_val(phba, mbox);
14238 rc = lpfc_sli_issue_mbox_wait(phba, mbox, mbox_tmo);
14245 mempool_free(mbox, phba->mbox_mem_pool);
14367 LPFC_MBOXQ_t *mbox;
14383 mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL);
14384 if (!mbox)
14388 alloclen = lpfc_sli4_config(phba, mbox, LPFC_MBOX_SUBSYSTEM_FCOE,
14397 lpfc_sli4_mbox_cmd_free(phba, mbox);
14401 viraddr = mbox->sge_array->addr[0];
14429 rc = lpfc_sli_issue_mbox(phba, mbox, MBX_POLL);
14431 mbox_tmo = lpfc_mbox_tmo_val(phba, mbox);
14432 rc = lpfc_sli_issue_mbox_wait(phba, mbox, mbox_tmo);
14438 lpfc_sli4_mbox_cmd_free(phba, mbox);
14469 LPFC_MBOXQ_t *mbox;
14487 mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL);
14488 if (!mbox) {
14490 "0283 Failed to allocate mbox cmd memory\n");
14495 alloclen = lpfc_sli4_config(phba, mbox, LPFC_MBOX_SUBSYSTEM_FCOE,
14504 lpfc_sli4_mbox_cmd_free(phba, mbox);
14509 viraddr = mbox->sge_array->addr[0];
14542 rc = lpfc_sli_issue_mbox(phba, mbox, MBX_POLL);
14544 mbox_tmo = lpfc_mbox_tmo_val(phba, mbox);
14545 rc = lpfc_sli_issue_mbox_wait(phba, mbox, mbox_tmo);
14551 lpfc_sli4_mbox_cmd_free(phba, mbox);
15850 * lpfc_mbx_cmpl_add_fcf_record - add fcf mbox completion handler.
15905 "2009 Failed to allocate mbox for ADD_FCF cmd\n");
16025 "2000 Failed to allocate mbox for "
16085 "2763 Failed to allocate mbox for "
16131 "2758 Failed to allocate mbox for "
16402 lpfc_mbx_cmpl_redisc_fcf_table(struct lpfc_hba *phba, LPFC_MBOXQ_t *mbox)
16407 redisc_fcf = &mbox->u.mqe.un.redisc_fcf_tbl;
16448 mempool_free(mbox, phba->mbox_mem_pool);
16461 LPFC_MBOXQ_t *mbox;
16468 mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL);
16469 if (!mbox) {
16471 "2745 Failed to allocate mbox for "
16478 lpfc_sli4_config(phba, mbox, LPFC_MBOX_SUBSYSTEM_FCOE,
16482 redisc_fcf = &mbox->u.mqe.un.redisc_fcf_tbl;
16487 mbox->vport = phba->pport;
16488 mbox->mbox_cmpl = lpfc_mbx_cmpl_redisc_fcf_table;
16489 rc = lpfc_sli_issue_mbox(phba, mbox, MBX_NOWAIT);
16492 mempool_free(mbox, phba->mbox_mem_pool);
16755 LPFC_MBOXQ_t *mbox;
16763 mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL);
16764 if (!mbox)
16767 lpfc_sli4_config(phba, mbox, LPFC_MBOX_SUBSYSTEM_COMMON,
16772 wr_object = (struct lpfc_mbx_wr_object *)&mbox->u.mqe.un.wr_object;
16799 rc = lpfc_sli_issue_mbox(phba, mbox, MBX_POLL);
16801 mbox_tmo = lpfc_mbox_tmo_val(phba, mbox);
16802 rc = lpfc_sli_issue_mbox_wait(phba, mbox, mbox_tmo);
16809 mempool_free(mbox, phba->mbox_mem_pool);