Lines Matching defs:ceq
1559 * i40iw_sc_ceq_init - initialize ceq
1560 * @ceq: ceq sc structure
1561 * @info: ceq initialization info
1563 static enum i40iw_status_code i40iw_sc_ceq_init(struct i40iw_sc_ceq *ceq,
1580 ceq->size = sizeof(*ceq);
1581 ceq->ceqe_base = (struct i40iw_ceqe *)info->ceqe_base;
1582 ceq->ceq_id = info->ceq_id;
1583 ceq->dev = info->dev;
1584 ceq->elem_cnt = info->elem_cnt;
1585 ceq->ceq_elem_pa = info->ceqe_pa;
1586 ceq->virtual_map = info->virtual_map;
1588 ceq->pbl_chunk_size = (ceq->virtual_map ? info->pbl_chunk_size : 0);
1589 ceq->first_pm_pbl_idx = (ceq->virtual_map ? info->first_pm_pbl_idx : 0);
1590 ceq->pbl_list = (ceq->virtual_map ? info->pbl_list : NULL);
1592 ceq->tph_en = info->tph_en;
1593 ceq->tph_val = info->tph_val;
1594 ceq->polarity = 1;
1595 I40IW_RING_INIT(ceq->ceq_ring, ceq->elem_cnt);
1596 ceq->dev->ceq[info->ceq_id] = ceq;
1602 * i40iw_sc_ceq_create - create ceq wqe
1603 * @ceq: ceq sc structure
1607 static enum i40iw_status_code i40iw_sc_ceq_create(struct i40iw_sc_ceq *ceq,
1615 cqp = ceq->dev->cqp;
1619 set_64bit_val(wqe, 16, ceq->elem_cnt);
1620 set_64bit_val(wqe, 32, (ceq->virtual_map ? 0 : ceq->ceq_elem_pa));
1621 set_64bit_val(wqe, 48, (ceq->virtual_map ? ceq->first_pm_pbl_idx : 0));
1622 set_64bit_val(wqe, 56, LS_64(ceq->tph_val, I40IW_CQPSQ_TPHVAL));
1624 header = ceq->ceq_id |
1626 LS_64(ceq->pbl_chunk_size, I40IW_CQPSQ_CEQ_LPBLSIZE) |
1627 LS_64(ceq->virtual_map, I40IW_CQPSQ_CEQ_VMAP) |
1628 LS_64(ceq->tph_en, I40IW_CQPSQ_TPHEN) |
1642 * i40iw_sc_cceq_create_done - poll for control ceq wqe to complete
1643 * @ceq: ceq sc structure
1645 static enum i40iw_status_code i40iw_sc_cceq_create_done(struct i40iw_sc_ceq *ceq)
1649 cqp = ceq->dev->cqp;
1655 * @ceq: ceq sc structure
1657 static enum i40iw_status_code i40iw_sc_cceq_destroy_done(struct i40iw_sc_ceq *ceq)
1661 cqp = ceq->dev->cqp;
1668 * @ceq: ceq sc structure
1671 static enum i40iw_status_code i40iw_sc_cceq_create(struct i40iw_sc_ceq *ceq, u64 scratch)
1675 ret_code = i40iw_sc_ceq_create(ceq, scratch, true);
1677 ret_code = i40iw_sc_cceq_create_done(ceq);
1682 * i40iw_sc_ceq_destroy - destroy ceq
1683 * @ceq: ceq sc structure
1687 static enum i40iw_status_code i40iw_sc_ceq_destroy(struct i40iw_sc_ceq *ceq,
1695 cqp = ceq->dev->cqp;
1699 set_64bit_val(wqe, 16, ceq->elem_cnt);
1700 set_64bit_val(wqe, 48, ceq->first_pm_pbl_idx);
1701 header = ceq->ceq_id |
1703 LS_64(ceq->pbl_chunk_size, I40IW_CQPSQ_CEQ_LPBLSIZE) |
1704 LS_64(ceq->virtual_map, I40IW_CQPSQ_CEQ_VMAP) |
1705 LS_64(ceq->tph_en, I40IW_CQPSQ_TPHEN) |
1717 * i40iw_sc_process_ceq - process ceq
1719 * @ceq: ceq sc structure
1721 static void *i40iw_sc_process_ceq(struct i40iw_sc_dev *dev, struct i40iw_sc_ceq *ceq)
1728 ceqe = (u64 *)I40IW_GET_CURRENT_CEQ_ELEMENT(ceq);
1731 if (polarity != ceq->polarity)
1736 I40IW_RING_MOVE_TAIL(ceq->ceq_ring);
1737 if (I40IW_RING_GETCURRENT_TAIL(ceq->ceq_ring) == 0)
1738 ceq->polarity ^= 1;
4145 status = i40iw_sc_ceq_destroy(pcmdinfo->in.u.ceq_destroy.ceq,
4170 status = i40iw_sc_ceq_create(pcmdinfo->in.u.ceq_create.ceq,