Lines Matching refs:mqe
352 struct ocrdma_mqe *mqe; in ocrdma_init_emb_mqe() local
354 mqe = kzalloc(sizeof(struct ocrdma_mqe), GFP_KERNEL); in ocrdma_init_emb_mqe()
355 if (!mqe) in ocrdma_init_emb_mqe()
357 mqe->hdr.spcl_sge_cnt_emb |= in ocrdma_init_emb_mqe()
360 mqe->hdr.pyld_len = cmd_len - sizeof(struct ocrdma_mqe_hdr); in ocrdma_init_emb_mqe()
362 ocrdma_init_mch(&mqe->u.emb_req.mch, opcode, OCRDMA_SUBSYS_ROCE, in ocrdma_init_emb_mqe()
363 mqe->hdr.pyld_len); in ocrdma_init_emb_mqe()
364 return mqe; in ocrdma_init_emb_mqe()
1038 struct ocrdma_mqe *mqe; in ocrdma_post_mqe() local
1042 mqe = ocrdma_get_mqe(dev); in ocrdma_post_mqe()
1044 ocrdma_copy_cpu_to_le32(mqe, cmd, sizeof(*mqe)); in ocrdma_post_mqe()
1069 static int ocrdma_mbx_cmd(struct ocrdma_dev *dev, struct ocrdma_mqe *mqe) in ocrdma_mbx_cmd() argument
1079 ocrdma_post_mqe(dev, mqe); in ocrdma_mbx_cmd()
1086 ocrdma_copy_le32_to_cpu(mqe, rsp_mqe, (sizeof(*mqe))); in ocrdma_mbx_cmd()
1087 if ((mqe->hdr.spcl_sge_cnt_emb & OCRDMA_MQE_HDR_EMB_MASK) >> in ocrdma_mbx_cmd()
1089 rsp = &mqe->u.rsp; in ocrdma_mbx_cmd()
1106 if (rsp && (mqe->u.rsp.status & OCRDMA_MBX_RSP_STATUS_MASK)) in ocrdma_mbx_cmd()
1107 status = ocrdma_get_mbx_errno(mqe->u.rsp.status); in ocrdma_mbx_cmd()
1113 static int ocrdma_nonemb_mbx_cmd(struct ocrdma_dev *dev, struct ocrdma_mqe *mqe, in ocrdma_nonemb_mbx_cmd() argument
1119 if ((mqe->hdr.spcl_sge_cnt_emb & OCRDMA_MQE_HDR_EMB_MASK) >> in ocrdma_nonemb_mbx_cmd()
1123 status = ocrdma_mbx_cmd(dev, mqe); in ocrdma_nonemb_mbx_cmd()
1283 struct ocrdma_mqe *mqe = &dev->stats_mem.mqe; in ocrdma_mbx_rdma_stats() local
1291 memset(mqe, 0, sizeof(*mqe)); in ocrdma_mbx_rdma_stats()
1292 mqe->hdr.pyld_len = dev->stats_mem.size; in ocrdma_mbx_rdma_stats()
1293 mqe->hdr.spcl_sge_cnt_emb |= in ocrdma_mbx_rdma_stats()
1296 mqe->u.nonemb_req.sge[0].pa_lo = (u32) (dev->stats_mem.pa & 0xffffffff); in ocrdma_mbx_rdma_stats()
1297 mqe->u.nonemb_req.sge[0].pa_hi = (u32) upper_32_bits(dev->stats_mem.pa); in ocrdma_mbx_rdma_stats()
1298 mqe->u.nonemb_req.sge[0].len = dev->stats_mem.size; in ocrdma_mbx_rdma_stats()
1311 status = ocrdma_nonemb_mbx_cmd(dev, mqe, dev->stats_mem.va); in ocrdma_mbx_rdma_stats()
1326 struct ocrdma_mqe *mqe; in ocrdma_mbx_get_ctrl_attribs() local
1330 mqe = kzalloc(sizeof(struct ocrdma_mqe), GFP_KERNEL); in ocrdma_mbx_get_ctrl_attribs()
1331 if (!mqe) in ocrdma_mbx_get_ctrl_attribs()
1340 mqe->hdr.pyld_len = dma.size; in ocrdma_mbx_get_ctrl_attribs()
1341 mqe->hdr.spcl_sge_cnt_emb |= in ocrdma_mbx_get_ctrl_attribs()
1344 mqe->u.nonemb_req.sge[0].pa_lo = (u32) (dma.pa & 0xffffffff); in ocrdma_mbx_get_ctrl_attribs()
1345 mqe->u.nonemb_req.sge[0].pa_hi = (u32) upper_32_bits(dma.pa); in ocrdma_mbx_get_ctrl_attribs()
1346 mqe->u.nonemb_req.sge[0].len = dma.size; in ocrdma_mbx_get_ctrl_attribs()
1354 status = ocrdma_nonemb_mbx_cmd(dev, mqe, dma.va); in ocrdma_mbx_get_ctrl_attribs()
1367 kfree(mqe); in ocrdma_mbx_get_ctrl_attribs()