Lines Matching refs:mqe

336 	struct ocrdma_mqe *mqe;  in ocrdma_init_emb_mqe()  local
338 mqe = kzalloc(sizeof(struct ocrdma_mqe), GFP_KERNEL); in ocrdma_init_emb_mqe()
339 if (!mqe) in ocrdma_init_emb_mqe()
341 mqe->hdr.spcl_sge_cnt_emb |= in ocrdma_init_emb_mqe()
344 mqe->hdr.pyld_len = cmd_len - sizeof(struct ocrdma_mqe_hdr); in ocrdma_init_emb_mqe()
346 ocrdma_init_mch(&mqe->u.emb_req.mch, opcode, OCRDMA_SUBSYS_ROCE, in ocrdma_init_emb_mqe()
347 mqe->hdr.pyld_len); in ocrdma_init_emb_mqe()
348 return mqe; in ocrdma_init_emb_mqe()
976 struct ocrdma_mqe *mqe; in ocrdma_post_mqe() local
980 mqe = ocrdma_get_mqe(dev); in ocrdma_post_mqe()
982 ocrdma_copy_cpu_to_le32(mqe, cmd, sizeof(*mqe)); in ocrdma_post_mqe()
1007 static int ocrdma_mbx_cmd(struct ocrdma_dev *dev, struct ocrdma_mqe *mqe) in ocrdma_mbx_cmd() argument
1017 ocrdma_post_mqe(dev, mqe); in ocrdma_mbx_cmd()
1024 ocrdma_copy_le32_to_cpu(mqe, rsp_mqe, (sizeof(*mqe))); in ocrdma_mbx_cmd()
1025 if ((mqe->hdr.spcl_sge_cnt_emb & OCRDMA_MQE_HDR_EMB_MASK) >> in ocrdma_mbx_cmd()
1027 rsp = &mqe->u.rsp; in ocrdma_mbx_cmd()
1044 if (rsp && (mqe->u.rsp.status & OCRDMA_MBX_RSP_STATUS_MASK)) in ocrdma_mbx_cmd()
1045 status = ocrdma_get_mbx_errno(mqe->u.rsp.status); in ocrdma_mbx_cmd()
1051 static int ocrdma_nonemb_mbx_cmd(struct ocrdma_dev *dev, struct ocrdma_mqe *mqe, in ocrdma_nonemb_mbx_cmd() argument
1057 if ((mqe->hdr.spcl_sge_cnt_emb & OCRDMA_MQE_HDR_EMB_MASK) >> in ocrdma_nonemb_mbx_cmd()
1061 status = ocrdma_mbx_cmd(dev, mqe); in ocrdma_nonemb_mbx_cmd()
1221 struct ocrdma_mqe *mqe = &dev->stats_mem.mqe; in ocrdma_mbx_rdma_stats() local
1229 memset(mqe, 0, sizeof(*mqe)); in ocrdma_mbx_rdma_stats()
1230 mqe->hdr.pyld_len = dev->stats_mem.size; in ocrdma_mbx_rdma_stats()
1231 mqe->hdr.spcl_sge_cnt_emb |= in ocrdma_mbx_rdma_stats()
1234 mqe->u.nonemb_req.sge[0].pa_lo = (u32) (dev->stats_mem.pa & 0xffffffff); in ocrdma_mbx_rdma_stats()
1235 mqe->u.nonemb_req.sge[0].pa_hi = (u32) upper_32_bits(dev->stats_mem.pa); in ocrdma_mbx_rdma_stats()
1236 mqe->u.nonemb_req.sge[0].len = dev->stats_mem.size; in ocrdma_mbx_rdma_stats()
1249 status = ocrdma_nonemb_mbx_cmd(dev, mqe, dev->stats_mem.va); in ocrdma_mbx_rdma_stats()
1264 struct ocrdma_mqe *mqe; in ocrdma_mbx_get_ctrl_attribs() local
1268 mqe = kzalloc(sizeof(struct ocrdma_mqe), GFP_KERNEL); in ocrdma_mbx_get_ctrl_attribs()
1269 if (!mqe) in ocrdma_mbx_get_ctrl_attribs()
1278 mqe->hdr.pyld_len = dma.size; in ocrdma_mbx_get_ctrl_attribs()
1279 mqe->hdr.spcl_sge_cnt_emb |= in ocrdma_mbx_get_ctrl_attribs()
1282 mqe->u.nonemb_req.sge[0].pa_lo = (u32) (dma.pa & 0xffffffff); in ocrdma_mbx_get_ctrl_attribs()
1283 mqe->u.nonemb_req.sge[0].pa_hi = (u32) upper_32_bits(dma.pa); in ocrdma_mbx_get_ctrl_attribs()
1284 mqe->u.nonemb_req.sge[0].len = dma.size; in ocrdma_mbx_get_ctrl_attribs()
1292 status = ocrdma_nonemb_mbx_cmd(dev, mqe, dma.va); in ocrdma_mbx_get_ctrl_attribs()
1305 kfree(mqe); in ocrdma_mbx_get_ctrl_attribs()