#include <linux/ethtool.h>
#include <linux/firmware.h>
#include "common.h"
#include "module_fw.h"
#include "cmis.h"
struct cmis_fw_update_fw_mng_features { … };
struct cmis_cdb_fw_mng_features_rpl { … };
#define CMIS_CDB_FW_WRITE_MECHANISM_LPL …
static int
cmis_fw_update_fw_mng_features_get(struct ethtool_cmis_cdb *cdb,
struct net_device *dev,
struct cmis_fw_update_fw_mng_features *fw_mng,
struct ethnl_module_fw_flash_ntf_params *ntf_params)
{ … }
struct cmis_cdb_start_fw_download_pl { … };
static int
cmis_fw_update_start_download(struct ethtool_cmis_cdb *cdb,
struct ethtool_cmis_fw_update_params *fw_update,
struct cmis_fw_update_fw_mng_features *fw_mng)
{ … }
struct cmis_cdb_write_fw_block_lpl_pl { … };
static int
cmis_fw_update_write_image(struct ethtool_cmis_cdb *cdb,
struct ethtool_cmis_fw_update_params *fw_update,
struct cmis_fw_update_fw_mng_features *fw_mng)
{ … }
static int
cmis_fw_update_complete_download(struct ethtool_cmis_cdb *cdb,
struct net_device *dev,
struct cmis_fw_update_fw_mng_features *fw_mng,
struct ethnl_module_fw_flash_ntf_params *ntf_params)
{ … }
static int
cmis_fw_update_download_image(struct ethtool_cmis_cdb *cdb,
struct ethtool_cmis_fw_update_params *fw_update,
struct cmis_fw_update_fw_mng_features *fw_mng)
{ … }
enum { … };
static bool module_is_ready(u8 data)
{ … }
#define CMIS_MODULE_READY_MAX_DURATION_MSEC …
#define CMIS_MODULE_STATE_OFFSET …
static int
cmis_fw_update_wait_for_module_state(struct net_device *dev, u8 flags)
{ … }
struct cmis_cdb_run_fw_image_pl { … };
static int
cmis_fw_update_run_image(struct ethtool_cmis_cdb *cdb, struct net_device *dev,
struct ethnl_module_fw_flash_ntf_params *ntf_params)
{ … }
static int
cmis_fw_update_commit_image(struct ethtool_cmis_cdb *cdb,
struct net_device *dev,
struct ethnl_module_fw_flash_ntf_params *ntf_params)
{ … }
static int cmis_fw_update_reset(struct net_device *dev)
{ … }
void
ethtool_cmis_fw_update(struct ethtool_cmis_fw_update_params *fw_update)
{ … }