]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: hns3: Support tlv in regs data for HNS3 PF driver
authorJijie Shao <shaojijie@huawei.com>
Tue, 15 Aug 2023 06:06:39 +0000 (14:06 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Sep 2023 07:48:05 +0000 (09:48 +0200)
commit1d3751be00c36066c0d2cd8f4a5af3d54617e63e
tree20fd79b959f4165223e05853094077f7ce5332a1
parentdf34972a33d268a7113c119fe4e4b07a6819aa0c
net: hns3: Support tlv in regs data for HNS3 PF driver

[ Upstream commit d8634b7c3f62d265fc2ecf29286aa9c5b78f969f ]

The dump register function is being refactored.
The second step in refactoring is to support tlv info in regs data for
HNS3 PF driver.

Currently, if we use "ethtool -d" to dump regs value,
the output is as follows:
  offset1: 00 01 02 03 04 05 ...
  offset2:10 11 12 13 14 15 ...
  ......

We can't get the value of a register directly.

This patch deletes the original separator information and
add tag_len_value information in regs data.
ethtool can parse register data in key-value format by -d command.

a patch will be added to the ethtool to parse regs data
in the following format:
  reg1 : value2
  reg2 : value2
  ......

Signed-off-by: Jijie Shao <shaojijie@huawei.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stable-dep-of: 36122201eeae ("net: hns3: fix wrong rpu tln reg issue")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_regs.c