driver inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I9U3LZ CVE: NA
---------------------------------
Modify hrn3 dev file permissions to support common users use the RDMA API.
Fixes: 5bc8dbb5fdf5 ("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 6e73a04ca..aa16b60c4 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 bcb39a5e5..9f6f327d9 100644 --- a/drivers/infiniband/hw/hiroce3/roce_main.c +++ b/drivers/infiniband/hw/hiroce3/roce_main.c @@ -992,7 +992,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 d71474ea8..2d5423e53 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