| .. | .. |
|---|
| 33 | 33 | #ifndef MLX5_CORE_CQ_H |
|---|
| 34 | 34 | #define MLX5_CORE_CQ_H |
|---|
| 35 | 35 | |
|---|
| 36 | | -#include <rdma/ib_verbs.h> |
|---|
| 37 | 36 | #include <linux/mlx5/driver.h> |
|---|
| 38 | 37 | #include <linux/refcount.h> |
|---|
| 39 | 38 | |
|---|
| .. | .. |
|---|
| 47 | 46 | struct completion free; |
|---|
| 48 | 47 | unsigned vector; |
|---|
| 49 | 48 | unsigned int irqn; |
|---|
| 50 | | - void (*comp) (struct mlx5_core_cq *); |
|---|
| 49 | + void (*comp)(struct mlx5_core_cq *cq, struct mlx5_eqe *eqe); |
|---|
| 51 | 50 | void (*event) (struct mlx5_core_cq *, enum mlx5_event); |
|---|
| 52 | 51 | u32 cons_index; |
|---|
| 53 | 52 | unsigned arm_sn; |
|---|
| .. | .. |
|---|
| 55 | 54 | int pid; |
|---|
| 56 | 55 | struct { |
|---|
| 57 | 56 | struct list_head list; |
|---|
| 58 | | - void (*comp)(struct mlx5_core_cq *); |
|---|
| 57 | + void (*comp)(struct mlx5_core_cq *cq, struct mlx5_eqe *eqe); |
|---|
| 59 | 58 | void *priv; |
|---|
| 60 | 59 | } tasklet_ctx; |
|---|
| 61 | 60 | int reset_notify_added; |
|---|
| 62 | 61 | struct list_head reset_notify; |
|---|
| 63 | | - struct mlx5_eq *eq; |
|---|
| 62 | + struct mlx5_eq_comp *eq; |
|---|
| 63 | + u16 uid; |
|---|
| 64 | 64 | }; |
|---|
| 65 | 65 | |
|---|
| 66 | 66 | |
|---|
| .. | .. |
|---|
| 124 | 124 | }; |
|---|
| 125 | 125 | |
|---|
| 126 | 126 | enum { |
|---|
| 127 | | - CQE_SIZE_64 = 0, |
|---|
| 128 | | - CQE_SIZE_128 = 1, |
|---|
| 129 | | - CQE_SIZE_128_PAD = 2, |
|---|
| 127 | + CQE_STRIDE_64 = 0, |
|---|
| 128 | + CQE_STRIDE_128 = 1, |
|---|
| 129 | + CQE_STRIDE_128_PAD = 2, |
|---|
| 130 | 130 | }; |
|---|
| 131 | 131 | |
|---|
| 132 | 132 | #define MLX5_MAX_CQ_PERIOD (BIT(__mlx5_bit_sz(cqc, cq_period)) - 1) |
|---|
| .. | .. |
|---|
| 134 | 134 | |
|---|
| 135 | 135 | static inline int cqe_sz_to_mlx_sz(u8 size, int padding_128_en) |
|---|
| 136 | 136 | { |
|---|
| 137 | | - return padding_128_en ? CQE_SIZE_128_PAD : |
|---|
| 138 | | - size == 64 ? CQE_SIZE_64 : CQE_SIZE_128; |
|---|
| 137 | + return padding_128_en ? CQE_STRIDE_128_PAD : |
|---|
| 138 | + size == 64 ? CQE_STRIDE_64 : CQE_STRIDE_128; |
|---|
| 139 | 139 | } |
|---|
| 140 | 140 | |
|---|
| 141 | 141 | static inline void mlx5_cq_set_ci(struct mlx5_core_cq *cq) |
|---|
| .. | .. |
|---|
| 169 | 169 | doorbell[0] = cpu_to_be32(sn << 28 | cmd | ci); |
|---|
| 170 | 170 | doorbell[1] = cpu_to_be32(cq->cqn); |
|---|
| 171 | 171 | |
|---|
| 172 | | - mlx5_write64(doorbell, uar_page + MLX5_CQ_DOORBELL, NULL); |
|---|
| 172 | + mlx5_write64(doorbell, uar_page + MLX5_CQ_DOORBELL); |
|---|
| 173 | 173 | } |
|---|
| 174 | 174 | |
|---|
| 175 | 175 | static inline void mlx5_cq_hold(struct mlx5_core_cq *cq) |
|---|
| .. | .. |
|---|
| 184 | 184 | } |
|---|
| 185 | 185 | |
|---|
| 186 | 186 | int mlx5_core_create_cq(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq, |
|---|
| 187 | | - u32 *in, int inlen); |
|---|
| 187 | + u32 *in, int inlen, u32 *out, int outlen); |
|---|
| 188 | 188 | int mlx5_core_destroy_cq(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq); |
|---|
| 189 | 189 | int mlx5_core_query_cq(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq, |
|---|
| 190 | | - u32 *out, int outlen); |
|---|
| 190 | + u32 *out); |
|---|
| 191 | 191 | int mlx5_core_modify_cq(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq, |
|---|
| 192 | 192 | u32 *in, int inlen); |
|---|
| 193 | 193 | int mlx5_core_modify_cq_moderation(struct mlx5_core_dev *dev, |
|---|