Lines Matching refs:fq

135 static void caam_fq_ern_cb(struct qman_portal *qm, struct qman_fq *fq,  in caam_fq_ern_cb()  argument
218 static int empty_retired_fq(struct device *qidev, struct qman_fq *fq) in empty_retired_fq() argument
222 ret = qman_volatile_dequeue(fq, QMAN_VOLATILE_FLAG_WAIT_INT | in empty_retired_fq()
227 dev_err(qidev, "Volatile dequeue fail for FQ: %u\n", fq->fqid); in empty_retired_fq()
236 } while (fq->flags & QMAN_FQ_STATE_NE); in empty_retired_fq()
241 static int kill_fq(struct device *qidev, struct qman_fq *fq) in kill_fq() argument
246 ret = qman_retire_fq(fq, &flags); in kill_fq()
260 } while (fq->state != qman_fq_state_retired); in kill_fq()
262 WARN_ON(fq->flags & QMAN_FQ_STATE_BLOCKOOS); in kill_fq()
263 WARN_ON(fq->flags & QMAN_FQ_STATE_ORL); in kill_fq()
267 if (fq->flags & QMAN_FQ_STATE_NE) { in kill_fq()
268 ret = empty_retired_fq(qidev, fq); in kill_fq()
271 fq->fqid); in kill_fq()
276 ret = qman_oos_fq(fq); in kill_fq()
278 dev_err(qidev, "OOS of FQID: %u failed\n", fq->fqid); in kill_fq()
280 qman_destroy_fq(fq); in kill_fq()
281 kfree(fq); in kill_fq()
286 static int empty_caam_fq(struct qman_fq *fq, struct caam_drv_ctx *drv_ctx) in empty_caam_fq() argument
294 ret = qman_query_fq_np(fq, &np); in empty_caam_fq()
314 refcount_read(&drv_ctx->refcnt), fq->fqid); in empty_caam_fq()
614 struct qman_fq *fq; in alloc_rsp_fq_cpu() local
617 fq = kzalloc(sizeof(*fq), GFP_KERNEL | GFP_DMA); in alloc_rsp_fq_cpu()
618 if (!fq) in alloc_rsp_fq_cpu()
621 fq->cb.dqrr = caam_rsp_fq_dqrr_cb; in alloc_rsp_fq_cpu()
624 QMAN_FQ_FLAG_DYNAMIC_FQID, fq); in alloc_rsp_fq_cpu()
627 kfree(fq); in alloc_rsp_fq_cpu()
643 ret = qman_init_fq(fq, QMAN_INITFQ_FLAG_SCHED, &opts); in alloc_rsp_fq_cpu()
646 kfree(fq); in alloc_rsp_fq_cpu()
650 per_cpu(pcpu_qipriv.rsp_fq, cpu) = fq; in alloc_rsp_fq_cpu()
652 dev_dbg(qidev, "Allocated response FQ %u for CPU %u", fq->fqid, cpu); in alloc_rsp_fq_cpu()