Lines Matching full:mb

62 	MAILBOX_t *mb;  in lpfc_dump_static_vport()  local
65 mb = &pmb->u.mb; in lpfc_dump_static_vport()
69 mb->mbxCommand = MBX_DUMP_MEMORY; in lpfc_dump_static_vport()
70 mb->un.varDmp.type = DMP_NV_PARAMS; in lpfc_dump_static_vport()
71 mb->un.varDmp.entry_index = offset; in lpfc_dump_static_vport()
72 mb->un.varDmp.region_id = DMP_REGION_VPORT; in lpfc_dump_static_vport()
73 mb->mbxOwner = OWN_HOST; in lpfc_dump_static_vport()
77 mb->un.varDmp.cv = 1; in lpfc_dump_static_vport()
78 mb->un.varDmp.word_cnt = DMP_RSP_SIZE/sizeof(uint32_t); in lpfc_dump_static_vport()
98 mb->un.varWords[3] = putPaddrLow(mp->phys); in lpfc_dump_static_vport()
99 mb->un.varWords[4] = putPaddrHigh(mp->phys); in lpfc_dump_static_vport()
100 mb->un.varDmp.sli4_length = sizeof(struct static_vport_info); in lpfc_dump_static_vport()
115 MAILBOX_t *mb; in lpfc_down_link() local
117 mb = &pmb->u.mb; in lpfc_down_link()
118 mb->mbxCommand = MBX_DOWN_LINK; in lpfc_down_link()
119 mb->mbxOwner = OWN_HOST; in lpfc_down_link()
138 MAILBOX_t *mb; in lpfc_dump_mem() local
141 mb = &pmb->u.mb; in lpfc_dump_mem()
146 mb->mbxCommand = MBX_DUMP_MEMORY; in lpfc_dump_mem()
147 mb->un.varDmp.cv = 1; in lpfc_dump_mem()
148 mb->un.varDmp.type = DMP_NV_PARAMS; in lpfc_dump_mem()
149 mb->un.varDmp.entry_index = offset; in lpfc_dump_mem()
150 mb->un.varDmp.region_id = region_id; in lpfc_dump_mem()
151 mb->un.varDmp.word_cnt = (DMP_RSP_SIZE / sizeof (uint32_t)); in lpfc_dump_mem()
152 mb->un.varDmp.co = 0; in lpfc_dump_mem()
153 mb->un.varDmp.resp_offset = 0; in lpfc_dump_mem()
155 mb->mbxOwner = OWN_HOST; in lpfc_dump_mem()
170 MAILBOX_t *mb; in lpfc_dump_wakeup_param() local
173 mb = &pmb->u.mb; in lpfc_dump_wakeup_param()
179 mb->mbxCommand = MBX_DUMP_MEMORY; in lpfc_dump_wakeup_param()
180 mb->mbxOwner = OWN_HOST; in lpfc_dump_wakeup_param()
181 mb->un.varDmp.cv = 1; in lpfc_dump_wakeup_param()
182 mb->un.varDmp.type = DMP_NV_PARAMS; in lpfc_dump_wakeup_param()
184 mb->un.varDmp.entry_index = 0; in lpfc_dump_wakeup_param()
185 mb->un.varDmp.region_id = WAKE_UP_PARMS_REGION_ID; in lpfc_dump_wakeup_param()
186 mb->un.varDmp.word_cnt = WAKE_UP_PARMS_WORD_SIZE; in lpfc_dump_wakeup_param()
187 mb->un.varDmp.co = 0; in lpfc_dump_wakeup_param()
188 mb->un.varDmp.resp_offset = 0; in lpfc_dump_wakeup_param()
207 MAILBOX_t *mb; in lpfc_read_nv() local
209 mb = &pmb->u.mb; in lpfc_read_nv()
211 mb->mbxCommand = MBX_READ_NV; in lpfc_read_nv()
212 mb->mbxOwner = OWN_HOST; in lpfc_read_nv()
233 MAILBOX_t *mb; in lpfc_config_async() local
235 mb = &pmb->u.mb; in lpfc_config_async()
237 mb->mbxCommand = MBX_ASYNCEVT_ENABLE; in lpfc_config_async()
238 mb->un.varCfgAsyncEvent.ring = ring; in lpfc_config_async()
239 mb->mbxOwner = OWN_HOST; in lpfc_config_async()
259 MAILBOX_t *mb; in lpfc_heart_beat() local
261 mb = &pmb->u.mb; in lpfc_heart_beat()
263 mb->mbxCommand = MBX_HEARTBEAT; in lpfc_heart_beat()
264 mb->mbxOwner = OWN_HOST; in lpfc_heart_beat()
293 MAILBOX_t *mb; in lpfc_read_topology() local
295 mb = &pmb->u.mb; in lpfc_read_topology()
299 mb->mbxCommand = MBX_READ_TOPOLOGY; in lpfc_read_topology()
300 mb->un.varReadTop.lilpBde64.tus.f.bdeSize = LPFC_ALPA_MAP_SIZE; in lpfc_read_topology()
301 mb->un.varReadTop.lilpBde64.addrHigh = putPaddrHigh(mp->phys); in lpfc_read_topology()
302 mb->un.varReadTop.lilpBde64.addrLow = putPaddrLow(mp->phys); in lpfc_read_topology()
308 mb->mbxOwner = OWN_HOST; in lpfc_read_topology()
330 MAILBOX_t *mb; in lpfc_clear_la() local
332 mb = &pmb->u.mb; in lpfc_clear_la()
335 mb->un.varClearLA.eventTag = phba->fc_eventTag; in lpfc_clear_la()
336 mb->mbxCommand = MBX_CLEAR_LA; in lpfc_clear_la()
337 mb->mbxOwner = OWN_HOST; in lpfc_clear_la()
359 MAILBOX_t *mb = &pmb->u.mb; in lpfc_config_link() local
366 mb->un.varCfgLnk.cr = 1; in lpfc_config_link()
367 mb->un.varCfgLnk.ci = 1; in lpfc_config_link()
368 mb->un.varCfgLnk.cr_delay = phba->cfg_cr_delay; in lpfc_config_link()
369 mb->un.varCfgLnk.cr_count = phba->cfg_cr_count; in lpfc_config_link()
372 mb->un.varCfgLnk.myId = vport->fc_myDID; in lpfc_config_link()
373 mb->un.varCfgLnk.edtov = phba->fc_edtov; in lpfc_config_link()
374 mb->un.varCfgLnk.arbtov = phba->fc_arbtov; in lpfc_config_link()
375 mb->un.varCfgLnk.ratov = phba->fc_ratov; in lpfc_config_link()
376 mb->un.varCfgLnk.rttov = phba->fc_rttov; in lpfc_config_link()
377 mb->un.varCfgLnk.altov = phba->fc_altov; in lpfc_config_link()
378 mb->un.varCfgLnk.crtov = phba->fc_crtov; in lpfc_config_link()
379 mb->un.varCfgLnk.cscn = 0; in lpfc_config_link()
381 mb->un.varCfgLnk.cscn = 1; in lpfc_config_link()
382 mb->un.varCfgLnk.bbscn = bf_get(lpfc_bbscn_def, in lpfc_config_link()
387 mb->un.varCfgLnk.ack0_enable = 1; in lpfc_config_link()
389 mb->mbxCommand = MBX_CONFIG_LINK; in lpfc_config_link()
390 mb->mbxOwner = OWN_HOST; in lpfc_config_link()
410 MAILBOX_t *mb = &pmb->u.mb; in lpfc_config_msi() local
440 mb->un.varCfgMSI.attentionConditions[0] = attentionConditions[0]; in lpfc_config_msi()
441 mb->un.varCfgMSI.attentionConditions[1] = attentionConditions[1]; in lpfc_config_msi()
448 mb->un.varCfgMSI.messageNumberByHA[HA_R0_POS] = 1; in lpfc_config_msi()
450 mb->un.varCfgMSI.messageNumberByHA[HA_R1_POS] = 1; in lpfc_config_msi()
453 mb->un.varCfgMSI.messageNumberByHA[HA_R0_POS^3] = 1; in lpfc_config_msi()
455 mb->un.varCfgMSI.messageNumberByHA[HA_R1_POS^3] = 1; in lpfc_config_msi()
458 mb->un.varCfgMSI.autoClearHA[0] = attentionConditions[0]; in lpfc_config_msi()
459 mb->un.varCfgMSI.autoClearHA[1] = attentionConditions[1]; in lpfc_config_msi()
462 mb->un.varCfgMSI.autoClearHA[0] = 0; in lpfc_config_msi()
463 mb->un.varCfgMSI.autoClearHA[1] = 0; in lpfc_config_msi()
466 mb->mbxCommand = MBX_CONFIG_MSI; in lpfc_config_msi()
467 mb->mbxOwner = OWN_HOST; in lpfc_config_msi()
491 MAILBOX_t *mb; in lpfc_init_link() local
493 mb = &pmb->u.mb; in lpfc_init_link()
498 mb->un.varInitLnk.link_flags = FLAGS_TOPOLOGY_MODE_LOOP; in lpfc_init_link()
499 mb->un.varInitLnk.link_flags |= FLAGS_TOPOLOGY_FAILOVER; in lpfc_init_link()
502 mb->un.varInitLnk.link_flags = FLAGS_TOPOLOGY_MODE_PT_PT; in lpfc_init_link()
505 mb->un.varInitLnk.link_flags = FLAGS_TOPOLOGY_MODE_LOOP; in lpfc_init_link()
508 mb->un.varInitLnk.link_flags = FLAGS_TOPOLOGY_MODE_PT_PT; in lpfc_init_link()
509 mb->un.varInitLnk.link_flags |= FLAGS_TOPOLOGY_FAILOVER; in lpfc_init_link()
512 mb->un.varInitLnk.link_flags = FLAGS_LOCAL_LB; in lpfc_init_link()
519 mb->un.varInitLnk.link_flags & FLAGS_TOPOLOGY_MODE_LOOP) { in lpfc_init_link()
520 mb->un.varInitLnk.link_flags = FLAGS_TOPOLOGY_MODE_PT_PT; in lpfc_init_link()
525 mb->un.varInitLnk.link_flags |= FLAGS_IMED_ABORT; in lpfc_init_link()
534 mb->un.varInitLnk.link_flags |= FLAGS_LINK_SPEED; in lpfc_init_link()
535 mb->un.varInitLnk.link_speed = LINK_SPEED_1G; in lpfc_init_link()
538 mb->un.varInitLnk.link_flags |= FLAGS_LINK_SPEED; in lpfc_init_link()
539 mb->un.varInitLnk.link_speed = LINK_SPEED_2G; in lpfc_init_link()
542 mb->un.varInitLnk.link_flags |= FLAGS_LINK_SPEED; in lpfc_init_link()
543 mb->un.varInitLnk.link_speed = LINK_SPEED_4G; in lpfc_init_link()
546 mb->un.varInitLnk.link_flags |= FLAGS_LINK_SPEED; in lpfc_init_link()
547 mb->un.varInitLnk.link_speed = LINK_SPEED_8G; in lpfc_init_link()
550 mb->un.varInitLnk.link_flags |= FLAGS_LINK_SPEED; in lpfc_init_link()
551 mb->un.varInitLnk.link_speed = LINK_SPEED_10G; in lpfc_init_link()
554 mb->un.varInitLnk.link_flags |= FLAGS_LINK_SPEED; in lpfc_init_link()
555 mb->un.varInitLnk.link_speed = LINK_SPEED_16G; in lpfc_init_link()
558 mb->un.varInitLnk.link_flags |= FLAGS_LINK_SPEED; in lpfc_init_link()
559 mb->un.varInitLnk.link_speed = LINK_SPEED_32G; in lpfc_init_link()
562 mb->un.varInitLnk.link_flags |= FLAGS_LINK_SPEED; in lpfc_init_link()
563 mb->un.varInitLnk.link_speed = LINK_SPEED_64G; in lpfc_init_link()
567 mb->un.varInitLnk.link_speed = LINK_SPEED_AUTO; in lpfc_init_link()
573 mb->un.varInitLnk.link_speed = LINK_SPEED_AUTO; in lpfc_init_link()
575 mb->mbxCommand = (volatile uint8_t)MBX_INIT_LINK; in lpfc_init_link()
576 mb->mbxOwner = OWN_HOST; in lpfc_init_link()
577 mb->un.varInitLnk.fabric_AL_PA = phba->fc_pref_ALPA; in lpfc_init_link()
606 MAILBOX_t *mb; in lpfc_read_sparam() local
608 mb = &pmb->u.mb; in lpfc_read_sparam()
611 mb->mbxOwner = OWN_HOST; in lpfc_read_sparam()
620 mb->mbxCommand = MBX_READ_SPARM64; in lpfc_read_sparam()
627 mb->mbxCommand = MBX_READ_SPARM64; in lpfc_read_sparam()
628 mb->un.varRdSparm.un.sp64.tus.f.bdeSize = sizeof (struct serv_parm); in lpfc_read_sparam()
629 mb->un.varRdSparm.un.sp64.addrHigh = putPaddrHigh(mp->phys); in lpfc_read_sparam()
630 mb->un.varRdSparm.un.sp64.addrLow = putPaddrLow(mp->phys); in lpfc_read_sparam()
632 mb->un.varRdSparm.vpi = phba->vpi_ids[vpi]; in lpfc_read_sparam()
659 MAILBOX_t *mb; in lpfc_unreg_did() local
661 mb = &pmb->u.mb; in lpfc_unreg_did()
664 mb->un.varUnregDID.did = did; in lpfc_unreg_did()
665 mb->un.varUnregDID.vpi = vpi; in lpfc_unreg_did()
668 mb->un.varUnregDID.vpi = phba->vpi_ids[vpi]; in lpfc_unreg_did()
670 mb->mbxCommand = MBX_UNREG_D_ID; in lpfc_unreg_did()
671 mb->mbxOwner = OWN_HOST; in lpfc_unreg_did()
691 MAILBOX_t *mb; in lpfc_read_config() local
693 mb = &pmb->u.mb; in lpfc_read_config()
696 mb->mbxCommand = MBX_READ_CONFIG; in lpfc_read_config()
697 mb->mbxOwner = OWN_HOST; in lpfc_read_config()
716 MAILBOX_t *mb; in lpfc_read_lnk_stat() local
718 mb = &pmb->u.mb; in lpfc_read_lnk_stat()
721 mb->mbxCommand = MBX_READ_LNK_STAT; in lpfc_read_lnk_stat()
722 mb->mbxOwner = OWN_HOST; in lpfc_read_lnk_stat()
754 MAILBOX_t *mb = &pmb->u.mb; in lpfc_reg_rpi() local
760 mb->un.varRegLogin.rpi = 0; in lpfc_reg_rpi()
762 mb->un.varRegLogin.rpi = phba->sli4_hba.rpi_ids[rpi]; in lpfc_reg_rpi()
764 mb->un.varRegLogin.vpi = phba->vpi_ids[vpi]; in lpfc_reg_rpi()
765 mb->un.varRegLogin.did = did; in lpfc_reg_rpi()
766 mb->mbxOwner = OWN_HOST; in lpfc_reg_rpi()
773 mb->mbxCommand = MBX_REG_LOGIN64; in lpfc_reg_rpi()
789 mb->mbxCommand = MBX_REG_LOGIN64; in lpfc_reg_rpi()
790 mb->un.varRegLogin.un.sp64.tus.f.bdeSize = sizeof (struct serv_parm); in lpfc_reg_rpi()
791 mb->un.varRegLogin.un.sp64.addrHigh = putPaddrHigh(mp->phys); in lpfc_reg_rpi()
792 mb->un.varRegLogin.un.sp64.addrLow = putPaddrLow(mp->phys); in lpfc_reg_rpi()
818 MAILBOX_t *mb; in lpfc_unreg_login() local
820 mb = &pmb->u.mb; in lpfc_unreg_login()
823 mb->un.varUnregLogin.rpi = rpi; in lpfc_unreg_login()
824 mb->un.varUnregLogin.rsvd1 = 0; in lpfc_unreg_login()
826 mb->un.varUnregLogin.vpi = phba->vpi_ids[vpi]; in lpfc_unreg_login()
828 mb->mbxCommand = MBX_UNREG_LOGIN; in lpfc_unreg_login()
829 mb->mbxOwner = OWN_HOST; in lpfc_unreg_login()
859 mbox->u.mb.un.varUnregLogin.rsvd1 = 0x4000; in lpfc_sli4_unreg_all_rpis()
885 MAILBOX_t *mb = &pmb->u.mb; in lpfc_reg_vpi() local
894 mb->un.varRegVpi.upd = 1; in lpfc_reg_vpi()
896 mb->un.varRegVpi.vpi = phba->vpi_ids[vport->vpi]; in lpfc_reg_vpi()
897 mb->un.varRegVpi.sid = vport->fc_myDID; in lpfc_reg_vpi()
899 mb->un.varRegVpi.vfi = phba->sli4_hba.vfi_ids[vport->vfi]; in lpfc_reg_vpi()
901 mb->un.varRegVpi.vfi = vport->vfi + vport->phba->vfi_base; in lpfc_reg_vpi()
902 memcpy(mb->un.varRegVpi.wwn, &vport->fc_portname, in lpfc_reg_vpi()
904 mb->un.varRegVpi.wwn[0] = cpu_to_le32(mb->un.varRegVpi.wwn[0]); in lpfc_reg_vpi()
905 mb->un.varRegVpi.wwn[1] = cpu_to_le32(mb->un.varRegVpi.wwn[1]); in lpfc_reg_vpi()
907 mb->mbxCommand = MBX_REG_VPI; in lpfc_reg_vpi()
908 mb->mbxOwner = OWN_HOST; in lpfc_reg_vpi()
932 MAILBOX_t *mb = &pmb->u.mb; in lpfc_unreg_vpi() local
936 mb->un.varUnregVpi.vpi = phba->vpi_ids[vpi]; in lpfc_unreg_vpi()
938 mb->un.varUnregVpi.sli4_vpi = phba->vpi_ids[vpi]; in lpfc_unreg_vpi()
940 mb->mbxCommand = MBX_UNREG_VPI; in lpfc_unreg_vpi()
941 mb->mbxOwner = OWN_HOST; in lpfc_unreg_vpi()
1030 MAILBOX_t *mb = &pmb->u.mb; in lpfc_read_rev() local
1032 mb->un.varRdRev.cv = 1; in lpfc_read_rev()
1033 mb->un.varRdRev.v3req = 1; /* Request SLI3 info */ in lpfc_read_rev()
1034 mb->mbxCommand = MBX_READ_REV; in lpfc_read_rev()
1035 mb->mbxOwner = OWN_HOST; in lpfc_read_rev()
1042 MAILBOX_t *mb = &pmb->u.mb; in lpfc_sli4_swap_str() local
1045 switch (mb->mbxCommand) { in lpfc_sli4_swap_str()
1143 MAILBOX_t *mb = &pmb->u.mb; in lpfc_config_hbq() local
1144 struct config_hbq_var *hbqmb = &mb->un.varCfgHbq; in lpfc_config_hbq()
1169 mb->mbxCommand = MBX_CONFIG_HBQ; in lpfc_config_hbq()
1170 mb->mbxOwner = OWN_HOST; in lpfc_config_hbq()
1218 MAILBOX_t *mb = &pmb->u.mb; in lpfc_config_ring() local
1224 mb->un.varCfgRing.ring = ring; in lpfc_config_ring()
1225 mb->un.varCfgRing.maxOrigXchg = 0; in lpfc_config_ring()
1226 mb->un.varCfgRing.maxRespXchg = 0; in lpfc_config_ring()
1227 mb->un.varCfgRing.recvNotify = 1; in lpfc_config_ring()
1231 mb->un.varCfgRing.numMask = pring->num_mask; in lpfc_config_ring()
1232 mb->mbxCommand = MBX_CONFIG_RING; in lpfc_config_ring()
1233 mb->mbxOwner = OWN_HOST; in lpfc_config_ring()
1237 mb->un.varCfgRing.profile = pring->prt[0].profile; in lpfc_config_ring()
1243 mb->un.varCfgRing.rrRegs[i].rval = pring->prt[i].rctl; in lpfc_config_ring()
1244 if (mb->un.varCfgRing.rrRegs[i].rval != FC_RCTL_ELS_REQ) in lpfc_config_ring()
1245 mb->un.varCfgRing.rrRegs[i].rmask = 0xff; in lpfc_config_ring()
1247 mb->un.varCfgRing.rrRegs[i].rmask = 0xfe; in lpfc_config_ring()
1248 mb->un.varCfgRing.rrRegs[i].tval = pring->prt[i].type; in lpfc_config_ring()
1249 mb->un.varCfgRing.rrRegs[i].tmask = 0xff; in lpfc_config_ring()
1273 MAILBOX_t *mb = &pmb->u.mb; in lpfc_config_port() local
1282 mb->mbxCommand = MBX_CONFIG_PORT; in lpfc_config_port()
1283 mb->mbxOwner = OWN_HOST; in lpfc_config_port()
1285 mb->un.varCfgPort.pcbLen = sizeof(PCB_t); in lpfc_config_port()
1289 mb->un.varCfgPort.pcbLow = putPaddrLow(pdma_addr); in lpfc_config_port()
1290 mb->un.varCfgPort.pcbHigh = putPaddrHigh(pdma_addr); in lpfc_config_port()
1293 mb->un.varCfgPort.hps = 1; in lpfc_config_port()
1299 mb->un.varCfgPort.cbg = 1; /* configure BlockGuard */ in lpfc_config_port()
1300 mb->un.varCfgPort.cerbm = 1; /* Request HBQs */ in lpfc_config_port()
1301 mb->un.varCfgPort.ccrp = 1; /* Command Ring Polling */ in lpfc_config_port()
1302 mb->un.varCfgPort.max_hbq = lpfc_sli_hbq_count(); in lpfc_config_port()
1305 mb->un.varCfgPort.max_vpi = LPFC_MAX_VPI; in lpfc_config_port()
1306 mb->un.varCfgPort.cmv = 1; in lpfc_config_port()
1308 mb->un.varCfgPort.max_vpi = phba->max_vpi = 0; in lpfc_config_port()
1311 mb->un.varCfgPort.sli_mode = phba->sli_rev; in lpfc_config_port()
1315 mb->un.varCfgPort.casabt = 1; in lpfc_config_port()
1389 mb->un.varCfgPort.hps = 1; in lpfc_config_port()
1435 memcpy(&mb->un.varCfgPort.hbainit, hbainit, 20); in lpfc_config_port()
1460 MAILBOX_t *mb = &pmb->u.mb; in lpfc_kill_board() local
1463 mb->mbxCommand = MBX_KILL_BOARD; in lpfc_kill_board()
1464 mb->mbxOwner = OWN_HOST; in lpfc_kill_board()
1579 mboxq->u.mb.mbxCommand); in lpfc_mbox_cmd_check()
1625 MAILBOX_t *mbox = &mboxq->u.mb; in lpfc_mbox_tmo_val()
1962 if (mbox->u.mb.mbxCommand != MBX_SLI4_CONFIG) in lpfc_sli_config_mbox_subsys_get()
1995 if (mbox->u.mb.mbxCommand != MBX_SLI4_CONFIG) in lpfc_sli_config_mbox_opcode_get()
2271 MAILBOX_t *mb; in lpfc_sli4_dump_cfg_rg23() local
2274 mb = &mbox->u.mb; in lpfc_sli4_dump_cfg_rg23()
2295 mb->mbxCommand = MBX_DUMP_MEMORY; in lpfc_sli4_dump_cfg_rg23()
2296 mb->un.varDmp.type = DMP_NV_PARAMS; in lpfc_sli4_dump_cfg_rg23()
2297 mb->un.varDmp.region_id = DMP_REGION_23; in lpfc_sli4_dump_cfg_rg23()
2298 mb->un.varDmp.sli4_length = DMP_RGN23_SIZE; in lpfc_sli4_dump_cfg_rg23()
2299 mb->un.varWords[3] = putPaddrLow(mp->phys); in lpfc_sli4_dump_cfg_rg23()
2300 mb->un.varWords[4] = putPaddrHigh(mp->phys); in lpfc_sli4_dump_cfg_rg23()
2307 MAILBOX_t *mb; in lpfc_mbx_cmpl_rdp_link_stat() local
2312 mb = &mboxq->u.mb; in lpfc_mbx_cmpl_rdp_link_stat()
2313 if (mb->mbxStatus) in lpfc_mbx_cmpl_rdp_link_stat()
2316 memcpy(&rdp_context->link_stat, &mb->un.varRdLnk, sizeof(READ_LNK_VAR)); in lpfc_mbx_cmpl_rdp_link_stat()