Lines Matching refs:hwc_cq

319 	struct hwc_cq *hwc_cq = ctx;  in mana_hwc_comp_event()  local
322 WARN_ON_ONCE(hwc_cq->gdma_cq != q_self); in mana_hwc_comp_event()
324 completions = hwc_cq->comp_buf; in mana_hwc_comp_event()
325 comp_read = mana_gd_poll_cq(q_self, completions, hwc_cq->queue_depth); in mana_hwc_comp_event()
326 WARN_ON_ONCE(comp_read <= 0 || comp_read > hwc_cq->queue_depth); in mana_hwc_comp_event()
332 hwc_cq->tx_event_handler(hwc_cq->tx_event_ctx, in mana_hwc_comp_event()
336 hwc_cq->rx_event_handler(hwc_cq->rx_event_ctx, in mana_hwc_comp_event()
344 static void mana_hwc_destroy_cq(struct gdma_context *gc, struct hwc_cq *hwc_cq) in mana_hwc_destroy_cq() argument
346 kfree(hwc_cq->comp_buf); in mana_hwc_destroy_cq()
348 if (hwc_cq->gdma_cq) in mana_hwc_destroy_cq()
349 mana_gd_destroy_queue(gc, hwc_cq->gdma_cq); in mana_hwc_destroy_cq()
351 if (hwc_cq->gdma_eq) in mana_hwc_destroy_cq()
352 mana_gd_destroy_queue(gc, hwc_cq->gdma_eq); in mana_hwc_destroy_cq()
354 kfree(hwc_cq); in mana_hwc_destroy_cq()
362 void *tx_ev_ctx, struct hwc_cq **hwc_cq_ptr) in mana_hwc_create_cq()
366 struct hwc_cq *hwc_cq; in mana_hwc_create_cq() local
378 hwc_cq = kzalloc(sizeof(*hwc_cq), GFP_KERNEL); in mana_hwc_create_cq()
379 if (!hwc_cq) in mana_hwc_create_cq()
387 hwc_cq->gdma_eq = eq; in mana_hwc_create_cq()
389 err = mana_hwc_create_gdma_cq(hwc, cq_size, hwc_cq, mana_hwc_comp_event, in mana_hwc_create_cq()
395 hwc_cq->gdma_cq = cq; in mana_hwc_create_cq()
403 hwc_cq->hwc = hwc; in mana_hwc_create_cq()
404 hwc_cq->comp_buf = comp_buf; in mana_hwc_create_cq()
405 hwc_cq->queue_depth = q_depth; in mana_hwc_create_cq()
406 hwc_cq->rx_event_handler = rx_ev_hdlr; in mana_hwc_create_cq()
407 hwc_cq->rx_event_ctx = rx_ev_ctx; in mana_hwc_create_cq()
408 hwc_cq->tx_event_handler = tx_ev_hdlr; in mana_hwc_create_cq()
409 hwc_cq->tx_event_ctx = tx_ev_ctx; in mana_hwc_create_cq()
411 *hwc_cq_ptr = hwc_cq; in mana_hwc_create_cq()
414 mana_hwc_destroy_cq(hwc->gdma_dev->gdma_context, hwc_cq); in mana_hwc_create_cq()
491 u32 max_msg_size, struct hwc_cq *hwc_cq, in mana_hwc_create_wq() argument
520 hwc_wq->hwc_cq = hwc_cq; in mana_hwc_create_wq()
556 tx_oob->vscq_id = hwc_txq->hwc_cq->gdma_cq->id; in mana_hwc_post_tx_wqe()