Lines Matching refs:hr_dev

38 void hns_roce_buf_free(struct hns_roce_dev *hr_dev, struct hns_roce_buf *buf)  in hns_roce_buf_free()  argument
50 dma_free_coherent(hr_dev->dev, 1 << buf->trunk_shift, in hns_roce_buf_free()
66 struct hns_roce_buf *hns_roce_buf_alloc(struct hns_roce_dev *hr_dev, u32 size, in hns_roce_buf_alloc() argument
105 trunks[i].buf = dma_alloc_coherent(hr_dev->dev, trunk_size, in hns_roce_buf_alloc()
118 dma_free_coherent(hr_dev->dev, trunk_size, in hns_roce_buf_alloc()
132 int hns_roce_get_kmem_bufs(struct hns_roce_dev *hr_dev, dma_addr_t *bufs, in hns_roce_get_kmem_bufs() argument
141 dev_err(hr_dev->dev, "failed to check kmem buf shift %u > %u\n", in hns_roce_get_kmem_bufs()
156 int hns_roce_get_umem_bufs(struct hns_roce_dev *hr_dev, dma_addr_t *bufs, in hns_roce_get_umem_bufs() argument
174 void hns_roce_cleanup_bitmap(struct hns_roce_dev *hr_dev) in hns_roce_cleanup_bitmap() argument
176 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_XRC) in hns_roce_cleanup_bitmap()
177 ida_destroy(&hr_dev->xrcd_ida.ida); in hns_roce_cleanup_bitmap()
179 if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_SRQ) in hns_roce_cleanup_bitmap()
180 ida_destroy(&hr_dev->srq_table.srq_ida.ida); in hns_roce_cleanup_bitmap()
181 hns_roce_cleanup_qp_table(hr_dev); in hns_roce_cleanup_bitmap()
182 hns_roce_cleanup_cq_table(hr_dev); in hns_roce_cleanup_bitmap()
183 ida_destroy(&hr_dev->mr_table.mtpt_ida.ida); in hns_roce_cleanup_bitmap()
184 ida_destroy(&hr_dev->pd_ida.ida); in hns_roce_cleanup_bitmap()
185 ida_destroy(&hr_dev->uar_ida.ida); in hns_roce_cleanup_bitmap()