net: hns3: rename macro of pci device id of vf
authorGuangbin Huang <huangguangbin2@huawei.com>
Fri, 25 Sep 2020 00:26:18 +0000 (08:26 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 25 Sep 2020 03:19:25 +0000 (20:19 -0700)
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>
drivers/net/ethernet/hisilicon/hns3/hnae3.h
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c

index 56c896999813704a7141849fd5cd01a0f4617ad7..ad7257ebe51e726255c670176b88b346b12988bd 100644 (file)
@@ -43,8 +43,8 @@
 #define HNAE3_DEV_ID_50GE_RDMA_MACSEC          0xA225
 #define HNAE3_DEV_ID_100G_RDMA_MACSEC          0xA226
 #define HNAE3_DEV_ID_200G_RDMA                 0xA228
-#define HNAE3_DEV_ID_100G_VF                   0xA22E
-#define HNAE3_DEV_ID_100G_RDMA_DCB_PFC_VF      0xA22F
+#define HNAE3_DEV_ID_VF                                0xA22E
+#define HNAE3_DEV_ID_RDMA_DCB_PFC_VF           0xA22F
 
 #define HNAE3_CLASS_NAME_SIZE 16
 
index 5126ad85f4721240cce79ec0aefa037e0d97374f..00e400244809cf64730477f749b270392dc2fdb4 100644 (file)
@@ -83,8 +83,8 @@ static const struct pci_device_id hns3_pci_tbl[] = {
         HNAE3_DEV_SUPPORT_ROCE_DCB_BITS},
        {PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_200G_RDMA),
         HNAE3_DEV_SUPPORT_ROCE_DCB_BITS},
-       {PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_100G_VF), 0},
-       {PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_100G_RDMA_DCB_PFC_VF),
+       {PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_VF), 0},
+       {PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_RDMA_DCB_PFC_VF),
         HNAE3_DEV_SUPPORT_ROCE_DCB_BITS},
        /* required last entry */
        {0, }
@@ -2048,8 +2048,8 @@ bool hns3_is_phys_func(struct pci_dev *pdev)
        case HNAE3_DEV_ID_100G_RDMA_MACSEC:
        case HNAE3_DEV_ID_200G_RDMA:
                return true;
-       case HNAE3_DEV_ID_100G_VF:
-       case HNAE3_DEV_ID_100G_RDMA_DCB_PFC_VF:
+       case HNAE3_DEV_ID_VF:
+       case HNAE3_DEV_ID_RDMA_DCB_PFC_VF:
                return false;
        default:
                dev_warn(&pdev->dev, "un-recognized pci device-id %u",
index f9f831267431df5e20cc547b4a1b51ba9f66b819..307b18c9f50fa0f657b0e94bfaaef0092de41691 100644 (file)
@@ -19,8 +19,9 @@ static struct hnae3_ae_algo ae_algovf;
 static struct workqueue_struct *hclgevf_wq;
 
 static const struct pci_device_id ae_algovf_pci_tbl[] = {
-       {PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_100G_VF), 0},
-       {PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_100G_RDMA_DCB_PFC_VF), 0},
+       {PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_VF), 0},
+       {PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_RDMA_DCB_PFC_VF),
+        HNAE3_DEV_SUPPORT_ROCE_DCB_BITS},
        /* required last entry */
        {0, }
 };