Lines Matching refs:mqe
356 struct ocrdma_mqe *mqe; in ocrdma_init_emb_mqe() local
358 mqe = kzalloc(sizeof(struct ocrdma_mqe), GFP_KERNEL); in ocrdma_init_emb_mqe()
359 if (!mqe) in ocrdma_init_emb_mqe()
361 mqe->hdr.spcl_sge_cnt_emb |= in ocrdma_init_emb_mqe()
364 mqe->hdr.pyld_len = cmd_len - sizeof(struct ocrdma_mqe_hdr); in ocrdma_init_emb_mqe()
366 ocrdma_init_mch(&mqe->u.emb_req.mch, opcode, OCRDMA_SUBSYS_ROCE, in ocrdma_init_emb_mqe()
367 mqe->hdr.pyld_len); in ocrdma_init_emb_mqe()
368 return mqe; in ocrdma_init_emb_mqe()
1041 struct ocrdma_mqe *mqe; in ocrdma_post_mqe() local
1045 mqe = ocrdma_get_mqe(dev); in ocrdma_post_mqe()
1047 ocrdma_copy_cpu_to_le32(mqe, cmd, sizeof(*mqe)); in ocrdma_post_mqe()
1072 static int ocrdma_mbx_cmd(struct ocrdma_dev *dev, struct ocrdma_mqe *mqe) in ocrdma_mbx_cmd() argument
1082 ocrdma_post_mqe(dev, mqe); in ocrdma_mbx_cmd()
1089 ocrdma_copy_le32_to_cpu(mqe, rsp_mqe, (sizeof(*mqe))); in ocrdma_mbx_cmd()
1090 if ((mqe->hdr.spcl_sge_cnt_emb & OCRDMA_MQE_HDR_EMB_MASK) >> in ocrdma_mbx_cmd()
1092 rsp = &mqe->u.rsp; in ocrdma_mbx_cmd()
1109 if (rsp && (mqe->u.rsp.status & OCRDMA_MBX_RSP_STATUS_MASK)) in ocrdma_mbx_cmd()
1110 status = ocrdma_get_mbx_errno(mqe->u.rsp.status); in ocrdma_mbx_cmd()
1116 static int ocrdma_nonemb_mbx_cmd(struct ocrdma_dev *dev, struct ocrdma_mqe *mqe, in ocrdma_nonemb_mbx_cmd() argument
1122 if ((mqe->hdr.spcl_sge_cnt_emb & OCRDMA_MQE_HDR_EMB_MASK) >> in ocrdma_nonemb_mbx_cmd()
1126 status = ocrdma_mbx_cmd(dev, mqe); in ocrdma_nonemb_mbx_cmd()
1288 struct ocrdma_mqe *mqe = &dev->stats_mem.mqe; in ocrdma_mbx_rdma_stats() local
1296 memset(mqe, 0, sizeof(*mqe)); in ocrdma_mbx_rdma_stats()
1297 mqe->hdr.pyld_len = dev->stats_mem.size; in ocrdma_mbx_rdma_stats()
1298 mqe->hdr.spcl_sge_cnt_emb |= in ocrdma_mbx_rdma_stats()
1301 mqe->u.nonemb_req.sge[0].pa_lo = (u32) (dev->stats_mem.pa & 0xffffffff); in ocrdma_mbx_rdma_stats()
1302 mqe->u.nonemb_req.sge[0].pa_hi = (u32) upper_32_bits(dev->stats_mem.pa); in ocrdma_mbx_rdma_stats()
1303 mqe->u.nonemb_req.sge[0].len = dev->stats_mem.size; in ocrdma_mbx_rdma_stats()
1316 status = ocrdma_nonemb_mbx_cmd(dev, mqe, dev->stats_mem.va); in ocrdma_mbx_rdma_stats()
1331 struct ocrdma_mqe *mqe; in ocrdma_mbx_get_ctrl_attribs() local
1335 mqe = kzalloc(sizeof(struct ocrdma_mqe), GFP_KERNEL); in ocrdma_mbx_get_ctrl_attribs()
1336 if (!mqe) in ocrdma_mbx_get_ctrl_attribs()
1345 mqe->hdr.pyld_len = dma.size; in ocrdma_mbx_get_ctrl_attribs()
1346 mqe->hdr.spcl_sge_cnt_emb |= in ocrdma_mbx_get_ctrl_attribs()
1349 mqe->u.nonemb_req.sge[0].pa_lo = (u32) (dma.pa & 0xffffffff); in ocrdma_mbx_get_ctrl_attribs()
1350 mqe->u.nonemb_req.sge[0].pa_hi = (u32) upper_32_bits(dma.pa); in ocrdma_mbx_get_ctrl_attribs()
1351 mqe->u.nonemb_req.sge[0].len = dma.size; in ocrdma_mbx_get_ctrl_attribs()
1358 status = ocrdma_nonemb_mbx_cmd(dev, mqe, dma.va); in ocrdma_mbx_get_ctrl_attribs()
1372 kfree(mqe); in ocrdma_mbx_get_ctrl_attribs()