Lines Matching refs:mbp
56 csio_mb_fw_retval(struct csio_mb *mbp) in csio_mb_fw_retval() argument
60 hdr = (struct fw_cmd_hdr *)(mbp->mb); in csio_mb_fw_retval()
76 csio_mb_hello(struct csio_hw *hw, struct csio_mb *mbp, uint32_t tmo, in csio_mb_hello() argument
80 struct fw_hello_cmd *cmdp = (struct fw_hello_cmd *)(mbp->mb); in csio_mb_hello()
82 CSIO_INIT_MBP(mbp, cmdp, tmo, hw, cbfn, 1); in csio_mb_hello()
108 csio_mb_process_hello_rsp(struct csio_hw *hw, struct csio_mb *mbp, in csio_mb_process_hello_rsp() argument
112 struct fw_hello_cmd *rsp = (struct fw_hello_cmd *)(mbp->mb); in csio_mb_process_hello_rsp()
140 csio_mb_bye(struct csio_hw *hw, struct csio_mb *mbp, uint32_t tmo, in csio_mb_bye() argument
143 struct fw_bye_cmd *cmdp = (struct fw_bye_cmd *)(mbp->mb); in csio_mb_bye()
145 CSIO_INIT_MBP(mbp, cmdp, tmo, hw, cbfn, 1); in csio_mb_bye()
162 csio_mb_reset(struct csio_hw *hw, struct csio_mb *mbp, uint32_t tmo, in csio_mb_reset() argument
166 struct fw_reset_cmd *cmdp = (struct fw_reset_cmd *)(mbp->mb); in csio_mb_reset()
168 CSIO_INIT_MBP(mbp, cmdp, tmo, hw, cbfn, 1); in csio_mb_reset()
193 csio_mb_params(struct csio_hw *hw, struct csio_mb *mbp, uint32_t tmo, in csio_mb_params() argument
200 struct fw_params_cmd *cmdp = (struct fw_params_cmd *)(mbp->mb); in csio_mb_params()
203 CSIO_INIT_MBP(mbp, cmdp, tmo, hw, cbfn, 1); in csio_mb_params()
240 csio_mb_process_read_params_rsp(struct csio_hw *hw, struct csio_mb *mbp, in csio_mb_process_read_params_rsp() argument
244 struct fw_params_cmd *rsp = (struct fw_params_cmd *)(mbp->mb); in csio_mb_process_read_params_rsp()
264 csio_mb_ldst(struct csio_hw *hw, struct csio_mb *mbp, uint32_t tmo, int reg) in csio_mb_ldst() argument
266 struct fw_ldst_cmd *ldst_cmd = (struct fw_ldst_cmd *)(mbp->mb); in csio_mb_ldst()
267 CSIO_INIT_MBP(mbp, ldst_cmd, tmo, hw, NULL, 1); in csio_mb_ldst()
300 csio_mb_caps_config(struct csio_hw *hw, struct csio_mb *mbp, uint32_t tmo, in csio_mb_caps_config() argument
305 (struct fw_caps_config_cmd *)(mbp->mb); in csio_mb_caps_config()
307 CSIO_INIT_MBP(mbp, cmdp, tmo, hw, cbfn, wr ? 0 : 1); in csio_mb_caps_config()
342 csio_mb_port(struct csio_hw *hw, struct csio_mb *mbp, uint32_t tmo, in csio_mb_port() argument
346 struct fw_port_cmd *cmdp = (struct fw_port_cmd *)(mbp->mb); in csio_mb_port()
348 CSIO_INIT_MBP(mbp, cmdp, tmo, hw, cbfn, 1); in csio_mb_port()
385 csio_mb_process_read_port_rsp(struct csio_hw *hw, struct csio_mb *mbp, in csio_mb_process_read_port_rsp() argument
389 struct fw_port_cmd *rsp = (struct fw_port_cmd *)(mbp->mb); in csio_mb_process_read_port_rsp()
413 csio_mb_initialize(struct csio_hw *hw, struct csio_mb *mbp, uint32_t tmo, in csio_mb_initialize() argument
416 struct fw_initialize_cmd *cmdp = (struct fw_initialize_cmd *)(mbp->mb); in csio_mb_initialize()
418 CSIO_INIT_MBP(mbp, cmdp, tmo, hw, cbfn, 1); in csio_mb_initialize()
440 csio_mb_iq_alloc(struct csio_hw *hw, struct csio_mb *mbp, void *priv, in csio_mb_iq_alloc() argument
444 struct fw_iq_cmd *cmdp = (struct fw_iq_cmd *)(mbp->mb); in csio_mb_iq_alloc()
446 CSIO_INIT_MBP(mbp, cmdp, mb_tmo, priv, cbfn, 1); in csio_mb_iq_alloc()
485 csio_mb_iq_write(struct csio_hw *hw, struct csio_mb *mbp, void *priv, in csio_mb_iq_write() argument
490 struct fw_iq_cmd *cmdp = (struct fw_iq_cmd *)(mbp->mb); in csio_mb_iq_write()
503 CSIO_INIT_MBP(mbp, cmdp, mb_tmo, priv, cbfn, 1); in csio_mb_iq_write()
571 csio_mb_iq_alloc_write(struct csio_hw *hw, struct csio_mb *mbp, void *priv, in csio_mb_iq_alloc_write() argument
575 csio_mb_iq_alloc(hw, mbp, priv, mb_tmo, iq_params, cbfn); in csio_mb_iq_alloc_write()
576 csio_mb_iq_write(hw, mbp, priv, mb_tmo, true, iq_params, cbfn); in csio_mb_iq_alloc_write()
590 csio_mb_iq_alloc_write_rsp(struct csio_hw *hw, struct csio_mb *mbp, in csio_mb_iq_alloc_write_rsp() argument
594 struct fw_iq_cmd *rsp = (struct fw_iq_cmd *)(mbp->mb); in csio_mb_iq_alloc_write_rsp()
622 csio_mb_iq_free(struct csio_hw *hw, struct csio_mb *mbp, void *priv, in csio_mb_iq_free() argument
626 struct fw_iq_cmd *cmdp = (struct fw_iq_cmd *)(mbp->mb); in csio_mb_iq_free()
628 CSIO_INIT_MBP(mbp, cmdp, mb_tmo, priv, cbfn, 1); in csio_mb_iq_free()
658 csio_mb_eq_ofld_alloc(struct csio_hw *hw, struct csio_mb *mbp, void *priv, in csio_mb_eq_ofld_alloc() argument
662 struct fw_eq_ofld_cmd *cmdp = (struct fw_eq_ofld_cmd *)(mbp->mb); in csio_mb_eq_ofld_alloc()
664 CSIO_INIT_MBP(mbp, cmdp, mb_tmo, priv, cbfn, 1); in csio_mb_eq_ofld_alloc()
694 csio_mb_eq_ofld_write(struct csio_hw *hw, struct csio_mb *mbp, void *priv, in csio_mb_eq_ofld_write() argument
699 struct fw_eq_ofld_cmd *cmdp = (struct fw_eq_ofld_cmd *)(mbp->mb); in csio_mb_eq_ofld_write()
711 CSIO_INIT_MBP(mbp, cmdp, mb_tmo, priv, cbfn, 1); in csio_mb_eq_ofld_write()
755 csio_mb_eq_ofld_alloc_write(struct csio_hw *hw, struct csio_mb *mbp, in csio_mb_eq_ofld_alloc_write() argument
760 csio_mb_eq_ofld_alloc(hw, mbp, priv, mb_tmo, eq_ofld_params, cbfn); in csio_mb_eq_ofld_alloc_write()
761 csio_mb_eq_ofld_write(hw, mbp, priv, mb_tmo, true, in csio_mb_eq_ofld_alloc_write()
777 struct csio_mb *mbp, enum fw_retval *ret_val, in csio_mb_eq_ofld_alloc_write_rsp() argument
780 struct fw_eq_ofld_cmd *rsp = (struct fw_eq_ofld_cmd *)(mbp->mb); in csio_mb_eq_ofld_alloc_write_rsp()
808 csio_mb_eq_ofld_free(struct csio_hw *hw, struct csio_mb *mbp, void *priv, in csio_mb_eq_ofld_free() argument
812 struct fw_eq_ofld_cmd *cmdp = (struct fw_eq_ofld_cmd *)(mbp->mb); in csio_mb_eq_ofld_free()
814 CSIO_INIT_MBP(mbp, cmdp, mb_tmo, priv, cbfn, 1); in csio_mb_eq_ofld_free()
838 csio_write_fcoe_link_cond_init_mb(struct csio_lnode *ln, struct csio_mb *mbp, in csio_write_fcoe_link_cond_init_mb() argument
844 (struct fw_fcoe_link_cmd *)(mbp->mb); in csio_write_fcoe_link_cond_init_mb()
846 CSIO_INIT_MBP(mbp, cmdp, mb_tmo, ln, cbfn, 1); in csio_write_fcoe_link_cond_init_mb()
873 csio_fcoe_read_res_info_init_mb(struct csio_hw *hw, struct csio_mb *mbp, in csio_fcoe_read_res_info_init_mb() argument
878 (struct fw_fcoe_res_info_cmd *)(mbp->mb); in csio_fcoe_read_res_info_init_mb()
880 CSIO_INIT_MBP(mbp, cmdp, mb_tmo, hw, cbfn, 1); in csio_fcoe_read_res_info_init_mb()
907 csio_fcoe_vnp_alloc_init_mb(struct csio_lnode *ln, struct csio_mb *mbp, in csio_fcoe_vnp_alloc_init_mb() argument
913 (struct fw_fcoe_vnp_cmd *)(mbp->mb); in csio_fcoe_vnp_alloc_init_mb()
915 CSIO_INIT_MBP(mbp, cmdp, mb_tmo, ln, cbfn, 1); in csio_fcoe_vnp_alloc_init_mb()
949 csio_fcoe_vnp_read_init_mb(struct csio_lnode *ln, struct csio_mb *mbp, in csio_fcoe_vnp_read_init_mb() argument
954 (struct fw_fcoe_vnp_cmd *)(mbp->mb); in csio_fcoe_vnp_read_init_mb()
956 CSIO_INIT_MBP(mbp, cmdp, mb_tmo, ln, cbfn, 1); in csio_fcoe_vnp_read_init_mb()
978 csio_fcoe_vnp_free_init_mb(struct csio_lnode *ln, struct csio_mb *mbp, in csio_fcoe_vnp_free_init_mb() argument
983 (struct fw_fcoe_vnp_cmd *)(mbp->mb); in csio_fcoe_vnp_free_init_mb()
985 CSIO_INIT_MBP(mbp, cmdp, mb_tmo, ln, cbfn, 1); in csio_fcoe_vnp_free_init_mb()
1009 csio_fcoe_read_fcf_init_mb(struct csio_lnode *ln, struct csio_mb *mbp, in csio_fcoe_read_fcf_init_mb() argument
1014 (struct fw_fcoe_fcf_cmd *)(mbp->mb); in csio_fcoe_read_fcf_init_mb()
1016 CSIO_INIT_MBP(mbp, cmdp, mb_tmo, ln, cbfn, 1); in csio_fcoe_read_fcf_init_mb()
1027 csio_fcoe_read_portparams_init_mb(struct csio_hw *hw, struct csio_mb *mbp, in csio_fcoe_read_portparams_init_mb() argument
1033 struct fw_fcoe_stats_cmd *cmdp = (struct fw_fcoe_stats_cmd *)(mbp->mb); in csio_fcoe_read_portparams_init_mb()
1035 CSIO_INIT_MBP(mbp, cmdp, mb_tmo, hw, cbfn, 1); in csio_fcoe_read_portparams_init_mb()
1036 mbp->mb_size = 64; in csio_fcoe_read_portparams_init_mb()
1052 struct csio_mb *mbp, in csio_mb_process_portparams_rsp() argument
1057 struct fw_fcoe_stats_cmd *rsp = (struct fw_fcoe_stats_cmd *)(mbp->mb); in csio_mb_process_portparams_rsp()
1188 csio_mb_issue(struct csio_hw *hw, struct csio_mb *mbp) in csio_mb_issue() argument
1193 __be64 *cmd = mbp->mb; in csio_mb_issue()
1198 int size = mbp->mb_size; in csio_mb_issue()
1203 if (mbp->mb_cbfn == NULL) { in csio_mb_issue()
1205 if (mbp->tmo < CSIO_MB_POLL_FREQ) { in csio_mb_issue()
1206 csio_err(hw, "Invalid tmo: 0x%x\n", mbp->tmo); in csio_mb_issue()
1212 *((uint8_t *)mbp->mb)); in csio_mb_issue()
1218 if (mbp->mb_cbfn == NULL) { in csio_mb_issue()
1221 hw->pfn, *((uint8_t *)mbp->mb)); in csio_mb_issue()
1225 list_add_tail(&mbp->list, &mbm->req_q); in csio_mb_issue()
1244 if (mbp->mb_cbfn == NULL) { in csio_mb_issue()
1250 hw->pfn, *((uint8_t *)mbp->mb), owner); in csio_mb_issue()
1257 hw->pfn, *((uint8_t *)mbp->mb), in csio_mb_issue()
1277 if (mbp->mb_cbfn != NULL) { in csio_mb_issue()
1278 mbm->mcurrent = mbp; in csio_mb_issue()
1279 mod_timer(&mbm->timer, jiffies + msecs_to_jiffies(mbp->tmo)); in csio_mb_issue()
1292 if (mbp->mb_cbfn) in csio_mb_issue()
1296 cmd = mbp->mb; in csio_mb_issue()
1298 for (ii = 0; ii < mbp->tmo; ii += CSIO_MB_POLL_FREQ) { in csio_mb_issue()
1327 if (csio_mb_fw_retval(mbp) != FW_SUCCESS) in csio_mb_issue()
1356 struct csio_mb *mbp; in csio_mb_completions() local
1361 mbp = list_first_entry(cbfn_q, struct csio_mb, list); in csio_mb_completions()
1362 list_del_init(&mbp->list); in csio_mb_completions()
1364 rv = csio_mb_fw_retval(mbp); in csio_mb_completions()
1370 if (mbp->mb_cbfn) in csio_mb_completions()
1371 mbp->mb_cbfn(hw, mbp); in csio_mb_completions()
1475 struct csio_mb *mbp = mbm->mcurrent; in csio_mb_isr_handler() local
1531 CSIO_ASSERT(mbp != NULL); in csio_mb_isr_handler()
1533 cmd = mbp->mb; in csio_mb_isr_handler()
1534 size = mbp->mb_size; in csio_mb_isr_handler()
1547 list_add_tail(&mbp->list, &mbm->cbfn_q); in csio_mb_isr_handler()
1554 if (csio_enqueue_evt(hw, CSIO_EVT_MBX, mbp, sizeof(mbp))) in csio_mb_isr_handler()
1579 struct csio_mb *mbp = mbm->mcurrent; in csio_mb_tmo_handler() local
1586 if (mbp == NULL) { in csio_mb_tmo_handler()
1591 fw_hdr = (struct fw_cmd_hdr *)(mbp->mb); in csio_mb_tmo_handler()
1600 return mbp; in csio_mb_tmo_handler()
1613 struct csio_mb *mbp; in csio_mb_cancel_all() local
1619 mbp = mbm->mcurrent; in csio_mb_cancel_all()
1625 list_add_tail(&mbp->list, cbfn_q); in csio_mb_cancel_all()
1643 mbp = (struct csio_mb *)tmp; in csio_mb_cancel_all()
1644 hdr = (struct fw_cmd_hdr *)(mbp->mb); in csio_mb_cancel_all()