Skip to content

Commit

Permalink
TMP: device_type_name
Browse files Browse the repository at this point in the history
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
  • Loading branch information
Jiri Pirko committed Mar 8, 2022
1 parent b7c59e7 commit 8f98576
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/mellanox/mlxsw/core_linecards.c
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ static int mlxsw_linecard_devices_attach(struct mlxsw_linecard *linecard)
mlxsw_reg_mddq_device_info_unpack(mddq_pl, &msg_seq,
&data_valid, &flash_owner,
&device_index, NULL,
NULL, NULL);
NULL, NULL, NULL);
if (!data_valid)
break;
err = mlxsw_linecard_device_attach(mlxsw_core, linecard,
Expand Down Expand Up @@ -576,7 +576,7 @@ static int mlxsw_linecard_devices_update(struct mlxsw_linecard *linecard)
&device_index,
&info.fw_major,
&info.fw_minor,
&info.fw_sub_minor);
&info.fw_sub_minor, NULL);
if (!data_valid)
break;
mlxsw_linecard_device_update(linecard, device_index, &info);
Expand Down
15 changes: 14 additions & 1 deletion drivers/net/ethernet/mellanox/mlxsw/reg.h
Original file line number Diff line number Diff line change
Expand Up @@ -12221,6 +12221,15 @@ MLXSW_ITEM32(reg, mddq, device_info_fw_minor, 0x18, 16, 16);
*/
MLXSW_ITEM32(reg, mddq, device_info_fw_sub_minor, 0x18, 0, 16);

#define MLXSW_REG_MDDQ_DEVICE_TYPE_NAME_LEN 20

/* reg_mddq_device_type_name
* Device type ASCII name.
* Access: RO
*/
MLXSW_ITEM_BUF(reg, mddq, device_type_name, 0x20,
MLXSW_REG_MDDQ_DEVICE_TYPE_NAME_LEN);

static inline void
mlxsw_reg_mddq_device_info_pack(char *payload, u8 slot_index,
u8 request_msg_seq)
Expand All @@ -12234,7 +12243,8 @@ static inline void
mlxsw_reg_mddq_device_info_unpack(const char *payload, u8 *p_response_msg_seq,
bool *p_data_valid, bool *p_flash_owner,
u8 *p_device_index, u16 *p_fw_major,
u16 *p_fw_minor, u16 *p_fw_sub_minor)
u16 *p_fw_minor, u16 *p_fw_sub_minor,
char *device_type_name)
{
*p_response_msg_seq = mlxsw_reg_mddq_response_msg_seq_get(payload);
*p_data_valid = mlxsw_reg_mddq_data_valid_get(payload);
Expand All @@ -12247,6 +12257,9 @@ mlxsw_reg_mddq_device_info_unpack(const char *payload, u8 *p_response_msg_seq,
*p_fw_minor = mlxsw_reg_mddq_device_info_fw_minor_get(payload);
if (p_fw_sub_minor)
*p_fw_sub_minor = mlxsw_reg_mddq_device_info_fw_sub_minor_get(payload);
if (device_type_name)
mlxsw_reg_mddq_device_type_name_memcpy_from(payload,
device_type_name);
}

#define MLXSW_REG_MDDQ_SLOT_ASCII_NAME_LEN 20
Expand Down

0 comments on commit 8f98576

Please sign in to comment.