driver inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I9V6F8 CVE: NA
---------------------------------
Fix vf init and common user permissions issue in hiroce3 driver.
Fixes: ae52f9c522dd ("infiniband/hw/hiroce3: Add Huawei Intelligent Network Card RDMA Driver") Signed-off-by: Shuai Wu wushuai51@huawei.com --- drivers/infiniband/hw/hiroce3/roce.h | 2 +- drivers/infiniband/hw/hiroce3/roce_main.c | 2 +- drivers/net/ethernet/huawei/hinic3/hw/hinic3_pci_id_tbl.h | 1 + 3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/infiniband/hw/hiroce3/roce.h b/drivers/infiniband/hw/hiroce3/roce.h index d191628d9db0..0c9828a7abf4 100644 --- a/drivers/infiniband/hw/hiroce3/roce.h +++ b/drivers/infiniband/hw/hiroce3/roce.h @@ -53,7 +53,7 @@ #define ROCE_PCI_CFG_REGS_BAR0 0 #define ROCE_PCI_CFG_REGS_BAR3 3
-#define DEFAULT_ROCE_DEV_NODE_PRI 0640 +#define DEFAULT_ROCE_DEV_NODE_PRI 0666
#define ALPHA_THREADHOLD_UNIT_SHIFT 3
diff --git a/drivers/infiniband/hw/hiroce3/roce_main.c b/drivers/infiniband/hw/hiroce3/roce_main.c index 7b18894b8ab1..81e1969b459c 100644 --- a/drivers/infiniband/hw/hiroce3/roce_main.c +++ b/drivers/infiniband/hw/hiroce3/roce_main.c @@ -991,7 +991,7 @@ static bool is_device_v100(const struct hinic3_lld_dev *lld_dev) unsigned short ssdid = pdev->subsystem_device;
return (ssdid == HINIC3_DEV_SSID_2X25G) || (ssdid == HINIC3_DEV_SSID_4X25G) || - (ssdid == HINIC3_DEV_SSID_2X100G); + (ssdid == HINIC3_DEV_SSID_2X100G) || (ssdid == HINIC3_DEV_SSID_2X100G_VF); }
static int roce3_add_check(const struct hinic3_lld_dev *lld_dev) diff --git a/drivers/net/ethernet/huawei/hinic3/hw/hinic3_pci_id_tbl.h b/drivers/net/ethernet/huawei/hinic3/hw/hinic3_pci_id_tbl.h index d71474ea8458..2d5423e53fbc 100644 --- a/drivers/net/ethernet/huawei/hinic3/hw/hinic3_pci_id_tbl.h +++ b/drivers/net/ethernet/huawei/hinic3/hw/hinic3_pci_id_tbl.h @@ -37,6 +37,7 @@ #define HINIC3_DEV_SSID_2X25G 0x0051 #define HINIC3_DEV_SSID_4X25G 0x0052 #define HINIC3_DEV_SSID_2X100G 0x00A1 +#define HINIC3_DEV_SSID_2X100G_VF 0x1000
#endif