Lines Matching refs:cqn
76 hr_cq->cqn = (id << CQ_BANKID_SHIFT) | bankid; in alloc_cqn()
83 static inline u8 get_cq_bankid(unsigned long cqn) in get_cq_bankid() argument
86 return (u8)(cqn & GENMASK(1, 0)); in get_cq_bankid()
89 static void free_cqn(struct hns_roce_dev *hr_dev, unsigned long cqn) in free_cqn() argument
94 bank = &cq_table->bank[get_cq_bankid(cqn)]; in free_cqn()
96 ida_free(&bank->ida, cqn >> CQ_BANKID_SHIFT); in free_cqn()
120 hr_cq->cqn); in hns_roce_create_cqc()
124 hr_cq->cqn, ret); in hns_roce_create_cqc()
147 ret = hns_roce_table_get(hr_dev, &cq_table->table, hr_cq->cqn); in alloc_cqc()
150 hr_cq->cqn, ret); in alloc_cqc()
154 ret = xa_err(xa_store_irq(&cq_table->array, hr_cq->cqn, hr_cq, GFP_KERNEL)); in alloc_cqc()
167 xa_erase_irq(&cq_table->array, hr_cq->cqn); in alloc_cqc()
169 hns_roce_table_put(hr_dev, &cq_table->table, hr_cq->cqn); in alloc_cqc()
181 hr_cq->cqn); in free_cqc()
184 hr_cq->cqn); in free_cqc()
186 xa_erase_irq(&cq_table->array, hr_cq->cqn); in free_cqc()
196 hns_roce_table_put(hr_dev, &cq_table->table, hr_cq->cqn); in free_cqc()
411 resp.cqn = hr_cq->cqn; in hns_roce_create_cq()
428 free_cqn(hr_dev, hr_cq->cqn); in hns_roce_create_cq()
442 free_cqn(hr_dev, hr_cq->cqn); in hns_roce_destroy_cq()
449 void hns_roce_cq_completion(struct hns_roce_dev *hr_dev, u32 cqn) in hns_roce_cq_completion() argument
455 cqn & (hr_dev->caps.num_cqs - 1)); in hns_roce_cq_completion()
458 cqn); in hns_roce_cq_completion()
468 void hns_roce_cq_event(struct hns_roce_dev *hr_dev, u32 cqn, int event_type) in hns_roce_cq_event() argument
479 event_type, cqn); in hns_roce_cq_event()
485 cqn & (hr_dev->caps.num_cqs - 1)); in hns_roce_cq_event()
490 dev_warn(dev, "async event for bogus CQ 0x%06x\n", cqn); in hns_roce_cq_event()