linux/drivers/net/ethernet/mellanox/mlx5/core/events.c

// SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
// Copyright (c) 2018 Mellanox Technologies

#include <linux/mlx5/driver.h>

#include "mlx5_core.h"
#include "lib/eq.h"
#include "lib/events.h"

struct mlx5_event_nb {};

/* General events handlers for the low level mlx5_core driver
 *
 * Other Major feature specific events such as
 * clock/eswitch/fpga/FW trace and many others, are handled elsewhere, with
 * separate notifiers callbacks, specifically by those mlx5 components.
 */
static int any_notifier(struct notifier_block *, unsigned long, void *);
static int temp_warn(struct notifier_block *, unsigned long, void *);
static int port_module(struct notifier_block *, unsigned long, void *);
static int pcie_core(struct notifier_block *, unsigned long, void *);

/* handler which forwards the event to events->fw_nh, driver notifiers */
static int forward_event(struct notifier_block *, unsigned long, void *);

static struct mlx5_nb events_nbs_ref[] =;

struct mlx5_events {};

static const char *eqe_type_str(u8 type)
{}

/* handles all FW events, type == eqe->type */
static int any_notifier(struct notifier_block *nb,
			unsigned long type, void *data)
{}

/* type == MLX5_EVENT_TYPE_TEMP_WARN_EVENT */
static int temp_warn(struct notifier_block *nb, unsigned long type, void *data)
{}

/* MLX5_EVENT_TYPE_PORT_MODULE_EVENT */
static const char *mlx5_pme_status_to_string(enum port_module_event_status_type status)
{}

static const char *mlx5_pme_error_to_string(enum port_module_event_error_type error)
{}

/* type == MLX5_EVENT_TYPE_PORT_MODULE_EVENT */
static int port_module(struct notifier_block *nb, unsigned long type, void *data)
{}

enum {};

static void mlx5_pcie_event(struct work_struct *work)
{}

static int pcie_core(struct notifier_block *nb, unsigned long type, void *data)
{}

void mlx5_get_pme_stats(struct mlx5_core_dev *dev, struct mlx5_pme_stats *stats)
{}

/* forward event as is to registered interfaces (mlx5e/mlx5_ib) */
static int forward_event(struct notifier_block *nb, unsigned long event, void *data)
{}

int mlx5_events_init(struct mlx5_core_dev *dev)
{}

void mlx5_events_cleanup(struct mlx5_core_dev *dev)
{}

void mlx5_events_start(struct mlx5_core_dev *dev)
{}

void mlx5_events_stop(struct mlx5_core_dev *dev)
{}

/* This API is used only for processing and forwarding firmware
 * events to mlx5 consumer.
 */
int mlx5_notifier_register(struct mlx5_core_dev *dev, struct notifier_block *nb)
{}
EXPORT_SYMBOL();

int mlx5_notifier_unregister(struct mlx5_core_dev *dev, struct notifier_block *nb)
{}
EXPORT_SYMBOL();

int mlx5_notifier_call_chain(struct mlx5_events *events, unsigned int event, void *data)
{}

/* This API is used only for processing and forwarding driver-specific
 * events to mlx5 consumers.
 */
int mlx5_blocking_notifier_register(struct mlx5_core_dev *dev, struct notifier_block *nb)
{}
EXPORT_SYMBOL();

int mlx5_blocking_notifier_unregister(struct mlx5_core_dev *dev, struct notifier_block *nb)
{}
EXPORT_SYMBOL();

int mlx5_blocking_notifier_call_chain(struct mlx5_core_dev *dev, unsigned int event,
				      void *data)
{}