Lines Matching refs:mrw

487 int bnxt_qplib_free_mrw(struct bnxt_qplib_res *res, struct bnxt_qplib_mrw *mrw)  in bnxt_qplib_free_mrw()  argument
495 if (mrw->lkey == 0xFFFFFFFF) { in bnxt_qplib_free_mrw()
504 req.mrw_flags = mrw->type; in bnxt_qplib_free_mrw()
506 if ((mrw->type == CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE1) || in bnxt_qplib_free_mrw()
507 (mrw->type == CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE2A) || in bnxt_qplib_free_mrw()
508 (mrw->type == CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE2B)) in bnxt_qplib_free_mrw()
509 req.key = cpu_to_le32(mrw->rkey); in bnxt_qplib_free_mrw()
511 req.key = cpu_to_le32(mrw->lkey); in bnxt_qplib_free_mrw()
520 if (mrw->hwq.max_elements) in bnxt_qplib_free_mrw()
521 bnxt_qplib_free_hwq(res, &mrw->hwq); in bnxt_qplib_free_mrw()
526 int bnxt_qplib_alloc_mrw(struct bnxt_qplib_res *res, struct bnxt_qplib_mrw *mrw) in bnxt_qplib_alloc_mrw() argument
539 req.pd_id = cpu_to_le32(mrw->pd->id); in bnxt_qplib_alloc_mrw()
540 req.mrw_flags = mrw->type; in bnxt_qplib_alloc_mrw()
541 if ((mrw->type == CMDQ_ALLOCATE_MRW_MRW_FLAGS_PMR && in bnxt_qplib_alloc_mrw()
542 mrw->flags & BNXT_QPLIB_FR_PMR) || in bnxt_qplib_alloc_mrw()
543 mrw->type == CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE2A || in bnxt_qplib_alloc_mrw()
544 mrw->type == CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE2B) in bnxt_qplib_alloc_mrw()
546 tmp = (unsigned long)mrw; in bnxt_qplib_alloc_mrw()
555 if ((mrw->type == CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE1) || in bnxt_qplib_alloc_mrw()
556 (mrw->type == CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE2A) || in bnxt_qplib_alloc_mrw()
557 (mrw->type == CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE2B)) in bnxt_qplib_alloc_mrw()
558 mrw->rkey = le32_to_cpu(resp.xid); in bnxt_qplib_alloc_mrw()
560 mrw->lkey = le32_to_cpu(resp.xid); in bnxt_qplib_alloc_mrw()
564 int bnxt_qplib_dereg_mrw(struct bnxt_qplib_res *res, struct bnxt_qplib_mrw *mrw, in bnxt_qplib_dereg_mrw() argument
577 req.lkey = cpu_to_le32(mrw->lkey); in bnxt_qplib_dereg_mrw()
585 if (mrw->hwq.max_elements) { in bnxt_qplib_dereg_mrw()
586 mrw->va = 0; in bnxt_qplib_dereg_mrw()
587 mrw->total_size = 0; in bnxt_qplib_dereg_mrw()
588 bnxt_qplib_free_hwq(res, &mrw->hwq); in bnxt_qplib_dereg_mrw()