Commit 58d180b3 authored by Saeed Mahameed's avatar Saeed Mahameed

net/mlx5: Forward all mlx5 events to mlx5 notifiers chain

This to allow seamless migration to the new notifier chain API, and to
eventually deprecate interfaces dev->event callback.
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
parent 7cffaddd
......@@ -32,6 +32,7 @@
#include <linux/mlx5/driver.h>
#include "mlx5_core.h"
#include "lib/mlx5.h"
static LIST_HEAD(intf_list);
static LIST_HEAD(mlx5_dev_list);
......@@ -425,6 +426,8 @@ void mlx5_core_event(struct mlx5_core_dev *dev, enum mlx5_dev_event event,
dev_ctx->intf->event(dev, dev_ctx->context, event, param);
spin_unlock_irqrestore(&priv->ctx_lock, flags);
mlx5_notifier_call_chain(dev->priv.events, event, (void *)param);
}
void mlx5_dev_list_lock(void)
......
......@@ -195,7 +195,7 @@ struct mlx5_rsc_debug {
};
enum mlx5_dev_event {
MLX5_DEV_EVENT_SYS_ERROR,
MLX5_DEV_EVENT_SYS_ERROR = 128, /* 0 - 127 are FW events */
MLX5_DEV_EVENT_PORT_UP,
MLX5_DEV_EVENT_PORT_DOWN,
MLX5_DEV_EVENT_PORT_INITIALIZED,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment