Skip to content

Commit c155e22

Browse files
Guangbin Huangdavem330
authored andcommitted
net: hns3: rename macro of pci device id of vf
VF devices do not have speed division, its speed is depended on its PF. So macro name of PCI device id of VF is incorrent to have 100G info, it should be renamed by removing 100G info. Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent ae6f010 commit c155e22

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

drivers/net/ethernet/hisilicon/hns3/hnae3.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@
4343
#define HNAE3_DEV_ID_50GE_RDMA_MACSEC 0xA225
4444
#define HNAE3_DEV_ID_100G_RDMA_MACSEC 0xA226
4545
#define HNAE3_DEV_ID_200G_RDMA 0xA228
46-
#define HNAE3_DEV_ID_100G_VF 0xA22E
47-
#define HNAE3_DEV_ID_100G_RDMA_DCB_PFC_VF 0xA22F
46+
#define HNAE3_DEV_ID_VF 0xA22E
47+
#define HNAE3_DEV_ID_RDMA_DCB_PFC_VF 0xA22F
4848

4949
#define HNAE3_CLASS_NAME_SIZE 16
5050

drivers/net/ethernet/hisilicon/hns3/hns3_enet.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ static const struct pci_device_id hns3_pci_tbl[] = {
8383
HNAE3_DEV_SUPPORT_ROCE_DCB_BITS},
8484
{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_200G_RDMA),
8585
HNAE3_DEV_SUPPORT_ROCE_DCB_BITS},
86-
{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_100G_VF), 0},
87-
{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_100G_RDMA_DCB_PFC_VF),
86+
{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_VF), 0},
87+
{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_RDMA_DCB_PFC_VF),
8888
HNAE3_DEV_SUPPORT_ROCE_DCB_BITS},
8989
/* required last entry */
9090
{0, }
@@ -2048,8 +2048,8 @@ bool hns3_is_phys_func(struct pci_dev *pdev)
20482048
case HNAE3_DEV_ID_100G_RDMA_MACSEC:
20492049
case HNAE3_DEV_ID_200G_RDMA:
20502050
return true;
2051-
case HNAE3_DEV_ID_100G_VF:
2052-
case HNAE3_DEV_ID_100G_RDMA_DCB_PFC_VF:
2051+
case HNAE3_DEV_ID_VF:
2052+
case HNAE3_DEV_ID_RDMA_DCB_PFC_VF:
20532053
return false;
20542054
default:
20552055
dev_warn(&pdev->dev, "un-recognized pci device-id %u",

drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ static struct hnae3_ae_algo ae_algovf;
1919
static struct workqueue_struct *hclgevf_wq;
2020

2121
static const struct pci_device_id ae_algovf_pci_tbl[] = {
22-
{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_100G_VF), 0},
23-
{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_100G_RDMA_DCB_PFC_VF), 0},
22+
{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_VF), 0},
23+
{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_RDMA_DCB_PFC_VF),
24+
HNAE3_DEV_SUPPORT_ROCE_DCB_BITS},
2425
/* required last entry */
2526
{0, }
2627
};

0 commit comments

Comments
 (0)