Lines Matching full:mb

136 	MAILBOX_t *mb;  in lpfc_dump_static_vport()  local
140 mb = &pmb->u.mb; in lpfc_dump_static_vport()
144 mb->mbxCommand = MBX_DUMP_MEMORY; in lpfc_dump_static_vport()
145 mb->un.varDmp.type = DMP_NV_PARAMS; in lpfc_dump_static_vport()
146 mb->un.varDmp.entry_index = offset; in lpfc_dump_static_vport()
147 mb->un.varDmp.region_id = DMP_REGION_VPORT; in lpfc_dump_static_vport()
148 mb->mbxOwner = OWN_HOST; in lpfc_dump_static_vport()
152 mb->un.varDmp.cv = 1; in lpfc_dump_static_vport()
153 mb->un.varDmp.word_cnt = DMP_RSP_SIZE/sizeof(uint32_t); in lpfc_dump_static_vport()
166 mb->un.varWords[3] = putPaddrLow(mp->phys); in lpfc_dump_static_vport()
167 mb->un.varWords[4] = putPaddrHigh(mp->phys); in lpfc_dump_static_vport()
168 mb->un.varDmp.sli4_length = sizeof(struct static_vport_info); in lpfc_dump_static_vport()
183 MAILBOX_t *mb; in lpfc_down_link() local
185 mb = &pmb->u.mb; in lpfc_down_link()
186 mb->mbxCommand = MBX_DOWN_LINK; in lpfc_down_link()
187 mb->mbxOwner = OWN_HOST; in lpfc_down_link()
206 MAILBOX_t *mb; in lpfc_dump_mem() local
208 mb = &pmb->u.mb; in lpfc_dump_mem()
212 mb->mbxCommand = MBX_DUMP_MEMORY; in lpfc_dump_mem()
213 mb->un.varDmp.cv = 1; in lpfc_dump_mem()
214 mb->un.varDmp.type = DMP_NV_PARAMS; in lpfc_dump_mem()
215 mb->un.varDmp.entry_index = offset; in lpfc_dump_mem()
216 mb->un.varDmp.region_id = region_id; in lpfc_dump_mem()
217 mb->un.varDmp.word_cnt = (DMP_RSP_SIZE / sizeof (uint32_t)); in lpfc_dump_mem()
218 mb->un.varDmp.co = 0; in lpfc_dump_mem()
219 mb->un.varDmp.resp_offset = 0; in lpfc_dump_mem()
220 mb->mbxOwner = OWN_HOST; in lpfc_dump_mem()
235 MAILBOX_t *mb; in lpfc_dump_wakeup_param() local
237 mb = &pmb->u.mb; in lpfc_dump_wakeup_param()
241 mb->mbxCommand = MBX_DUMP_MEMORY; in lpfc_dump_wakeup_param()
242 mb->mbxOwner = OWN_HOST; in lpfc_dump_wakeup_param()
243 mb->un.varDmp.cv = 1; in lpfc_dump_wakeup_param()
244 mb->un.varDmp.type = DMP_NV_PARAMS; in lpfc_dump_wakeup_param()
246 mb->un.varDmp.entry_index = 0; in lpfc_dump_wakeup_param()
247 mb->un.varDmp.region_id = WAKE_UP_PARMS_REGION_ID; in lpfc_dump_wakeup_param()
248 mb->un.varDmp.word_cnt = WAKE_UP_PARMS_WORD_SIZE; in lpfc_dump_wakeup_param()
249 mb->un.varDmp.co = 0; in lpfc_dump_wakeup_param()
250 mb->un.varDmp.resp_offset = 0; in lpfc_dump_wakeup_param()
268 MAILBOX_t *mb; in lpfc_read_nv() local
270 mb = &pmb->u.mb; in lpfc_read_nv()
272 mb->mbxCommand = MBX_READ_NV; in lpfc_read_nv()
273 mb->mbxOwner = OWN_HOST; in lpfc_read_nv()
294 MAILBOX_t *mb; in lpfc_config_async() local
296 mb = &pmb->u.mb; in lpfc_config_async()
298 mb->mbxCommand = MBX_ASYNCEVT_ENABLE; in lpfc_config_async()
299 mb->un.varCfgAsyncEvent.ring = ring; in lpfc_config_async()
300 mb->mbxOwner = OWN_HOST; in lpfc_config_async()
320 MAILBOX_t *mb; in lpfc_heart_beat() local
322 mb = &pmb->u.mb; in lpfc_heart_beat()
324 mb->mbxCommand = MBX_HEARTBEAT; in lpfc_heart_beat()
325 mb->mbxOwner = OWN_HOST; in lpfc_heart_beat()
354 MAILBOX_t *mb; in lpfc_read_topology() local
356 mb = &pmb->u.mb; in lpfc_read_topology()
360 mb->mbxCommand = MBX_READ_TOPOLOGY; in lpfc_read_topology()
361 mb->un.varReadTop.lilpBde64.tus.f.bdeSize = LPFC_ALPA_MAP_SIZE; in lpfc_read_topology()
362 mb->un.varReadTop.lilpBde64.addrHigh = putPaddrHigh(mp->phys); in lpfc_read_topology()
363 mb->un.varReadTop.lilpBde64.addrLow = putPaddrLow(mp->phys); in lpfc_read_topology()
369 mb->mbxOwner = OWN_HOST; in lpfc_read_topology()
391 MAILBOX_t *mb; in lpfc_clear_la() local
393 mb = &pmb->u.mb; in lpfc_clear_la()
396 mb->un.varClearLA.eventTag = phba->fc_eventTag; in lpfc_clear_la()
397 mb->mbxCommand = MBX_CLEAR_LA; in lpfc_clear_la()
398 mb->mbxOwner = OWN_HOST; in lpfc_clear_la()
420 MAILBOX_t *mb = &pmb->u.mb; in lpfc_config_link() local
427 mb->un.varCfgLnk.cr = 1; in lpfc_config_link()
428 mb->un.varCfgLnk.ci = 1; in lpfc_config_link()
429 mb->un.varCfgLnk.cr_delay = phba->cfg_cr_delay; in lpfc_config_link()
430 mb->un.varCfgLnk.cr_count = phba->cfg_cr_count; in lpfc_config_link()
433 mb->un.varCfgLnk.myId = vport->fc_myDID; in lpfc_config_link()
434 mb->un.varCfgLnk.edtov = phba->fc_edtov; in lpfc_config_link()
435 mb->un.varCfgLnk.arbtov = phba->fc_arbtov; in lpfc_config_link()
436 mb->un.varCfgLnk.ratov = phba->fc_ratov; in lpfc_config_link()
437 mb->un.varCfgLnk.rttov = phba->fc_rttov; in lpfc_config_link()
438 mb->un.varCfgLnk.altov = phba->fc_altov; in lpfc_config_link()
439 mb->un.varCfgLnk.crtov = phba->fc_crtov; in lpfc_config_link()
440 mb->un.varCfgLnk.cscn = 0; in lpfc_config_link()
442 mb->un.varCfgLnk.cscn = 1; in lpfc_config_link()
443 mb->un.varCfgLnk.bbscn = bf_get(lpfc_bbscn_def, in lpfc_config_link()
448 mb->un.varCfgLnk.ack0_enable = 1; in lpfc_config_link()
450 mb->mbxCommand = MBX_CONFIG_LINK; in lpfc_config_link()
451 mb->mbxOwner = OWN_HOST; in lpfc_config_link()
471 MAILBOX_t *mb = &pmb->u.mb; in lpfc_config_msi() local
501 mb->un.varCfgMSI.attentionConditions[0] = attentionConditions[0]; in lpfc_config_msi()
502 mb->un.varCfgMSI.attentionConditions[1] = attentionConditions[1]; in lpfc_config_msi()
509 mb->un.varCfgMSI.messageNumberByHA[HA_R0_POS] = 1; in lpfc_config_msi()
511 mb->un.varCfgMSI.messageNumberByHA[HA_R1_POS] = 1; in lpfc_config_msi()
514 mb->un.varCfgMSI.messageNumberByHA[HA_R0_POS^3] = 1; in lpfc_config_msi()
516 mb->un.varCfgMSI.messageNumberByHA[HA_R1_POS^3] = 1; in lpfc_config_msi()
519 mb->un.varCfgMSI.autoClearHA[0] = attentionConditions[0]; in lpfc_config_msi()
520 mb->un.varCfgMSI.autoClearHA[1] = attentionConditions[1]; in lpfc_config_msi()
523 mb->un.varCfgMSI.autoClearHA[0] = 0; in lpfc_config_msi()
524 mb->un.varCfgMSI.autoClearHA[1] = 0; in lpfc_config_msi()
527 mb->mbxCommand = MBX_CONFIG_MSI; in lpfc_config_msi()
528 mb->mbxOwner = OWN_HOST; in lpfc_config_msi()
552 MAILBOX_t *mb; in lpfc_init_link() local
554 mb = &pmb->u.mb; in lpfc_init_link()
559 mb->un.varInitLnk.link_flags = FLAGS_TOPOLOGY_MODE_LOOP; in lpfc_init_link()
560 mb->un.varInitLnk.link_flags |= FLAGS_TOPOLOGY_FAILOVER; in lpfc_init_link()
563 mb->un.varInitLnk.link_flags = FLAGS_TOPOLOGY_MODE_PT_PT; in lpfc_init_link()
566 mb->un.varInitLnk.link_flags = FLAGS_TOPOLOGY_MODE_LOOP; in lpfc_init_link()
569 mb->un.varInitLnk.link_flags = FLAGS_TOPOLOGY_MODE_PT_PT; in lpfc_init_link()
570 mb->un.varInitLnk.link_flags |= FLAGS_TOPOLOGY_FAILOVER; in lpfc_init_link()
573 mb->un.varInitLnk.link_flags = FLAGS_LOCAL_LB; in lpfc_init_link()
581 mb->un.varInitLnk.link_flags & FLAGS_TOPOLOGY_MODE_LOOP) { in lpfc_init_link()
582 mb->un.varInitLnk.link_flags = FLAGS_TOPOLOGY_MODE_PT_PT; in lpfc_init_link()
588 mb->un.varInitLnk.link_flags |= FLAGS_IMED_ABORT; in lpfc_init_link()
597 mb->un.varInitLnk.link_flags |= FLAGS_LINK_SPEED; in lpfc_init_link()
598 mb->un.varInitLnk.link_speed = LINK_SPEED_1G; in lpfc_init_link()
601 mb->un.varInitLnk.link_flags |= FLAGS_LINK_SPEED; in lpfc_init_link()
602 mb->un.varInitLnk.link_speed = LINK_SPEED_2G; in lpfc_init_link()
605 mb->un.varInitLnk.link_flags |= FLAGS_LINK_SPEED; in lpfc_init_link()
606 mb->un.varInitLnk.link_speed = LINK_SPEED_4G; in lpfc_init_link()
609 mb->un.varInitLnk.link_flags |= FLAGS_LINK_SPEED; in lpfc_init_link()
610 mb->un.varInitLnk.link_speed = LINK_SPEED_8G; in lpfc_init_link()
613 mb->un.varInitLnk.link_flags |= FLAGS_LINK_SPEED; in lpfc_init_link()
614 mb->un.varInitLnk.link_speed = LINK_SPEED_10G; in lpfc_init_link()
617 mb->un.varInitLnk.link_flags |= FLAGS_LINK_SPEED; in lpfc_init_link()
618 mb->un.varInitLnk.link_speed = LINK_SPEED_16G; in lpfc_init_link()
621 mb->un.varInitLnk.link_flags |= FLAGS_LINK_SPEED; in lpfc_init_link()
622 mb->un.varInitLnk.link_speed = LINK_SPEED_32G; in lpfc_init_link()
625 mb->un.varInitLnk.link_flags |= FLAGS_LINK_SPEED; in lpfc_init_link()
626 mb->un.varInitLnk.link_speed = LINK_SPEED_64G; in lpfc_init_link()
630 mb->un.varInitLnk.link_speed = LINK_SPEED_AUTO; in lpfc_init_link()
636 mb->un.varInitLnk.link_speed = LINK_SPEED_AUTO; in lpfc_init_link()
638 mb->mbxCommand = (volatile uint8_t)MBX_INIT_LINK; in lpfc_init_link()
639 mb->mbxOwner = OWN_HOST; in lpfc_init_link()
640 mb->un.varInitLnk.fabric_AL_PA = phba->fc_pref_ALPA; in lpfc_init_link()
669 MAILBOX_t *mb; in lpfc_read_sparam() local
683 mb = &pmb->u.mb; in lpfc_read_sparam()
684 mb->mbxOwner = OWN_HOST; in lpfc_read_sparam()
685 mb->mbxCommand = MBX_READ_SPARM64; in lpfc_read_sparam()
686 mb->un.varRdSparm.un.sp64.tus.f.bdeSize = sizeof (struct serv_parm); in lpfc_read_sparam()
687 mb->un.varRdSparm.un.sp64.addrHigh = putPaddrHigh(mp->phys); in lpfc_read_sparam()
688 mb->un.varRdSparm.un.sp64.addrLow = putPaddrLow(mp->phys); in lpfc_read_sparam()
690 mb->un.varRdSparm.vpi = phba->vpi_ids[vpi]; in lpfc_read_sparam()
714 MAILBOX_t *mb; in lpfc_unreg_did() local
716 mb = &pmb->u.mb; in lpfc_unreg_did()
719 mb->un.varUnregDID.did = did; in lpfc_unreg_did()
720 mb->un.varUnregDID.vpi = vpi; in lpfc_unreg_did()
723 mb->un.varUnregDID.vpi = phba->vpi_ids[vpi]; in lpfc_unreg_did()
725 mb->mbxCommand = MBX_UNREG_D_ID; in lpfc_unreg_did()
726 mb->mbxOwner = OWN_HOST; in lpfc_unreg_did()
746 MAILBOX_t *mb; in lpfc_read_config() local
748 mb = &pmb->u.mb; in lpfc_read_config()
751 mb->mbxCommand = MBX_READ_CONFIG; in lpfc_read_config()
752 mb->mbxOwner = OWN_HOST; in lpfc_read_config()
771 MAILBOX_t *mb; in lpfc_read_lnk_stat() local
773 mb = &pmb->u.mb; in lpfc_read_lnk_stat()
776 mb->mbxCommand = MBX_READ_LNK_STAT; in lpfc_read_lnk_stat()
777 mb->mbxOwner = OWN_HOST; in lpfc_read_lnk_stat()
809 MAILBOX_t *mb = &pmb->u.mb; in lpfc_reg_rpi() local
816 mb->un.varRegLogin.rpi = 0; in lpfc_reg_rpi()
818 mb->un.varRegLogin.rpi = phba->sli4_hba.rpi_ids[rpi]; in lpfc_reg_rpi()
820 mb->un.varRegLogin.vpi = phba->vpi_ids[vpi]; in lpfc_reg_rpi()
821 mb->un.varRegLogin.did = did; in lpfc_reg_rpi()
822 mb->mbxOwner = OWN_HOST; in lpfc_reg_rpi()
827 mb->mbxCommand = MBX_REG_LOGIN64; in lpfc_reg_rpi()
841 mb->mbxCommand = MBX_REG_LOGIN64; in lpfc_reg_rpi()
842 mb->un.varRegLogin.un.sp64.tus.f.bdeSize = sizeof (struct serv_parm); in lpfc_reg_rpi()
843 mb->un.varRegLogin.un.sp64.addrHigh = putPaddrHigh(mp->phys); in lpfc_reg_rpi()
844 mb->un.varRegLogin.un.sp64.addrLow = putPaddrLow(mp->phys); in lpfc_reg_rpi()
870 MAILBOX_t *mb; in lpfc_unreg_login() local
872 mb = &pmb->u.mb; in lpfc_unreg_login()
875 mb->un.varUnregLogin.rpi = rpi; in lpfc_unreg_login()
876 mb->un.varUnregLogin.rsvd1 = 0; in lpfc_unreg_login()
878 mb->un.varUnregLogin.vpi = phba->vpi_ids[vpi]; in lpfc_unreg_login()
880 mb->mbxCommand = MBX_UNREG_LOGIN; in lpfc_unreg_login()
881 mb->mbxOwner = OWN_HOST; in lpfc_unreg_login()
911 mbox->u.mb.un.varUnregLogin.rsvd1 = 0x4000; in lpfc_sli4_unreg_all_rpis()
937 MAILBOX_t *mb = &pmb->u.mb; in lpfc_reg_vpi() local
946 mb->un.varRegVpi.upd = 1; in lpfc_reg_vpi()
948 mb->un.varRegVpi.vpi = phba->vpi_ids[vport->vpi]; in lpfc_reg_vpi()
949 mb->un.varRegVpi.sid = vport->fc_myDID; in lpfc_reg_vpi()
951 mb->un.varRegVpi.vfi = phba->sli4_hba.vfi_ids[vport->vfi]; in lpfc_reg_vpi()
953 mb->un.varRegVpi.vfi = vport->vfi + vport->phba->vfi_base; in lpfc_reg_vpi()
954 memcpy(mb->un.varRegVpi.wwn, &vport->fc_portname, in lpfc_reg_vpi()
956 mb->un.varRegVpi.wwn[0] = cpu_to_le32(mb->un.varRegVpi.wwn[0]); in lpfc_reg_vpi()
957 mb->un.varRegVpi.wwn[1] = cpu_to_le32(mb->un.varRegVpi.wwn[1]); in lpfc_reg_vpi()
959 mb->mbxCommand = MBX_REG_VPI; in lpfc_reg_vpi()
960 mb->mbxOwner = OWN_HOST; in lpfc_reg_vpi()
984 MAILBOX_t *mb = &pmb->u.mb; in lpfc_unreg_vpi() local
988 mb->un.varUnregVpi.vpi = phba->vpi_ids[vpi]; in lpfc_unreg_vpi()
990 mb->un.varUnregVpi.sli4_vpi = phba->vpi_ids[vpi]; in lpfc_unreg_vpi()
992 mb->mbxCommand = MBX_UNREG_VPI; in lpfc_unreg_vpi()
993 mb->mbxOwner = OWN_HOST; in lpfc_unreg_vpi()
1082 MAILBOX_t *mb = &pmb->u.mb; in lpfc_read_rev() local
1084 mb->un.varRdRev.cv = 1; in lpfc_read_rev()
1085 mb->un.varRdRev.v3req = 1; /* Request SLI3 info */ in lpfc_read_rev()
1086 mb->mbxCommand = MBX_READ_REV; in lpfc_read_rev()
1087 mb->mbxOwner = OWN_HOST; in lpfc_read_rev()
1094 MAILBOX_t *mb = &pmb->u.mb; in lpfc_sli4_swap_str() local
1097 switch (mb->mbxCommand) { in lpfc_sli4_swap_str()
1195 MAILBOX_t *mb = &pmb->u.mb; in lpfc_config_hbq() local
1196 struct config_hbq_var *hbqmb = &mb->un.varCfgHbq; in lpfc_config_hbq()
1221 mb->mbxCommand = MBX_CONFIG_HBQ; in lpfc_config_hbq()
1222 mb->mbxOwner = OWN_HOST; in lpfc_config_hbq()
1270 MAILBOX_t *mb = &pmb->u.mb; in lpfc_config_ring() local
1276 mb->un.varCfgRing.ring = ring; in lpfc_config_ring()
1277 mb->un.varCfgRing.maxOrigXchg = 0; in lpfc_config_ring()
1278 mb->un.varCfgRing.maxRespXchg = 0; in lpfc_config_ring()
1279 mb->un.varCfgRing.recvNotify = 1; in lpfc_config_ring()
1283 mb->un.varCfgRing.numMask = pring->num_mask; in lpfc_config_ring()
1284 mb->mbxCommand = MBX_CONFIG_RING; in lpfc_config_ring()
1285 mb->mbxOwner = OWN_HOST; in lpfc_config_ring()
1289 mb->un.varCfgRing.profile = pring->prt[0].profile; in lpfc_config_ring()
1295 mb->un.varCfgRing.rrRegs[i].rval = pring->prt[i].rctl; in lpfc_config_ring()
1296 if (mb->un.varCfgRing.rrRegs[i].rval != FC_RCTL_ELS_REQ) in lpfc_config_ring()
1297 mb->un.varCfgRing.rrRegs[i].rmask = 0xff; in lpfc_config_ring()
1299 mb->un.varCfgRing.rrRegs[i].rmask = 0xfe; in lpfc_config_ring()
1300 mb->un.varCfgRing.rrRegs[i].tval = pring->prt[i].type; in lpfc_config_ring()
1301 mb->un.varCfgRing.rrRegs[i].tmask = 0xff; in lpfc_config_ring()
1325 MAILBOX_t *mb = &pmb->u.mb; in lpfc_config_port() local
1334 mb->mbxCommand = MBX_CONFIG_PORT; in lpfc_config_port()
1335 mb->mbxOwner = OWN_HOST; in lpfc_config_port()
1337 mb->un.varCfgPort.pcbLen = sizeof(PCB_t); in lpfc_config_port()
1341 mb->un.varCfgPort.pcbLow = putPaddrLow(pdma_addr); in lpfc_config_port()
1342 mb->un.varCfgPort.pcbHigh = putPaddrHigh(pdma_addr); in lpfc_config_port()
1345 mb->un.varCfgPort.hps = 1; in lpfc_config_port()
1351 mb->un.varCfgPort.cbg = 1; /* configure BlockGuard */ in lpfc_config_port()
1352 mb->un.varCfgPort.cerbm = 1; /* Request HBQs */ in lpfc_config_port()
1353 mb->un.varCfgPort.ccrp = 1; /* Command Ring Polling */ in lpfc_config_port()
1354 mb->un.varCfgPort.max_hbq = lpfc_sli_hbq_count(); in lpfc_config_port()
1357 mb->un.varCfgPort.max_vpi = LPFC_MAX_VPI; in lpfc_config_port()
1358 mb->un.varCfgPort.cmv = 1; in lpfc_config_port()
1360 mb->un.varCfgPort.max_vpi = phba->max_vpi = 0; in lpfc_config_port()
1363 mb->un.varCfgPort.sli_mode = phba->sli_rev; in lpfc_config_port()
1367 mb->un.varCfgPort.casabt = 1; in lpfc_config_port()
1441 mb->un.varCfgPort.hps = 1; in lpfc_config_port()
1487 memcpy(&mb->un.varCfgPort.hbainit, hbainit, 20); in lpfc_config_port()
1512 MAILBOX_t *mb = &pmb->u.mb; in lpfc_kill_board() local
1515 mb->mbxCommand = MBX_KILL_BOARD; in lpfc_kill_board()
1516 mb->mbxOwner = OWN_HOST; in lpfc_kill_board()
1631 mboxq->u.mb.mbxCommand); in lpfc_mbox_cmd_check()
1677 MAILBOX_t *mbox = &mboxq->u.mb; in lpfc_mbox_tmo_val()
2018 if (mbox->u.mb.mbxCommand != MBX_SLI4_CONFIG) in lpfc_sli_config_mbox_subsys_get()
2051 if (mbox->u.mb.mbxCommand != MBX_SLI4_CONFIG) in lpfc_sli_config_mbox_opcode_get()
2333 MAILBOX_t *mb; in lpfc_sli4_dump_cfg_rg23() local
2337 mb = &mbox->u.mb; in lpfc_sli4_dump_cfg_rg23()
2347 mb->mbxCommand = MBX_DUMP_MEMORY; in lpfc_sli4_dump_cfg_rg23()
2348 mb->un.varDmp.type = DMP_NV_PARAMS; in lpfc_sli4_dump_cfg_rg23()
2349 mb->un.varDmp.region_id = DMP_REGION_23; in lpfc_sli4_dump_cfg_rg23()
2350 mb->un.varDmp.sli4_length = DMP_RGN23_SIZE; in lpfc_sli4_dump_cfg_rg23()
2352 mb->un.varWords[3] = putPaddrLow(mp->phys); in lpfc_sli4_dump_cfg_rg23()
2353 mb->un.varWords[4] = putPaddrHigh(mp->phys); in lpfc_sli4_dump_cfg_rg23()
2360 MAILBOX_t *mb; in lpfc_mbx_cmpl_rdp_link_stat() local
2364 mb = &mboxq->u.mb; in lpfc_mbx_cmpl_rdp_link_stat()
2365 if (mb->mbxStatus) in lpfc_mbx_cmpl_rdp_link_stat()
2368 memcpy(&rdp_context->link_stat, &mb->un.varRdLnk, sizeof(READ_LNK_VAR)); in lpfc_mbx_cmpl_rdp_link_stat()