Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net/mlx5: Report a CQ error event only when a handler was set

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>

authored by

Yishai Hadas and committed by
Leon Romanovsky
70a43d3f 38164b77

+2 -1
+2 -1
drivers/net/ethernet/mellanox/mlx5/core/eq.c
··· 503 503 return NOTIFY_OK; 504 504 } 505 505 506 - cq->event(cq, type); 506 + if (cq->event) 507 + cq->event(cq, type); 507 508 508 509 mlx5_cq_put(cq); 509 510