libxscale: Match dev by vid and did
Match dev by vid and did. Signed-off-by: Xin Tian <tianx@yunsilicon.com>
This commit is contained in:
parent
7d36592178
commit
c72f2000d2
85
0052-libxscale-Match-dev-by-vid-and-did.patch
Normal file
85
0052-libxscale-Match-dev-by-vid-and-did.patch
Normal file
@ -0,0 +1,85 @@
|
||||
From c51e33b6a7b21ea3cc1230838d95d5428396be3b Mon Sep 17 00:00:00 2001
|
||||
From: Xin Tian <tianx@yunsilicon.com>
|
||||
Date: Thu, 20 Mar 2025 15:33:54 +0800
|
||||
Subject: [PATCH] libxscale: Match dev by vid and did
|
||||
|
||||
Match dev by vid and did.
|
||||
|
||||
Signed-off-by: Xin Tian <tianx@yunsilicon.com>
|
||||
---
|
||||
providers/xscale/xscale.c | 20 +++++++++++++++-----
|
||||
providers/xscale/xscale.h | 18 ++++++++++++++++++
|
||||
2 files changed, 33 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/providers/xscale/xscale.c b/providers/xscale/xscale.c
|
||||
index e6792b9..e24cfd2 100644
|
||||
--- a/providers/xscale/xscale.c
|
||||
+++ b/providers/xscale/xscale.c
|
||||
@@ -23,10 +23,6 @@
|
||||
#include "wqe.h"
|
||||
#include "xsc_hsi.h"
|
||||
|
||||
-#ifndef PCI_VENDOR_ID_MELLANOX
|
||||
-#define PCI_VENDOR_ID_MELLANOX 0x15b3
|
||||
-#endif
|
||||
-
|
||||
#ifndef CPU_OR
|
||||
#define CPU_OR(x, y, z) do {} while (0)
|
||||
#endif
|
||||
@@ -35,9 +31,23 @@
|
||||
#define CPU_EQUAL(x, y) 1
|
||||
#endif
|
||||
|
||||
-#define HCA(v, d) VERBS_PCI_MATCH(PCI_VENDOR_ID_##v, d, NULL)
|
||||
static const struct verbs_match_ent hca_table[] = {
|
||||
VERBS_MODALIAS_MATCH("*xscale*", NULL),
|
||||
+ VERBS_PCI_MATCH(XSC_PCI_VENDOR_ID, XSC_MC_PF_DEV_ID, NULL),
|
||||
+ VERBS_PCI_MATCH(XSC_PCI_VENDOR_ID, XSC_MC_VF_DEV_ID, NULL),
|
||||
+ VERBS_PCI_MATCH(XSC_PCI_VENDOR_ID, XSC_MC_PF_DEV_ID_DIAMOND, NULL),
|
||||
+ VERBS_PCI_MATCH(XSC_PCI_VENDOR_ID, XSC_MC_PF_DEV_ID_DIAMOND_NEXT, NULL),
|
||||
+
|
||||
+ VERBS_PCI_MATCH(XSC_PCI_VENDOR_ID, XSC_MF_HOST_PF_DEV_ID, NULL),
|
||||
+ VERBS_PCI_MATCH(XSC_PCI_VENDOR_ID, XSC_MF_HOST_VF_DEV_ID, NULL),
|
||||
+ VERBS_PCI_MATCH(XSC_PCI_VENDOR_ID, XSC_MF_SOC_PF_DEV_ID, NULL),
|
||||
+
|
||||
+ VERBS_PCI_MATCH(XSC_PCI_VENDOR_ID, XSC_MS_PF_DEV_ID, NULL),
|
||||
+ VERBS_PCI_MATCH(XSC_PCI_VENDOR_ID, XSC_MS_VF_DEV_ID, NULL),
|
||||
+
|
||||
+ VERBS_PCI_MATCH(XSC_PCI_VENDOR_ID, XSC_MV_HOST_PF_DEV_ID, NULL),
|
||||
+ VERBS_PCI_MATCH(XSC_PCI_VENDOR_ID, XSC_MV_HOST_VF_DEV_ID, NULL),
|
||||
+ VERBS_PCI_MATCH(XSC_PCI_VENDOR_ID, XSC_MV_SOC_PF_DEV_ID, NULL),
|
||||
{}
|
||||
};
|
||||
|
||||
diff --git a/providers/xscale/xscale.h b/providers/xscale/xscale.h
|
||||
index 0aee472..c6cc9f7 100644
|
||||
--- a/providers/xscale/xscale.h
|
||||
+++ b/providers/xscale/xscale.h
|
||||
@@ -171,6 +171,24 @@ struct xsc_spinlock {
|
||||
int need_lock;
|
||||
};
|
||||
|
||||
+#define XSC_PCI_VENDOR_ID 0x1f67
|
||||
+
|
||||
+#define XSC_MC_PF_DEV_ID 0x1011
|
||||
+#define XSC_MC_VF_DEV_ID 0x1012
|
||||
+#define XSC_MC_PF_DEV_ID_DIAMOND 0x1021
|
||||
+#define XSC_MC_PF_DEV_ID_DIAMOND_NEXT 0x1023
|
||||
+
|
||||
+#define XSC_MF_HOST_PF_DEV_ID 0x1051
|
||||
+#define XSC_MF_HOST_VF_DEV_ID 0x1052
|
||||
+#define XSC_MF_SOC_PF_DEV_ID 0x1053
|
||||
+
|
||||
+#define XSC_MS_PF_DEV_ID 0x1111
|
||||
+#define XSC_MS_VF_DEV_ID 0x1112
|
||||
+
|
||||
+#define XSC_MV_HOST_PF_DEV_ID 0x1151
|
||||
+#define XSC_MV_HOST_VF_DEV_ID 0x1152
|
||||
+#define XSC_MV_SOC_PF_DEV_ID 0x1153
|
||||
+
|
||||
/* PAGE_SHIFT determines the page size */
|
||||
|
||||
#define PAGE_SHIFT 12
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
Name: rdma-core
|
||||
Version: 50.0
|
||||
Release: 23
|
||||
Release: 25
|
||||
Summary: RDMA core userspace libraries and daemons
|
||||
License: GPL-2.0-only OR BSD-2-Clause AND BSD-3-Clause
|
||||
Url: https://github.com/linux-rdma/rdma-core
|
||||
@ -51,6 +51,7 @@ patch43: 0043-libhns-Fix-missing-fields-for-SRQ-WC.patch
|
||||
patch44: 0044-libxscale-Add-Yunsilicon-User-Space-RDMA-Driver.patch
|
||||
patch45: 0045-libhns-fix-incorrectly-using-fixed-pagesize.patch
|
||||
patch46: 0046-libhns-fix-missing-new-IO-support-for-DCA.patch
|
||||
patch52: 0052-libxscale-Match-dev-by-vid-and-did.patch
|
||||
|
||||
BuildRequires: binutils cmake >= 2.8.11 gcc libudev-devel pkgconfig pkgconfig(libnl-3.0)
|
||||
BuildRequires: pkgconfig(libnl-route-3.0) systemd systemd-devel
|
||||
@ -628,13 +629,24 @@ fi
|
||||
%doc %{_docdir}/%{name}-%{version}/70-persistent-ipoib.rules
|
||||
|
||||
%changelog
|
||||
* Thu Mar 20 2025 Xin Tian <tianx@yunsilicon.com> - 50.0-25
|
||||
- Type: bugfix
|
||||
- ID: NA
|
||||
- SUG: NA
|
||||
- DESC: [libxscale] Match dev by vid and did
|
||||
|
||||
* Wed Apr 4 2025 Xinghai Cen <cenxinghai@h-partners.com> - 50.0-24
|
||||
- Type: requirment
|
||||
- ID: NA
|
||||
- SUG: NA
|
||||
- DESC: No code modification, just a pile
|
||||
|
||||
* Mon Mar 31 2025 Xinghai Cen <cenxinghai@h-partners.com> - 50.0-23
|
||||
- Type: bugfix
|
||||
- ID: NA
|
||||
- SUG: NA
|
||||
- DESC: Fix some bugs for libhns
|
||||
|
||||
|
||||
* Wed Feb 26 2025 Xin Tian <tianx@yunsilicon.com> - 50.0-22
|
||||
- Type: requirement
|
||||
- ID: NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user