Lines Matching refs:aenq
131 struct ena_com_aenq *aenq = &ena_dev->aenq; in ena_com_admin_init_aenq() local
135 ena_dev->aenq.q_depth = ENA_ASYNC_QUEUE_DEPTH; in ena_com_admin_init_aenq()
137 aenq->entries = dma_alloc_coherent(ena_dev->dmadev, size, &aenq->dma_addr, GFP_KERNEL); in ena_com_admin_init_aenq()
139 if (!aenq->entries) { in ena_com_admin_init_aenq()
144 aenq->head = aenq->q_depth; in ena_com_admin_init_aenq()
145 aenq->phase = 1; in ena_com_admin_init_aenq()
147 addr_low = ENA_DMA_ADDR_TO_UINT32_LOW(aenq->dma_addr); in ena_com_admin_init_aenq()
148 addr_high = ENA_DMA_ADDR_TO_UINT32_HIGH(aenq->dma_addr); in ena_com_admin_init_aenq()
154 aenq_caps |= ena_dev->aenq.q_depth & ENA_REGS_AENQ_CAPS_AENQ_DEPTH_MASK; in ena_com_admin_init_aenq()
165 aenq->aenq_handlers = aenq_handlers; in ena_com_admin_init_aenq()
1481 u16 depth = ena_dev->aenq.q_depth; in ena_com_admin_aenq_enable()
1483 WARN(ena_dev->aenq.head != depth, "Invalid AENQ state\n"); in ena_com_admin_aenq_enable()
1505 if ((get_resp.u.aenq.supported_groups & groups_flag) != groups_flag) { in ena_com_set_aenq_config()
1508 get_resp.u.aenq.supported_groups, groups_flag); in ena_com_set_aenq_config()
1518 cmd.u.aenq.enabled_groups = groups_flag; in ena_com_set_aenq_config()
1621 struct ena_com_aenq *aenq = &ena_dev->aenq; in ena_com_admin_destroy() local
1636 size = ADMIN_AENQ_SIZE(aenq->q_depth); in ena_com_admin_destroy()
1637 if (ena_dev->aenq.entries) in ena_com_admin_destroy()
1638 dma_free_coherent(ena_dev->dmadev, size, aenq->entries, aenq->dma_addr); in ena_com_admin_destroy()
1639 aenq->entries = NULL; in ena_com_admin_destroy()
1982 memcpy(&get_feat_ctx->aenq, &get_resp.u.aenq, in ena_com_get_dev_attr_feat()
1983 sizeof(get_resp.u.aenq)); in ena_com_get_dev_attr_feat()
2029 struct ena_aenq_handlers *aenq_handlers = ena_dev->aenq.aenq_handlers; in ena_com_get_specific_aenq_cb()
2045 struct ena_com_aenq *aenq = &ena_dev->aenq; in ena_com_aenq_intr_handler() local
2051 masked_head = aenq->head & (aenq->q_depth - 1); in ena_com_aenq_intr_handler()
2052 phase = aenq->phase; in ena_com_aenq_intr_handler()
2053 aenq_e = &aenq->entries[masked_head]; /* Get first entry */ in ena_com_aenq_intr_handler()
2078 if (unlikely(masked_head == aenq->q_depth)) { in ena_com_aenq_intr_handler()
2082 aenq_e = &aenq->entries[masked_head]; in ena_com_aenq_intr_handler()
2086 aenq->head += processed; in ena_com_aenq_intr_handler()
2087 aenq->phase = phase; in ena_com_aenq_intr_handler()
2095 writel_relaxed((u32)aenq->head, ena_dev->reg_bar + ENA_REGS_AENQ_HEAD_DB_OFF); in ena_com_aenq_intr_handler()