Lines Matching refs: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()
520 mb->un.varInitLnk.link_flags & FLAGS_TOPOLOGY_MODE_LOOP) { in lpfc_init_link()
521 mb->un.varInitLnk.link_flags = FLAGS_TOPOLOGY_MODE_PT_PT; in lpfc_init_link()
527 mb->un.varInitLnk.link_flags |= FLAGS_IMED_ABORT; in lpfc_init_link()
536 mb->un.varInitLnk.link_flags |= FLAGS_LINK_SPEED; in lpfc_init_link()
537 mb->un.varInitLnk.link_speed = LINK_SPEED_1G; in lpfc_init_link()
540 mb->un.varInitLnk.link_flags |= FLAGS_LINK_SPEED; in lpfc_init_link()
541 mb->un.varInitLnk.link_speed = LINK_SPEED_2G; in lpfc_init_link()
544 mb->un.varInitLnk.link_flags |= FLAGS_LINK_SPEED; in lpfc_init_link()
545 mb->un.varInitLnk.link_speed = LINK_SPEED_4G; in lpfc_init_link()
548 mb->un.varInitLnk.link_flags |= FLAGS_LINK_SPEED; in lpfc_init_link()
549 mb->un.varInitLnk.link_speed = LINK_SPEED_8G; in lpfc_init_link()
552 mb->un.varInitLnk.link_flags |= FLAGS_LINK_SPEED; in lpfc_init_link()
553 mb->un.varInitLnk.link_speed = LINK_SPEED_10G; in lpfc_init_link()
556 mb->un.varInitLnk.link_flags |= FLAGS_LINK_SPEED; in lpfc_init_link()
557 mb->un.varInitLnk.link_speed = LINK_SPEED_16G; in lpfc_init_link()
560 mb->un.varInitLnk.link_flags |= FLAGS_LINK_SPEED; in lpfc_init_link()
561 mb->un.varInitLnk.link_speed = LINK_SPEED_32G; in lpfc_init_link()
564 mb->un.varInitLnk.link_flags |= FLAGS_LINK_SPEED; in lpfc_init_link()
565 mb->un.varInitLnk.link_speed = LINK_SPEED_64G; in lpfc_init_link()
569 mb->un.varInitLnk.link_speed = LINK_SPEED_AUTO; in lpfc_init_link()
575 mb->un.varInitLnk.link_speed = LINK_SPEED_AUTO; in lpfc_init_link()
577 mb->mbxCommand = (volatile uint8_t)MBX_INIT_LINK; in lpfc_init_link()
578 mb->mbxOwner = OWN_HOST; in lpfc_init_link()
579 mb->un.varInitLnk.fabric_AL_PA = phba->fc_pref_ALPA; in lpfc_init_link()
608 MAILBOX_t *mb; in lpfc_read_sparam() local
610 mb = &pmb->u.mb; in lpfc_read_sparam()
613 mb->mbxOwner = OWN_HOST; in lpfc_read_sparam()
622 mb->mbxCommand = MBX_READ_SPARM64; in lpfc_read_sparam()
629 mb->mbxCommand = MBX_READ_SPARM64; in lpfc_read_sparam()
630 mb->un.varRdSparm.un.sp64.tus.f.bdeSize = sizeof (struct serv_parm); in lpfc_read_sparam()
631 mb->un.varRdSparm.un.sp64.addrHigh = putPaddrHigh(mp->phys); in lpfc_read_sparam()
632 mb->un.varRdSparm.un.sp64.addrLow = putPaddrLow(mp->phys); in lpfc_read_sparam()
634 mb->un.varRdSparm.vpi = phba->vpi_ids[vpi]; in lpfc_read_sparam()
661 MAILBOX_t *mb; in lpfc_unreg_did() local
663 mb = &pmb->u.mb; in lpfc_unreg_did()
666 mb->un.varUnregDID.did = did; in lpfc_unreg_did()
667 mb->un.varUnregDID.vpi = vpi; in lpfc_unreg_did()
670 mb->un.varUnregDID.vpi = phba->vpi_ids[vpi]; in lpfc_unreg_did()
672 mb->mbxCommand = MBX_UNREG_D_ID; in lpfc_unreg_did()
673 mb->mbxOwner = OWN_HOST; in lpfc_unreg_did()
693 MAILBOX_t *mb; in lpfc_read_config() local
695 mb = &pmb->u.mb; in lpfc_read_config()
698 mb->mbxCommand = MBX_READ_CONFIG; in lpfc_read_config()
699 mb->mbxOwner = OWN_HOST; in lpfc_read_config()
718 MAILBOX_t *mb; in lpfc_read_lnk_stat() local
720 mb = &pmb->u.mb; in lpfc_read_lnk_stat()
723 mb->mbxCommand = MBX_READ_LNK_STAT; in lpfc_read_lnk_stat()
724 mb->mbxOwner = OWN_HOST; in lpfc_read_lnk_stat()
756 MAILBOX_t *mb = &pmb->u.mb; in lpfc_reg_rpi() local
762 mb->un.varRegLogin.rpi = 0; in lpfc_reg_rpi()
764 mb->un.varRegLogin.rpi = phba->sli4_hba.rpi_ids[rpi]; in lpfc_reg_rpi()
766 mb->un.varRegLogin.vpi = phba->vpi_ids[vpi]; in lpfc_reg_rpi()
767 mb->un.varRegLogin.did = did; in lpfc_reg_rpi()
768 mb->mbxOwner = OWN_HOST; in lpfc_reg_rpi()
775 mb->mbxCommand = MBX_REG_LOGIN64; in lpfc_reg_rpi()
791 mb->mbxCommand = MBX_REG_LOGIN64; in lpfc_reg_rpi()
792 mb->un.varRegLogin.un.sp64.tus.f.bdeSize = sizeof (struct serv_parm); in lpfc_reg_rpi()
793 mb->un.varRegLogin.un.sp64.addrHigh = putPaddrHigh(mp->phys); in lpfc_reg_rpi()
794 mb->un.varRegLogin.un.sp64.addrLow = putPaddrLow(mp->phys); in lpfc_reg_rpi()
820 MAILBOX_t *mb; in lpfc_unreg_login() local
822 mb = &pmb->u.mb; in lpfc_unreg_login()
825 mb->un.varUnregLogin.rpi = rpi; in lpfc_unreg_login()
826 mb->un.varUnregLogin.rsvd1 = 0; in lpfc_unreg_login()
828 mb->un.varUnregLogin.vpi = phba->vpi_ids[vpi]; in lpfc_unreg_login()
830 mb->mbxCommand = MBX_UNREG_LOGIN; in lpfc_unreg_login()
831 mb->mbxOwner = OWN_HOST; in lpfc_unreg_login()
861 mbox->u.mb.un.varUnregLogin.rsvd1 = 0x4000; in lpfc_sli4_unreg_all_rpis()
887 MAILBOX_t *mb = &pmb->u.mb; in lpfc_reg_vpi() local
896 mb->un.varRegVpi.upd = 1; in lpfc_reg_vpi()
898 mb->un.varRegVpi.vpi = phba->vpi_ids[vport->vpi]; in lpfc_reg_vpi()
899 mb->un.varRegVpi.sid = vport->fc_myDID; in lpfc_reg_vpi()
901 mb->un.varRegVpi.vfi = phba->sli4_hba.vfi_ids[vport->vfi]; in lpfc_reg_vpi()
903 mb->un.varRegVpi.vfi = vport->vfi + vport->phba->vfi_base; in lpfc_reg_vpi()
904 memcpy(mb->un.varRegVpi.wwn, &vport->fc_portname, in lpfc_reg_vpi()
906 mb->un.varRegVpi.wwn[0] = cpu_to_le32(mb->un.varRegVpi.wwn[0]); in lpfc_reg_vpi()
907 mb->un.varRegVpi.wwn[1] = cpu_to_le32(mb->un.varRegVpi.wwn[1]); in lpfc_reg_vpi()
909 mb->mbxCommand = MBX_REG_VPI; in lpfc_reg_vpi()
910 mb->mbxOwner = OWN_HOST; in lpfc_reg_vpi()
934 MAILBOX_t *mb = &pmb->u.mb; in lpfc_unreg_vpi() local
938 mb->un.varUnregVpi.vpi = phba->vpi_ids[vpi]; in lpfc_unreg_vpi()
940 mb->un.varUnregVpi.sli4_vpi = phba->vpi_ids[vpi]; in lpfc_unreg_vpi()
942 mb->mbxCommand = MBX_UNREG_VPI; in lpfc_unreg_vpi()
943 mb->mbxOwner = OWN_HOST; in lpfc_unreg_vpi()
1032 MAILBOX_t *mb = &pmb->u.mb; in lpfc_read_rev() local
1034 mb->un.varRdRev.cv = 1; in lpfc_read_rev()
1035 mb->un.varRdRev.v3req = 1; /* Request SLI3 info */ in lpfc_read_rev()
1036 mb->mbxCommand = MBX_READ_REV; in lpfc_read_rev()
1037 mb->mbxOwner = OWN_HOST; in lpfc_read_rev()
1044 MAILBOX_t *mb = &pmb->u.mb; in lpfc_sli4_swap_str() local
1047 switch (mb->mbxCommand) { in lpfc_sli4_swap_str()
1145 MAILBOX_t *mb = &pmb->u.mb; in lpfc_config_hbq() local
1146 struct config_hbq_var *hbqmb = &mb->un.varCfgHbq; in lpfc_config_hbq()
1171 mb->mbxCommand = MBX_CONFIG_HBQ; in lpfc_config_hbq()
1172 mb->mbxOwner = OWN_HOST; in lpfc_config_hbq()
1220 MAILBOX_t *mb = &pmb->u.mb; in lpfc_config_ring() local
1226 mb->un.varCfgRing.ring = ring; in lpfc_config_ring()
1227 mb->un.varCfgRing.maxOrigXchg = 0; in lpfc_config_ring()
1228 mb->un.varCfgRing.maxRespXchg = 0; in lpfc_config_ring()
1229 mb->un.varCfgRing.recvNotify = 1; in lpfc_config_ring()
1233 mb->un.varCfgRing.numMask = pring->num_mask; in lpfc_config_ring()
1234 mb->mbxCommand = MBX_CONFIG_RING; in lpfc_config_ring()
1235 mb->mbxOwner = OWN_HOST; in lpfc_config_ring()
1239 mb->un.varCfgRing.profile = pring->prt[0].profile; in lpfc_config_ring()
1245 mb->un.varCfgRing.rrRegs[i].rval = pring->prt[i].rctl; in lpfc_config_ring()
1246 if (mb->un.varCfgRing.rrRegs[i].rval != FC_RCTL_ELS_REQ) in lpfc_config_ring()
1247 mb->un.varCfgRing.rrRegs[i].rmask = 0xff; in lpfc_config_ring()
1249 mb->un.varCfgRing.rrRegs[i].rmask = 0xfe; in lpfc_config_ring()
1250 mb->un.varCfgRing.rrRegs[i].tval = pring->prt[i].type; in lpfc_config_ring()
1251 mb->un.varCfgRing.rrRegs[i].tmask = 0xff; in lpfc_config_ring()
1275 MAILBOX_t *mb = &pmb->u.mb; in lpfc_config_port() local
1284 mb->mbxCommand = MBX_CONFIG_PORT; in lpfc_config_port()
1285 mb->mbxOwner = OWN_HOST; in lpfc_config_port()
1287 mb->un.varCfgPort.pcbLen = sizeof(PCB_t); in lpfc_config_port()
1291 mb->un.varCfgPort.pcbLow = putPaddrLow(pdma_addr); in lpfc_config_port()
1292 mb->un.varCfgPort.pcbHigh = putPaddrHigh(pdma_addr); in lpfc_config_port()
1295 mb->un.varCfgPort.hps = 1; in lpfc_config_port()
1301 mb->un.varCfgPort.cbg = 1; /* configure BlockGuard */ in lpfc_config_port()
1302 mb->un.varCfgPort.cerbm = 1; /* Request HBQs */ in lpfc_config_port()
1303 mb->un.varCfgPort.ccrp = 1; /* Command Ring Polling */ in lpfc_config_port()
1304 mb->un.varCfgPort.max_hbq = lpfc_sli_hbq_count(); in lpfc_config_port()
1307 mb->un.varCfgPort.max_vpi = LPFC_MAX_VPI; in lpfc_config_port()
1308 mb->un.varCfgPort.cmv = 1; in lpfc_config_port()
1310 mb->un.varCfgPort.max_vpi = phba->max_vpi = 0; in lpfc_config_port()
1313 mb->un.varCfgPort.sli_mode = phba->sli_rev; in lpfc_config_port()
1317 mb->un.varCfgPort.casabt = 1; in lpfc_config_port()
1391 mb->un.varCfgPort.hps = 1; in lpfc_config_port()
1437 memcpy(&mb->un.varCfgPort.hbainit, hbainit, 20); in lpfc_config_port()
1462 MAILBOX_t *mb = &pmb->u.mb; in lpfc_kill_board() local
1465 mb->mbxCommand = MBX_KILL_BOARD; in lpfc_kill_board()
1466 mb->mbxOwner = OWN_HOST; in lpfc_kill_board()
1581 mboxq->u.mb.mbxCommand); in lpfc_mbox_cmd_check()
1627 MAILBOX_t *mbox = &mboxq->u.mb; in lpfc_mbox_tmo_val()
1964 if (mbox->u.mb.mbxCommand != MBX_SLI4_CONFIG) in lpfc_sli_config_mbox_subsys_get()
1997 if (mbox->u.mb.mbxCommand != MBX_SLI4_CONFIG) in lpfc_sli_config_mbox_opcode_get()
2279 MAILBOX_t *mb; in lpfc_sli4_dump_cfg_rg23() local
2282 mb = &mbox->u.mb; in lpfc_sli4_dump_cfg_rg23()
2303 mb->mbxCommand = MBX_DUMP_MEMORY; in lpfc_sli4_dump_cfg_rg23()
2304 mb->un.varDmp.type = DMP_NV_PARAMS; in lpfc_sli4_dump_cfg_rg23()
2305 mb->un.varDmp.region_id = DMP_REGION_23; in lpfc_sli4_dump_cfg_rg23()
2306 mb->un.varDmp.sli4_length = DMP_RGN23_SIZE; in lpfc_sli4_dump_cfg_rg23()
2307 mb->un.varWords[3] = putPaddrLow(mp->phys); in lpfc_sli4_dump_cfg_rg23()
2308 mb->un.varWords[4] = putPaddrHigh(mp->phys); in lpfc_sli4_dump_cfg_rg23()
2315 MAILBOX_t *mb; in lpfc_mbx_cmpl_rdp_link_stat() local
2320 mb = &mboxq->u.mb; in lpfc_mbx_cmpl_rdp_link_stat()
2321 if (mb->mbxStatus) in lpfc_mbx_cmpl_rdp_link_stat()
2324 memcpy(&rdp_context->link_stat, &mb->un.varRdLnk, sizeof(READ_LNK_VAR)); in lpfc_mbx_cmpl_rdp_link_stat()