Lines Matching refs:mrw

501 int bnxt_qplib_free_mrw(struct bnxt_qplib_res *res, struct bnxt_qplib_mrw *mrw)  in bnxt_qplib_free_mrw()  argument
509 if (mrw->lkey == 0xFFFFFFFF) { in bnxt_qplib_free_mrw()
518 req.mrw_flags = mrw->type; in bnxt_qplib_free_mrw()
520 if ((mrw->type == CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE1) || in bnxt_qplib_free_mrw()
521 (mrw->type == CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE2A) || in bnxt_qplib_free_mrw()
522 (mrw->type == CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE2B)) in bnxt_qplib_free_mrw()
523 req.key = cpu_to_le32(mrw->rkey); in bnxt_qplib_free_mrw()
525 req.key = cpu_to_le32(mrw->lkey); in bnxt_qplib_free_mrw()
534 if (mrw->hwq.max_elements) in bnxt_qplib_free_mrw()
535 bnxt_qplib_free_hwq(res, &mrw->hwq); in bnxt_qplib_free_mrw()
540 int bnxt_qplib_alloc_mrw(struct bnxt_qplib_res *res, struct bnxt_qplib_mrw *mrw) in bnxt_qplib_alloc_mrw() argument
553 req.pd_id = cpu_to_le32(mrw->pd->id); in bnxt_qplib_alloc_mrw()
554 req.mrw_flags = mrw->type; in bnxt_qplib_alloc_mrw()
555 if ((mrw->type == CMDQ_ALLOCATE_MRW_MRW_FLAGS_PMR && in bnxt_qplib_alloc_mrw()
556 mrw->access_flags & BNXT_QPLIB_FR_PMR) || in bnxt_qplib_alloc_mrw()
557 mrw->type == CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE2A || in bnxt_qplib_alloc_mrw()
558 mrw->type == CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE2B) in bnxt_qplib_alloc_mrw()
560 tmp = (unsigned long)mrw; in bnxt_qplib_alloc_mrw()
569 if ((mrw->type == CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE1) || in bnxt_qplib_alloc_mrw()
570 (mrw->type == CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE2A) || in bnxt_qplib_alloc_mrw()
571 (mrw->type == CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE2B)) in bnxt_qplib_alloc_mrw()
572 mrw->rkey = le32_to_cpu(resp.xid); in bnxt_qplib_alloc_mrw()
574 mrw->lkey = le32_to_cpu(resp.xid); in bnxt_qplib_alloc_mrw()
578 int bnxt_qplib_dereg_mrw(struct bnxt_qplib_res *res, struct bnxt_qplib_mrw *mrw, in bnxt_qplib_dereg_mrw() argument
591 req.lkey = cpu_to_le32(mrw->lkey); in bnxt_qplib_dereg_mrw()
599 if (mrw->hwq.max_elements) { in bnxt_qplib_dereg_mrw()
600 mrw->va = 0; in bnxt_qplib_dereg_mrw()
601 mrw->total_size = 0; in bnxt_qplib_dereg_mrw()
602 bnxt_qplib_free_hwq(res, &mrw->hwq); in bnxt_qplib_dereg_mrw()