Lines Matching refs:mw
459 struct hns_roce_mw *mw) in hns_roce_mw_free() argument
464 if (mw->enabled) { in hns_roce_mw_free()
466 key_to_hw_index(mw->rkey) & in hns_roce_mw_free()
472 key_to_hw_index(mw->rkey)); in hns_roce_mw_free()
476 (int)key_to_hw_index(mw->rkey)); in hns_roce_mw_free()
480 struct hns_roce_mw *mw) in hns_roce_mw_enable() argument
485 unsigned long mtpt_idx = key_to_hw_index(mw->rkey); in hns_roce_mw_enable()
499 ret = hr_dev->hw->mw_write_mtpt(mailbox->buf, mw); in hns_roce_mw_enable()
512 mw->enabled = 1; in hns_roce_mw_enable()
532 struct hns_roce_mw *mw = to_hr_mw(ibmw); in hns_roce_alloc_mw() local
544 mw->rkey = hw_index_to_key(id); in hns_roce_alloc_mw()
546 ibmw->rkey = mw->rkey; in hns_roce_alloc_mw()
547 mw->pdn = to_hr_pd(ibmw->pd)->pdn; in hns_roce_alloc_mw()
548 mw->pbl_hop_num = hr_dev->caps.pbl_hop_num; in hns_roce_alloc_mw()
549 mw->pbl_ba_pg_sz = hr_dev->caps.pbl_ba_pg_sz; in hns_roce_alloc_mw()
550 mw->pbl_buf_pg_sz = hr_dev->caps.pbl_buf_pg_sz; in hns_roce_alloc_mw()
552 ret = hns_roce_mw_enable(hr_dev, mw); in hns_roce_alloc_mw()
559 hns_roce_mw_free(hr_dev, mw); in hns_roce_alloc_mw()
566 struct hns_roce_mw *mw = to_hr_mw(ibmw); in hns_roce_dealloc_mw() local
568 hns_roce_mw_free(hr_dev, mw); in hns_roce_dealloc_mw()