Commit b9e23b82 authored by Fengyan Mu's avatar Fengyan Mu Committed by Fengyan
Browse files

UNIC: Support identify UBoE device through device id

driver inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I850RQ


CVE: NA

----------------------------------------------------------

The hns3 driver add the ability that support identifying device
which is UB device over ethernet through the new device id
including physical device and virtual device.

Signed-off-by: default avatarFengyan Mu <mufengyan@hisilicon.com>
Signed-off-by: default avatarJunxin Chen <chenjunxin1@huawei.com>
parent 631518bf
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -59,8 +59,10 @@
#define HNAE3_DEV_ID_VF				0xA22E
#define HNAE3_DEV_ID_RDMA_DCB_PFC_VF		0xA22F
#define HNAE3_DEV_ID_UDMA_OVER_UBL		0xA260
#define HNAE3_DEV_ID_UDMA			0xA261
#define HNAE3_DEV_ID_RDMA_OVER_UBL		0xA262
#define HNAE3_DEV_ID_UDMA_OVER_UBL_VF		0xA268
#define HNAE3_DEV_ID_UDMA_VF			0xA269
#define HNAE3_DEV_ID_RDMA_OVER_UBL_VF		0xA26A

#define HNAE3_CLASS_NAME_SIZE 16
+6 −0
Original line number Diff line number Diff line
@@ -103,9 +103,13 @@ static const struct pci_device_id hns3_pci_tbl[] = {
	 HNAE3_DEV_SUPPORT_ROCE_DCB_BITS},
	{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_400G_ROH),
	 HNAE3_DEV_SUPPORT_ROCE_DCB_BITS},
	{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_UDMA),
	 HNAE3_DEV_SUPPORT_UDMA_DCB_BITS},
	{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_VF), 0},
	{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_RDMA_DCB_PFC_VF),
	 HNAE3_DEV_SUPPORT_ROCE_DCB_BITS},
	{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_UDMA_VF),
	 HNAE3_DEV_SUPPORT_UDMA_DCB_BITS},
#ifdef CONFIG_HNS3_UBL
	{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_UDMA_OVER_UBL),
	 HNAE3_DEV_SUPPORT_UDMA_OVER_UBL_DCB_BITS},
@@ -3310,6 +3314,7 @@ bool hns3_is_phys_func(struct pci_dev *pdev)
	case HNAE3_DEV_ID_UDMA_OVER_UBL:
	case HNAE3_DEV_ID_RDMA_OVER_UBL:
#endif
	case HNAE3_DEV_ID_UDMA:
		return true;
	case HNAE3_DEV_ID_VF:
	case HNAE3_DEV_ID_RDMA_DCB_PFC_VF:
@@ -3317,6 +3322,7 @@ bool hns3_is_phys_func(struct pci_dev *pdev)
	case HNAE3_DEV_ID_UDMA_OVER_UBL_VF:
	case HNAE3_DEV_ID_RDMA_OVER_UBL_VF:
#endif
	case HNAE3_DEV_ID_UDMA_VF:
		return false;
	default:
		dev_warn(&pdev->dev, "un-recognized pci device-id %u",
+1 −0
Original line number Diff line number Diff line
@@ -79,6 +79,7 @@ static const struct pci_device_id ae_algo_pci_tbl[] = {
	{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_200G_RDMA), 0},
	{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_200G_ROH), 0},
	{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_400G_ROH), 0},
	{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_UDMA), 0},
#ifdef CONFIG_HNS3_UBL
	{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_UDMA_OVER_UBL), 0},
	{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_RDMA_OVER_UBL), 0},
+2 −0
Original line number Diff line number Diff line
@@ -28,6 +28,8 @@ static const struct pci_device_id ae_algovf_pci_tbl[] = {
	{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_VF), 0},
	{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_RDMA_DCB_PFC_VF),
	 HNAE3_DEV_SUPPORT_ROCE_DCB_BITS},
	{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_UDMA_VF),
	 HNAE3_DEV_SUPPORT_UDMA_DCB_BITS},
#ifdef CONFIG_HNS3_UBL
	{PCI_VDEVICE(HUAWEI, HNAE3_DEV_ID_UDMA_OVER_UBL_VF),
	 HNAE3_DEV_SUPPORT_UDMA_OVER_UBL_DCB_BITS},