author | Misaki Miyashita <Misaki.Miyashita@Oracle.COM> |
Thu, 13 Oct 2016 14:47:30 -0700 | |
changeset 7103 | 398c9d0ab0f3 |
parent 6885 | ba96d2ed0291 |
permissions | -rw-r--r-- |
6885
ba96d2ed0291
23302428 Re-enabling an already enabled IB port resets the port
qian.l.liu@oracle.com <qian.l.liu@oracle.com>
parents:
diff
changeset
|
1 |
# This patch was developed both in-house and from outside. We plan to submit it |
ba96d2ed0291
23302428 Re-enabling an already enabled IB port resets the port
qian.l.liu@oracle.com <qian.l.liu@oracle.com>
parents:
diff
changeset
|
2 |
# upstream, but do not yet have a target date for doing so |
ba96d2ed0291
23302428 Re-enabling an already enabled IB port resets the port
qian.l.liu@oracle.com <qian.l.liu@oracle.com>
parents:
diff
changeset
|
3 |
# |
ba96d2ed0291
23302428 Re-enabling an already enabled IB port resets the port
qian.l.liu@oracle.com <qian.l.liu@oracle.com>
parents:
diff
changeset
|
4 |
# HG changeset patch |
ba96d2ed0291
23302428 Re-enabling an already enabled IB port resets the port
qian.l.liu@oracle.com <qian.l.liu@oracle.com>
parents:
diff
changeset
|
5 |
# Parent fdf4097d37ca807fc7f99fc7b0451422e88c9b86 |
ba96d2ed0291
23302428 Re-enabling an already enabled IB port resets the port
qian.l.liu@oracle.com <qian.l.liu@oracle.com>
parents:
diff
changeset
|
6 |
22672457 ibqueryerrors dumps core with invalid port specified |
ba96d2ed0291
23302428 Re-enabling an already enabled IB port resets the port
qian.l.liu@oracle.com <qian.l.liu@oracle.com>
parents:
diff
changeset
|
7 |
|
ba96d2ed0291
23302428 Re-enabling an already enabled IB port resets the port
qian.l.liu@oracle.com <qian.l.liu@oracle.com>
parents:
diff
changeset
|
8 |
diff -r fdf4097d37ca libibnetdisc/src/ibnetdisc.c |
ba96d2ed0291
23302428 Re-enabling an already enabled IB port resets the port
qian.l.liu@oracle.com <qian.l.liu@oracle.com>
parents:
diff
changeset
|
9 |
--- a/libibnetdisc/src/ibnetdisc.c Mon Aug 29 10:50:02 2016 -0700 |
ba96d2ed0291
23302428 Re-enabling an already enabled IB port resets the port
qian.l.liu@oracle.com <qian.l.liu@oracle.com>
parents:
diff
changeset
|
10 |
+++ b/libibnetdisc/src/ibnetdisc.c Thu Sep 01 16:05:30 2016 -0700 |
ba96d2ed0291
23302428 Re-enabling an already enabled IB port resets the port
qian.l.liu@oracle.com <qian.l.liu@oracle.com>
parents:
diff
changeset
|
11 |
@@ -610,7 +610,11 @@ |
ba96d2ed0291
23302428 Re-enabling an already enabled IB port resets the port
qian.l.liu@oracle.com <qian.l.liu@oracle.com>
parents:
diff
changeset
|
12 |
ibnd_node_t *ibnd_find_node_dr(ibnd_fabric_t * fabric, char *dr_str) |
ba96d2ed0291
23302428 Re-enabling an already enabled IB port resets the port
qian.l.liu@oracle.com <qian.l.liu@oracle.com>
parents:
diff
changeset
|
13 |
{ |
ba96d2ed0291
23302428 Re-enabling an already enabled IB port resets the port
qian.l.liu@oracle.com <qian.l.liu@oracle.com>
parents:
diff
changeset
|
14 |
ibnd_port_t *rc = ibnd_find_port_dr(fabric, dr_str); |
ba96d2ed0291
23302428 Re-enabling an already enabled IB port resets the port
qian.l.liu@oracle.com <qian.l.liu@oracle.com>
parents:
diff
changeset
|
15 |
- return rc->node; |
ba96d2ed0291
23302428 Re-enabling an already enabled IB port resets the port
qian.l.liu@oracle.com <qian.l.liu@oracle.com>
parents:
diff
changeset
|
16 |
+ /* Check whether the specified port is found */ |
ba96d2ed0291
23302428 Re-enabling an already enabled IB port resets the port
qian.l.liu@oracle.com <qian.l.liu@oracle.com>
parents:
diff
changeset
|
17 |
+ if (rc == NULL) |
ba96d2ed0291
23302428 Re-enabling an already enabled IB port resets the port
qian.l.liu@oracle.com <qian.l.liu@oracle.com>
parents:
diff
changeset
|
18 |
+ return NULL; |
ba96d2ed0291
23302428 Re-enabling an already enabled IB port resets the port
qian.l.liu@oracle.com <qian.l.liu@oracle.com>
parents:
diff
changeset
|
19 |
+ else |
ba96d2ed0291
23302428 Re-enabling an already enabled IB port resets the port
qian.l.liu@oracle.com <qian.l.liu@oracle.com>
parents:
diff
changeset
|
20 |
+ return rc->node; |
ba96d2ed0291
23302428 Re-enabling an already enabled IB port resets the port
qian.l.liu@oracle.com <qian.l.liu@oracle.com>
parents:
diff
changeset
|
21 |
} |
ba96d2ed0291
23302428 Re-enabling an already enabled IB port resets the port
qian.l.liu@oracle.com <qian.l.liu@oracle.com>
parents:
diff
changeset
|
22 |
|
ba96d2ed0291
23302428 Re-enabling an already enabled IB port resets the port
qian.l.liu@oracle.com <qian.l.liu@oracle.com>
parents:
diff
changeset
|
23 |
void add_to_nodeguid_hash(ibnd_node_t * node, ibnd_node_t * hash[]) |
ba96d2ed0291
23302428 Re-enabling an already enabled IB port resets the port
qian.l.liu@oracle.com <qian.l.liu@oracle.com>
parents:
diff
changeset
|
24 |
@@ -911,6 +915,8 @@ |
ba96d2ed0291
23302428 Re-enabling an already enabled IB port resets the port
qian.l.liu@oracle.com <qian.l.liu@oracle.com>
parents:
diff
changeset
|
25 |
} |
ba96d2ed0291
23302428 Re-enabling an already enabled IB port resets the port
qian.l.liu@oracle.com <qian.l.liu@oracle.com>
parents:
diff
changeset
|
26 |
|
ba96d2ed0291
23302428 Re-enabling an already enabled IB port resets the port
qian.l.liu@oracle.com <qian.l.liu@oracle.com>
parents:
diff
changeset
|
27 |
cur_node = fabric->from_node; |
ba96d2ed0291
23302428 Re-enabling an already enabled IB port resets the port
qian.l.liu@oracle.com <qian.l.liu@oracle.com>
parents:
diff
changeset
|
28 |
+ if (!cur_node) |
ba96d2ed0291
23302428 Re-enabling an already enabled IB port resets the port
qian.l.liu@oracle.com <qian.l.liu@oracle.com>
parents:
diff
changeset
|
29 |
+ return NULL; |
ba96d2ed0291
23302428 Re-enabling an already enabled IB port resets the port
qian.l.liu@oracle.com <qian.l.liu@oracle.com>
parents:
diff
changeset
|
30 |
|
ba96d2ed0291
23302428 Re-enabling an already enabled IB port resets the port
qian.l.liu@oracle.com <qian.l.liu@oracle.com>
parents:
diff
changeset
|
31 |
if (str2drpath(&path, dr_str, 0, 0) == -1) |
ba96d2ed0291
23302428 Re-enabling an already enabled IB port resets the port
qian.l.liu@oracle.com <qian.l.liu@oracle.com>
parents:
diff
changeset
|
32 |
return NULL; |
ba96d2ed0291
23302428 Re-enabling an already enabled IB port resets the port
qian.l.liu@oracle.com <qian.l.liu@oracle.com>
parents:
diff
changeset
|
33 |
@@ -921,6 +927,10 @@ |
ba96d2ed0291
23302428 Re-enabling an already enabled IB port resets the port
qian.l.liu@oracle.com <qian.l.liu@oracle.com>
parents:
diff
changeset
|
34 |
continue; |
ba96d2ed0291
23302428 Re-enabling an already enabled IB port resets the port
qian.l.liu@oracle.com <qian.l.liu@oracle.com>
parents:
diff
changeset
|
35 |
if (!cur_node->ports) |
ba96d2ed0291
23302428 Re-enabling an already enabled IB port resets the port
qian.l.liu@oracle.com <qian.l.liu@oracle.com>
parents:
diff
changeset
|
36 |
return NULL; |
ba96d2ed0291
23302428 Re-enabling an already enabled IB port resets the port
qian.l.liu@oracle.com <qian.l.liu@oracle.com>
parents:
diff
changeset
|
37 |
+ /* check the existence of the port specified in dr path */ |
ba96d2ed0291
23302428 Re-enabling an already enabled IB port resets the port
qian.l.liu@oracle.com <qian.l.liu@oracle.com>
parents:
diff
changeset
|
38 |
+ if (path.p[i] > cur_node->numports || |
ba96d2ed0291
23302428 Re-enabling an already enabled IB port resets the port
qian.l.liu@oracle.com <qian.l.liu@oracle.com>
parents:
diff
changeset
|
39 |
+ cur_node->ports[path.p[i]] == NULL) |
ba96d2ed0291
23302428 Re-enabling an already enabled IB port resets the port
qian.l.liu@oracle.com <qian.l.liu@oracle.com>
parents:
diff
changeset
|
40 |
+ return NULL; |
ba96d2ed0291
23302428 Re-enabling an already enabled IB port resets the port
qian.l.liu@oracle.com <qian.l.liu@oracle.com>
parents:
diff
changeset
|
41 |
|
ba96d2ed0291
23302428 Re-enabling an already enabled IB port resets the port
qian.l.liu@oracle.com <qian.l.liu@oracle.com>
parents:
diff
changeset
|
42 |
remote_port = cur_node->ports[path.p[i]]->remoteport; |
ba96d2ed0291
23302428 Re-enabling an already enabled IB port resets the port
qian.l.liu@oracle.com <qian.l.liu@oracle.com>
parents:
diff
changeset
|
43 |
if (!remote_port) |