Lines Matching refs:hwc_cq
293 struct hwc_cq *hwc_cq = ctx; in mana_hwc_comp_event() local
296 WARN_ON_ONCE(hwc_cq->gdma_cq != q_self); in mana_hwc_comp_event()
298 completions = hwc_cq->comp_buf; in mana_hwc_comp_event()
299 comp_read = mana_gd_poll_cq(q_self, completions, hwc_cq->queue_depth); in mana_hwc_comp_event()
300 WARN_ON_ONCE(comp_read <= 0 || comp_read > hwc_cq->queue_depth); in mana_hwc_comp_event()
306 hwc_cq->tx_event_handler(hwc_cq->tx_event_ctx, in mana_hwc_comp_event()
310 hwc_cq->rx_event_handler(hwc_cq->rx_event_ctx, in mana_hwc_comp_event()
318 static void mana_hwc_destroy_cq(struct gdma_context *gc, struct hwc_cq *hwc_cq) in mana_hwc_destroy_cq() argument
320 kfree(hwc_cq->comp_buf); in mana_hwc_destroy_cq()
322 if (hwc_cq->gdma_cq) in mana_hwc_destroy_cq()
323 mana_gd_destroy_queue(gc, hwc_cq->gdma_cq); in mana_hwc_destroy_cq()
325 if (hwc_cq->gdma_eq) in mana_hwc_destroy_cq()
326 mana_gd_destroy_queue(gc, hwc_cq->gdma_eq); in mana_hwc_destroy_cq()
328 kfree(hwc_cq); in mana_hwc_destroy_cq()
336 void *tx_ev_ctx, struct hwc_cq **hwc_cq_ptr) in mana_hwc_create_cq()
340 struct hwc_cq *hwc_cq; in mana_hwc_create_cq() local
352 hwc_cq = kzalloc(sizeof(*hwc_cq), GFP_KERNEL); in mana_hwc_create_cq()
353 if (!hwc_cq) in mana_hwc_create_cq()
361 hwc_cq->gdma_eq = eq; in mana_hwc_create_cq()
363 err = mana_hwc_create_gdma_cq(hwc, cq_size, hwc_cq, mana_hwc_comp_event, in mana_hwc_create_cq()
369 hwc_cq->gdma_cq = cq; in mana_hwc_create_cq()
377 hwc_cq->hwc = hwc; in mana_hwc_create_cq()
378 hwc_cq->comp_buf = comp_buf; in mana_hwc_create_cq()
379 hwc_cq->queue_depth = q_depth; in mana_hwc_create_cq()
380 hwc_cq->rx_event_handler = rx_ev_hdlr; in mana_hwc_create_cq()
381 hwc_cq->rx_event_ctx = rx_ev_ctx; in mana_hwc_create_cq()
382 hwc_cq->tx_event_handler = tx_ev_hdlr; in mana_hwc_create_cq()
383 hwc_cq->tx_event_ctx = tx_ev_ctx; in mana_hwc_create_cq()
385 *hwc_cq_ptr = hwc_cq; in mana_hwc_create_cq()
388 mana_hwc_destroy_cq(hwc->gdma_dev->gdma_context, hwc_cq); in mana_hwc_create_cq()
465 u32 max_msg_size, struct hwc_cq *hwc_cq, in mana_hwc_create_wq() argument
494 hwc_wq->hwc_cq = hwc_cq; in mana_hwc_create_wq()
530 tx_oob->vscq_id = hwc_txq->hwc_cq->gdma_cq->id; in mana_hwc_post_tx_wqe()