static int mlx5e_rx_reporter_err_rq_cqe_recover(void *ctx)
{
- struct mlx5_core_dev *mdev;
- struct net_device *dev;
- struct mlx5e_rq *rq;
- u8 state;
+ struct mlx5e_rq *rq = ctx;
int err;
- rq = ctx;
- mdev = rq->mdev;
- dev = rq->netdev;
- err = mlx5e_query_rq_state(mdev, rq->rqn, &state);
- if (err) {
- netdev_err(dev, "Failed to query RQ 0x%x state. err = %d\n",
- rq->rqn, err);
- goto out;
- }
-
- if (state != MLX5_RQC_STATE_ERR)
- goto out;
-
mlx5e_deactivate_rq(rq);
mlx5e_free_rx_descs(rq);
}
}
-static inline void mlx5e_dump_error_cqe(struct mlx5e_cq *cq, u32 sqn,
+static inline void mlx5e_dump_error_cqe(struct mlx5e_cq *cq, u32 qn,
struct mlx5_err_cqe *err_cqe)
{
struct mlx5_cqwq *wq = &cq->wq;
ci = mlx5_cqwq_ctr2ix(wq, wq->cc - 1);
netdev_err(cq->channel->netdev,
- "Error cqe on cqn 0x%x, ci 0x%x, sqn 0x%x, opcode 0x%x, syndrome 0x%x, vendor syndrome 0x%x\n",
- cq->mcq.cqn, ci, sqn,
+ "Error cqe on cqn 0x%x, ci 0x%x, qn 0x%x, opcode 0x%x, syndrome 0x%x, vendor syndrome 0x%x\n",
+ cq->mcq.cqn, ci, qn,
get_cqe_opcode((struct mlx5_cqe64 *)err_cqe),
err_cqe->syndrome, err_cqe->vendor_err_synd);
mlx5_dump_err_cqe(cq->mdev, err_cqe);
struct mlx5_err_cqe *err_cqe = (struct mlx5_err_cqe *)cqe;
if (cqe_syndrome_needs_recover(err_cqe->syndrome) &&
- !test_and_set_bit(MLX5E_RQ_STATE_RECOVERING, &rq->state))
+ !test_and_set_bit(MLX5E_RQ_STATE_RECOVERING, &rq->state)) {
+ mlx5e_dump_error_cqe(&rq->cq, rq->rqn, err_cqe);
queue_work(rq->channel->priv->wq, &rq->recover_work);
+ }
}
void mlx5e_handle_rx_cqe(struct mlx5e_rq *rq, struct mlx5_cqe64 *cqe)