linux/net/ethtool/cmis_fw_update.c

// SPDX-License-Identifier: GPL-2.0-only

#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 {};

/* See section 9.4.2 "CMD 0041h: Firmware Management Features" in CMIS standard
 * revision 5.2.
 * struct cmis_cdb_fw_mng_features_rpl is a structured layout of the flat
 * array, ethtool_cmis_cdb_rpl::payload.
 */
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)
{}

/* See section 9.7.2 "CMD 0101h: Start Firmware Download" in CMIS standard
 * revision 5.2.
 * struct cmis_cdb_start_fw_download_pl is a structured layout of the
 * flat array, ethtool_cmis_cdb_request::payload.
 */
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)
{}

/* See section 9.7.4 "CMD 0103h: Write Firmware Block LPL" in CMIS standard
 * revision 5.2.
 * struct cmis_cdb_write_fw_block_lpl_pl is a structured layout of the
 * flat array, ethtool_cmis_cdb_request::payload.
 */
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)
{}

/* See section 9.7.10 "CMD 0109h: Run Firmware Image" in CMIS standard
 * revision 5.2.
 * struct cmis_cdb_run_fw_image_pl is a structured layout of the flat
 * array, ethtool_cmis_cdb_request::payload.
 */
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)
{}