#include <linux/mlx5/driver.h>
#include <linux/mlx5/eswitch.h>
#include "mlx5_core.h"
#include "../../mlxfw/mlxfw.h"
#include "lib/tout.h"
enum { … };
enum { … };
enum { … };
enum { … };
int mlx5_query_board_id(struct mlx5_core_dev *dev)
{ … }
int mlx5_core_query_vendor_id(struct mlx5_core_dev *mdev, u32 *vendor_id)
{ … }
EXPORT_SYMBOL(…);
static int mlx5_get_pcam_reg(struct mlx5_core_dev *dev)
{ … }
static int mlx5_get_mcam_access_reg_group(struct mlx5_core_dev *dev,
enum mlx5_mcam_reg_groups group)
{ … }
static int mlx5_get_qcam_reg(struct mlx5_core_dev *dev)
{ … }
int mlx5_query_hca_caps(struct mlx5_core_dev *dev)
{ … }
int mlx5_cmd_init_hca(struct mlx5_core_dev *dev, u32 *sw_owner_id)
{ … }
int mlx5_cmd_teardown_hca(struct mlx5_core_dev *dev)
{ … }
int mlx5_cmd_force_teardown_hca(struct mlx5_core_dev *dev)
{ … }
int mlx5_cmd_fast_teardown_hca(struct mlx5_core_dev *dev)
{ … }
enum mlxsw_reg_mcc_instruction { … };
static int mlx5_reg_mcc_set(struct mlx5_core_dev *dev,
enum mlxsw_reg_mcc_instruction instr,
u16 component_index, u32 update_handle,
u32 component_size)
{ … }
static int mlx5_reg_mcc_query(struct mlx5_core_dev *dev,
u32 *update_handle, u8 *error_code,
u8 *control_state)
{ … }
static int mlx5_reg_mcda_set(struct mlx5_core_dev *dev,
u32 update_handle,
u32 offset, u16 size,
u8 *data)
{ … }
static int mlx5_reg_mcqi_query(struct mlx5_core_dev *dev,
u16 component_index, bool read_pending,
u8 info_type, u16 data_size, void *mcqi_data)
{ … }
static int mlx5_reg_mcqi_caps_query(struct mlx5_core_dev *dev, u16 component_index,
u32 *max_component_size, u8 *log_mcda_word_size,
u16 *mcda_max_write_size)
{ … }
struct mlx5_mlxfw_dev { … };
static int mlx5_component_query(struct mlxfw_dev *mlxfw_dev,
u16 component_index, u32 *p_max_size,
u8 *p_align_bits, u16 *p_max_write_size)
{ … }
static int mlx5_fsm_lock(struct mlxfw_dev *mlxfw_dev, u32 *fwhandle)
{ … }
static int mlx5_fsm_component_update(struct mlxfw_dev *mlxfw_dev, u32 fwhandle,
u16 component_index, u32 component_size)
{ … }
static int mlx5_fsm_block_download(struct mlxfw_dev *mlxfw_dev, u32 fwhandle,
u8 *data, u16 size, u32 offset)
{ … }
static int mlx5_fsm_component_verify(struct mlxfw_dev *mlxfw_dev, u32 fwhandle,
u16 component_index)
{ … }
static int mlx5_fsm_activate(struct mlxfw_dev *mlxfw_dev, u32 fwhandle)
{ … }
static int mlx5_fsm_query_state(struct mlxfw_dev *mlxfw_dev, u32 fwhandle,
enum mlxfw_fsm_state *fsm_state,
enum mlxfw_fsm_state_err *fsm_state_err)
{ … }
static void mlx5_fsm_cancel(struct mlxfw_dev *mlxfw_dev, u32 fwhandle)
{ … }
static void mlx5_fsm_release(struct mlxfw_dev *mlxfw_dev, u32 fwhandle)
{ … }
static int mlx5_fsm_reactivate(struct mlxfw_dev *mlxfw_dev, u8 *status)
{ … }
static const struct mlxfw_dev_ops mlx5_mlxfw_dev_ops = …;
int mlx5_firmware_flash(struct mlx5_core_dev *dev,
const struct firmware *firmware,
struct netlink_ext_ack *extack)
{ … }
static int mlx5_reg_mcqi_version_query(struct mlx5_core_dev *dev,
u16 component_index, bool read_pending,
u32 *mcqi_version_out)
{ … }
static int mlx5_reg_mcqs_query(struct mlx5_core_dev *dev, u32 *out,
u16 component_index)
{ … }
static int mlx5_get_boot_img_component_index(struct mlx5_core_dev *dev)
{ … }
static int
mlx5_fw_image_pending(struct mlx5_core_dev *dev,
int component_index,
bool *pending_version_exists)
{ … }
int mlx5_fw_version_query(struct mlx5_core_dev *dev,
u32 *running_ver, u32 *pending_ver)
{ … }