diff options
author | Yishai Hadas | 2019-06-30 18:23:26 +0200 |
---|---|---|
committer | Leon Romanovsky | 2019-07-03 19:59:40 +0200 |
commit | 70a43d3fd4efba2de97152788df723c7812bb834 (patch) | |
tree | b191f164940447764c8de1f1f93e3279ccb80266 /drivers/net/ethernet/mellanox | |
parent | net/mlx5: mlx5_core_create_cq() enhancements (diff) | |
download | kernel-qcow2-linux-70a43d3fd4efba2de97152788df723c7812bb834.tar.gz kernel-qcow2-linux-70a43d3fd4efba2de97152788df723c7812bb834.tar.xz kernel-qcow2-linux-70a43d3fd4efba2de97152788df723c7812bb834.zip |
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>
Diffstat (limited to 'drivers/net/ethernet/mellanox')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/eq.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eq.c b/drivers/net/ethernet/mellanox/mlx5/core/eq.c index c634a78d5cdd..678454535460 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/eq.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/eq.c @@ -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); |