author | boris.chiu@oracle.com |
Mon, 03 Oct 2016 15:42:45 -0700 | |
branch | s11u3-sru |
changeset 7024 | 84310b997802 |
permissions | -rw-r--r-- |
7024
84310b997802
24516419 umad_get_ca() should pass the PF node_guid for CX3
boris.chiu@oracle.com
parents:
diff
changeset
|
1 |
#This patch was developed both in-house and from outside. We plan to submit it |
84310b997802
24516419 umad_get_ca() should pass the PF node_guid for CX3
boris.chiu@oracle.com
parents:
diff
changeset
|
2 |
#upstream, but do not yet have a target date for doing so |
84310b997802
24516419 umad_get_ca() should pass the PF node_guid for CX3
boris.chiu@oracle.com
parents:
diff
changeset
|
3 |
# |
84310b997802
24516419 umad_get_ca() should pass the PF node_guid for CX3
boris.chiu@oracle.com
parents:
diff
changeset
|
4 |
# HG changeset patch |
84310b997802
24516419 umad_get_ca() should pass the PF node_guid for CX3
boris.chiu@oracle.com
parents:
diff
changeset
|
5 |
# Parent c1b4449a11e307550ee85b73baed3cd69e1b87cf |
84310b997802
24516419 umad_get_ca() should pass the PF node_guid for CX3
boris.chiu@oracle.com
parents:
diff
changeset
|
6 |
24516419 umad_get_ca() should pass the PF node_guid for CX3 |
84310b997802
24516419 umad_get_ca() should pass the PF node_guid for CX3
boris.chiu@oracle.com
parents:
diff
changeset
|
7 |
|
84310b997802
24516419 umad_get_ca() should pass the PF node_guid for CX3
boris.chiu@oracle.com
parents:
diff
changeset
|
8 |
diff -r c1b4449a11e3 include/infiniband/umad.h |
84310b997802
24516419 umad_get_ca() should pass the PF node_guid for CX3
boris.chiu@oracle.com
parents:
diff
changeset
|
9 |
--- a/include/infiniband/umad.h Thu Aug 18 00:00:48 2016 -0700 |
84310b997802
24516419 umad_get_ca() should pass the PF node_guid for CX3
boris.chiu@oracle.com
parents:
diff
changeset
|
10 |
+++ b/include/infiniband/umad.h Sun Aug 21 22:33:49 2016 -0700 |
84310b997802
24516419 umad_get_ca() should pass the PF node_guid for CX3
boris.chiu@oracle.com
parents:
diff
changeset
|
11 |
@@ -129,6 +129,8 @@ |
84310b997802
24516419 umad_get_ca() should pass the PF node_guid for CX3
boris.chiu@oracle.com
parents:
diff
changeset
|
12 |
#define SYS_CA_HW_VERS "hw_rev" |
84310b997802
24516419 umad_get_ca() should pass the PF node_guid for CX3
boris.chiu@oracle.com
parents:
diff
changeset
|
13 |
#define SYS_CA_TYPE "hca_type" |
84310b997802
24516419 umad_get_ca() should pass the PF node_guid for CX3
boris.chiu@oracle.com
parents:
diff
changeset
|
14 |
#define SYS_CA_NODE_GUID "node_guid" |
84310b997802
24516419 umad_get_ca() should pass the PF node_guid for CX3
boris.chiu@oracle.com
parents:
diff
changeset
|
15 |
+#define SYS_CA_NODE_GUID_EXTERNAL \ |
84310b997802
24516419 umad_get_ca() should pass the PF node_guid for CX3
boris.chiu@oracle.com
parents:
diff
changeset
|
16 |
+ "node_guid_external" |
84310b997802
24516419 umad_get_ca() should pass the PF node_guid for CX3
boris.chiu@oracle.com
parents:
diff
changeset
|
17 |
#define SYS_CA_SYS_GUID "sys_image_guid" |
84310b997802
24516419 umad_get_ca() should pass the PF node_guid for CX3
boris.chiu@oracle.com
parents:
diff
changeset
|
18 |
|
84310b997802
24516419 umad_get_ca() should pass the PF node_guid for CX3
boris.chiu@oracle.com
parents:
diff
changeset
|
19 |
#define SYS_PORT_LMC "lid_mask_count" |
84310b997802
24516419 umad_get_ca() should pass the PF node_guid for CX3
boris.chiu@oracle.com
parents:
diff
changeset
|
20 |
diff -r c1b4449a11e3 src/umad.c |
84310b997802
24516419 umad_get_ca() should pass the PF node_guid for CX3
boris.chiu@oracle.com
parents:
diff
changeset
|
21 |
--- a/src/umad.c Thu Aug 18 00:00:48 2016 -0700 |
84310b997802
24516419 umad_get_ca() should pass the PF node_guid for CX3
boris.chiu@oracle.com
parents:
diff
changeset
|
22 |
+++ b/src/umad.c Sun Aug 21 22:33:49 2016 -0700 |
84310b997802
24516419 umad_get_ca() should pass the PF node_guid for CX3
boris.chiu@oracle.com
parents:
diff
changeset
|
23 |
@@ -456,7 +456,19 @@ |
84310b997802
24516419 umad_get_ca() should pass the PF node_guid for CX3
boris.chiu@oracle.com
parents:
diff
changeset
|
24 |
if ((r = sys_read_string(dir_name, SYS_CA_TYPE, ca->ca_type, |
84310b997802
24516419 umad_get_ca() should pass the PF node_guid for CX3
boris.chiu@oracle.com
parents:
diff
changeset
|
25 |
sizeof ca->ca_type)) < 0) |
84310b997802
24516419 umad_get_ca() should pass the PF node_guid for CX3
boris.chiu@oracle.com
parents:
diff
changeset
|
26 |
ca->ca_type[0] = '\0'; |
84310b997802
24516419 umad_get_ca() should pass the PF node_guid for CX3
boris.chiu@oracle.com
parents:
diff
changeset
|
27 |
+#if defined(__SVR4) && defined(__sun) |
84310b997802
24516419 umad_get_ca() should pass the PF node_guid for CX3
boris.chiu@oracle.com
parents:
diff
changeset
|
28 |
+ /* |
84310b997802
24516419 umad_get_ca() should pass the PF node_guid for CX3
boris.chiu@oracle.com
parents:
diff
changeset
|
29 |
+ * Get "node_guid_external" for the device. If it does not exist, |
84310b997802
24516419 umad_get_ca() should pass the PF node_guid for CX3
boris.chiu@oracle.com
parents:
diff
changeset
|
30 |
+ * or if the value node_guid_external is 0, use "node_guid" |
84310b997802
24516419 umad_get_ca() should pass the PF node_guid for CX3
boris.chiu@oracle.com
parents:
diff
changeset
|
31 |
+ */ |
84310b997802
24516419 umad_get_ca() should pass the PF node_guid for CX3
boris.chiu@oracle.com
parents:
diff
changeset
|
32 |
+ r = sys_read_guid(dir_name, SYS_CA_NODE_GUID_EXTERNAL, |
84310b997802
24516419 umad_get_ca() should pass the PF node_guid for CX3
boris.chiu@oracle.com
parents:
diff
changeset
|
33 |
+ &ca->node_guid); |
84310b997802
24516419 umad_get_ca() should pass the PF node_guid for CX3
boris.chiu@oracle.com
parents:
diff
changeset
|
34 |
+ if (((r < 0) || (ca->node_guid == 0)) && |
84310b997802
24516419 umad_get_ca() should pass the PF node_guid for CX3
boris.chiu@oracle.com
parents:
diff
changeset
|
35 |
+ ((r = sys_read_guid(dir_name, SYS_CA_NODE_GUID, |
84310b997802
24516419 umad_get_ca() should pass the PF node_guid for CX3
boris.chiu@oracle.com
parents:
diff
changeset
|
36 |
+ &ca->node_guid)) < 0)) |
84310b997802
24516419 umad_get_ca() should pass the PF node_guid for CX3
boris.chiu@oracle.com
parents:
diff
changeset
|
37 |
+#else |
84310b997802
24516419 umad_get_ca() should pass the PF node_guid for CX3
boris.chiu@oracle.com
parents:
diff
changeset
|
38 |
if ((r = sys_read_guid(dir_name, SYS_CA_NODE_GUID, &ca->node_guid)) < 0) |
84310b997802
24516419 umad_get_ca() should pass the PF node_guid for CX3
boris.chiu@oracle.com
parents:
diff
changeset
|
39 |
+#endif |
84310b997802
24516419 umad_get_ca() should pass the PF node_guid for CX3
boris.chiu@oracle.com
parents:
diff
changeset
|
40 |
return r; |
84310b997802
24516419 umad_get_ca() should pass the PF node_guid for CX3
boris.chiu@oracle.com
parents:
diff
changeset
|
41 |
if ((r = |
84310b997802
24516419 umad_get_ca() should pass the PF node_guid for CX3
boris.chiu@oracle.com
parents:
diff
changeset
|
42 |
sys_read_guid(dir_name, SYS_CA_SYS_GUID, &ca->system_guid)) < 0) |