#include <linux/netlink.h>
#include <net/devlink.h>
#include <linux/firmware.h>
#include "hinic_port.h"
#include "hinic_devlink.h"
#include "hinic_hw_dev.h"
static bool check_image_valid(struct hinic_devlink_priv *priv, const u8 *buf,
u32 image_size, struct host_image_st *host_image)
{ … }
static bool check_image_integrity(struct hinic_devlink_priv *priv,
struct host_image_st *host_image,
u32 update_type)
{ … }
static int check_image_device_type(struct hinic_devlink_priv *priv,
u32 image_device_type)
{ … }
static int hinic_flash_fw(struct hinic_devlink_priv *priv, const u8 *data,
struct host_image_st *host_image)
{ … }
static int hinic_firmware_update(struct hinic_devlink_priv *priv,
const struct firmware *fw,
struct netlink_ext_ack *extack)
{ … }
static int hinic_devlink_flash_update(struct devlink *devlink,
struct devlink_flash_update_params *params,
struct netlink_ext_ack *extack)
{ … }
static const struct devlink_ops hinic_devlink_ops = …;
struct devlink *hinic_devlink_alloc(struct device *dev)
{ … }
void hinic_devlink_free(struct devlink *devlink)
{ … }
void hinic_devlink_register(struct hinic_devlink_priv *priv)
{ … }
void hinic_devlink_unregister(struct hinic_devlink_priv *priv)
{ … }
static void chip_fault_show(struct devlink_fmsg *fmsg,
struct hinic_fault_event *event)
{ … }
static void fault_report_show(struct devlink_fmsg *fmsg,
struct hinic_fault_event *event)
{ … }
static int hinic_hw_reporter_dump(struct devlink_health_reporter *reporter,
struct devlink_fmsg *fmsg, void *priv_ctx,
struct netlink_ext_ack *extack)
{ … }
static void mgmt_watchdog_report_show(struct devlink_fmsg *fmsg,
struct hinic_mgmt_watchdog_info *winfo)
{ … }
static int hinic_fw_reporter_dump(struct devlink_health_reporter *reporter,
struct devlink_fmsg *fmsg, void *priv_ctx,
struct netlink_ext_ack *extack)
{ … }
static const struct devlink_health_reporter_ops hinic_hw_fault_reporter_ops = …;
static const struct devlink_health_reporter_ops hinic_fw_fault_reporter_ops = …;
int hinic_health_reporters_create(struct hinic_devlink_priv *priv)
{ … }
void hinic_health_reporters_destroy(struct hinic_devlink_priv *priv)
{ … }