linux/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c

/* Broadcom NetXtreme-C/E network driver.
 *
 * Copyright (c) 2017 Broadcom Limited
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation.
 */

#include <linux/pci.h>
#include <linux/netdevice.h>
#include <linux/vmalloc.h>
#include <net/devlink.h>
#include "bnxt_hsi.h"
#include "bnxt.h"
#include "bnxt_hwrm.h"
#include "bnxt_vfr.h"
#include "bnxt_devlink.h"
#include "bnxt_ethtool.h"
#include "bnxt_ulp.h"
#include "bnxt_ptp.h"
#include "bnxt_coredump.h"
#include "bnxt_nvm_defs.h"

static void __bnxt_fw_recover(struct bnxt *bp)
{}

static int
bnxt_dl_flash_update(struct devlink *dl,
		     struct devlink_flash_update_params *params,
		     struct netlink_ext_ack *extack)
{}

static int bnxt_hwrm_remote_dev_reset_set(struct bnxt *bp, bool remote_reset)
{}

static char *bnxt_health_severity_str(enum bnxt_health_severity severity)
{}

static char *bnxt_health_remedy_str(enum bnxt_health_remedy remedy)
{}

static int bnxt_fw_diagnose(struct devlink_health_reporter *reporter,
			    struct devlink_fmsg *fmsg,
			    struct netlink_ext_ack *extack)
{}

static int bnxt_fw_dump(struct devlink_health_reporter *reporter,
			struct devlink_fmsg *fmsg, void *priv_ctx,
			struct netlink_ext_ack *extack)
{}

static int bnxt_fw_recover(struct devlink_health_reporter *reporter,
			   void *priv_ctx,
			   struct netlink_ext_ack *extack)
{}

static const struct devlink_health_reporter_ops bnxt_dl_fw_reporter_ops =;

static struct devlink_health_reporter *
__bnxt_dl_reporter_create(struct bnxt *bp,
			  const struct devlink_health_reporter_ops *ops)
{}

void bnxt_dl_fw_reporters_create(struct bnxt *bp)
{}

void bnxt_dl_fw_reporters_destroy(struct bnxt *bp)
{}

void bnxt_devlink_health_fw_report(struct bnxt *bp)
{}

void bnxt_dl_health_fw_status_update(struct bnxt *bp, bool healthy)
{}

void bnxt_dl_health_fw_recovery_done(struct bnxt *bp)
{}

static int bnxt_dl_info_get(struct devlink *dl, struct devlink_info_req *req,
			    struct netlink_ext_ack *extack);

static void
bnxt_dl_livepatch_report_err(struct bnxt *bp, struct netlink_ext_ack *extack,
			     struct hwrm_fw_livepatch_output *resp)
{}

/* Live patch status in NVM */
#define BNXT_LIVEPATCH_NOT_INSTALLED
#define BNXT_LIVEPATCH_INSTALLED
#define BNXT_LIVEPATCH_REMOVED
#define BNXT_LIVEPATCH_MASK
#define BNXT_LIVEPATCH_ACTIVATED

#define BNXT_LIVEPATCH_STATE(flags)

static int
bnxt_dl_livepatch_activate(struct bnxt *bp, struct netlink_ext_ack *extack)
{}

static int bnxt_dl_reload_down(struct devlink *dl, bool netns_change,
			       enum devlink_reload_action action,
			       enum devlink_reload_limit limit,
			       struct netlink_ext_ack *extack)
{}

static int bnxt_dl_reload_up(struct devlink *dl, enum devlink_reload_action action,
			     enum devlink_reload_limit limit, u32 *actions_performed,
			     struct netlink_ext_ack *extack)
{}

static bool bnxt_nvm_test(struct bnxt *bp, struct netlink_ext_ack *extack)
{}

static bool bnxt_dl_selftest_check(struct devlink *dl, unsigned int id,
				   struct netlink_ext_ack *extack)
{}

static enum devlink_selftest_status bnxt_dl_selftest_run(struct devlink *dl,
							 unsigned int id,
							 struct netlink_ext_ack *extack)
{}

static const struct devlink_ops bnxt_dl_ops =;

static const struct devlink_ops bnxt_vf_dl_ops;

enum bnxt_dl_param_id {};

static const struct bnxt_dl_nvm_param nvm_params[] =;

bnxt_nvm_data;

static void bnxt_copy_to_nvm_data(union bnxt_nvm_data *dst,
				  union devlink_param_value *src,
				  int nvm_num_bits, int dl_num_bytes)
{}

static void bnxt_copy_from_nvm_data(union devlink_param_value *dst,
				    union bnxt_nvm_data *src,
				    int nvm_num_bits, int dl_num_bytes)
{}

static int bnxt_hwrm_get_nvm_cfg_ver(struct bnxt *bp, u32 *nvm_cfg_ver)
{}

static int bnxt_dl_info_put(struct bnxt *bp, struct devlink_info_req *req,
			    enum bnxt_dl_version_type type, const char *key,
			    char *buf)
{}

#define BNXT_FW_SRT_PATCH
#define BNXT_FW_CRT_PATCH

static int bnxt_dl_livepatch_info_put(struct bnxt *bp,
				      struct devlink_info_req *req,
				      const char *key)
{}

#define HWRM_FW_VER_STR_LEN

static int bnxt_dl_info_get(struct devlink *dl, struct devlink_info_req *req,
			    struct netlink_ext_ack *extack)
{}

static int bnxt_hwrm_nvm_req(struct bnxt *bp, u32 param_id, void *msg,
			     union devlink_param_value *val)
{}

static int bnxt_dl_nvm_param_get(struct devlink *dl, u32 id,
				 struct devlink_param_gset_ctx *ctx)
{}

static int bnxt_dl_nvm_param_set(struct devlink *dl, u32 id,
				 struct devlink_param_gset_ctx *ctx,
				 struct netlink_ext_ack *extack)
{}

static int bnxt_dl_msix_validate(struct devlink *dl, u32 id,
				 union devlink_param_value val,
				 struct netlink_ext_ack *extack)
{}

static int bnxt_remote_dev_reset_get(struct devlink *dl, u32 id,
				     struct devlink_param_gset_ctx *ctx)
{}

static int bnxt_remote_dev_reset_set(struct devlink *dl, u32 id,
				     struct devlink_param_gset_ctx *ctx,
				     struct netlink_ext_ack *extack)
{}

static const struct devlink_param bnxt_dl_params[] =;

static int bnxt_dl_params_register(struct bnxt *bp)
{}

static void bnxt_dl_params_unregister(struct bnxt *bp)
{}

int bnxt_dl_register(struct bnxt *bp)
{}

void bnxt_dl_unregister(struct bnxt *bp)
{}