Skip to content

Commit

Permalink
net/mlx5: Report a CQ error event only when a handler was set
Browse files Browse the repository at this point in the history
Report a CQ error event only when a handler was set.

This enables mlx5_ib to not set a handler upon CQ creation and use some
other mechanism to get this event as of other events by the
mlx5_eq_notifier_register API.

Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
Acked-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
  • Loading branch information
Yishai Hadas authored and Leon Romanovsky committed Jul 3, 2019
1 parent 38164b7 commit 70a43d3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/ethernet/mellanox/mlx5/core/eq.c
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,8 @@ static int cq_err_event_notifier(struct notifier_block *nb,
return NOTIFY_OK;
}

cq->event(cq, type);
if (cq->event)
cq->event(cq, type);

mlx5_cq_put(cq);

Expand Down

0 comments on commit 70a43d3

Please sign in to comment.