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