net/hns3: extract common function to obtain revision ID
authorHuisong Li <lihuisong@huawei.com>
Sat, 22 Jan 2022 01:51:37 +0000 (09:51 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 27 Jan 2022 13:39:13 +0000 (14:39 +0100)
commitf5ed7d99cf45d550a69c1430b7c4a5623a9c774a
tree9138d5807ce22f57092d036d892a902b9c5f4eeb
parent5608b54756d91505e66e58c2562601b3f7e2fe80
net/hns3: extract common function to obtain revision ID

The code logic of obtaining the revision ID of PCI device is the same
for PF and VF driver. This patch extracts a common interface to do it.

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
drivers/net/hns3/hns3_common.c
drivers/net/hns3/hns3_common.h
drivers/net/hns3/hns3_ethdev.c
drivers/net/hns3/hns3_ethdev_vf.c