diff mbox series

[08/10] net/hns3: support get device version when dump register

Message ID 1617184904-55349-9-git-send-email-humin29@huawei.com (mailing list archive)
State Accepted
Delegated to: Ferruh Yigit
Headers show
Series some bugfixes for hns3 PMD | expand


Context Check Description
ci/checkpatch success coding style OK

Commit Message

Min Hu (Connor) March 31, 2021, 10:01 a.m. UTC
From: Chengwen Feng <fengchengwen@huawei.com>

Support get device version which is equal to the firmware version
when dump register.

Fixes: 936eda25e8da ("net/hns3: support dump register")
Cc: stable@dpdk.org

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
 drivers/net/hns3/hns3_regs.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series


diff --git a/drivers/net/hns3/hns3_regs.c b/drivers/net/hns3/hns3_regs.c
index 4022bb9..cfcd080 100644
--- a/drivers/net/hns3/hns3_regs.c
+++ b/drivers/net/hns3/hns3_regs.c
@@ -504,6 +504,8 @@  hns3_get_regs(struct rte_eth_dev *eth_dev, struct rte_dev_reg_info *regs)
 	if (regs->length && regs->length != length)
 		return -ENOTSUP;
+	regs->version = hw->fw_version;
 	/* fetching per-PF registers values from PF PCIe register space */
 	data += hns3_direct_access_regs(hw, data);