7198889 with SRU12.1 all connections to my storage cells are lost s11-sru S11SRU12_04
authorSharath M Srinivasan <sharath.srinivasan@oracle.com>
Mon, 01 Oct 2012 00:50:15 -0700
branchs11-sru
changeset 2359 0b0f9ec6b450
parent 2355 27c96268ac37
child 2360 99982c987642
7198889 with SRU12.1 all connections to my storage cells are lost
components/open-fabrics/libibmad/patches/base.patch
--- a/components/open-fabrics/libibmad/patches/base.patch	Wed Sep 26 16:12:30 2012 -0700
+++ b/components/open-fabrics/libibmad/patches/base.patch	Mon Oct 01 00:50:15 2012 -0700
@@ -89,6 +89,38 @@
  	       sizeof(uint64_t));
  	return ntohll(val);
  }
+diff -r -u /tmp/libibmad-1.3.7/src/resolve.c libibmad-1.3.7/src/resolve.c
+--- /tmp/libibmad-1.3.7/src/resolve.c	Wed Feb 16 02:12:53 2011
++++ libibmad-1.3.7/src/resolve.c	Sun Sep 30 23:24:39 2012
[email protected]@ -40,6 +40,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <arpa/inet.h>
++#include <errno.h>
+ 
+ #include <infiniband/umad.h>
+ #include <infiniband/mad.h>
[email protected]@ -104,12 +105,18 @@
+ 
+ 	if (!sm_id) {
+ 		sm_id = &sm_portid;
+-		if (ib_resolve_smlid_via(sm_id, timeout, srcport) < 0)
++		if (ib_resolve_smlid_via(sm_id, timeout, srcport) < 0) {
++			if (!errno)
++				errno = EIO;
+ 			return -1;
++		}
+ 	}
+ 
+-	if (!smp_query_via(nodeinfo, &self, IB_ATTR_NODE_INFO, 0, 0, srcport))
++	if (!smp_query_via(nodeinfo, &self, IB_ATTR_NODE_INFO, 0, 0, srcport)) {
++		if (!errno)
++			errno = EIO;
+ 		return -1;
++	}
+ 	mad_decode_field(nodeinfo, IB_NODE_PORT_GUID_F, &selfguid);
+ 	mad_set_field64(selfgid, 0, IB_GID_PREFIX_F, IB_DEFAULT_SUBN_PREFIX);
+ 	mad_set_field64(selfgid, 0, IB_GID_GUID_F, selfguid);
 diff -r -u /tmp/libibmad-1.3.7/src/dump.c libibmad-1.3.7/src/dump.c
 --- /tmp/libibmad-1.3.7/src/dump.c	Wed Feb 16 02:12:53 2011
 +++ libibmad-1.3.7/src/dump.c	Thu Feb 24 11:27:11 2011
@@ -205,6 +237,25 @@
  		break;
  	case 3:
  		snprintf(buf, bufsz, "%06x", *(uint32_t *) val & 0xffffff);
+diff -r -u /tmp/libibmad-1.3.7/src/sa.c libibmad-1.3.7/src/sa.c
+--- /tmp/libibmad-1.3.7/src/sa.c	Wed Feb 16 02:12:53 2011
++++ libibmad-1.3.7/src/sa.c	Sun Sep 30 23:24:45 2012
[email protected]@ -38,6 +38,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <errno.h>
+ 
+ #include <infiniband/mad.h>
+ #include "mad_internal.h"
[email protected]@ -56,6 +57,7 @@
+ 
+ 	if (portid->lid <= 0) {
+ 		IBWARN("only lid routes are supported");
++		errno = EIO;
+ 		return NULL;
+ 	}
+ 
 diff -r -u /tmp/libibmad-1.3.7/src/rpc.c libibmad-1.3.7/src/rpc.c
 --- /tmp/libibmad-1.3.7/src/rpc.c	Wed Feb 16 02:12:53 2011
 +++ libibmad-1.3.7/src/rpc.c	Thu Feb 24 11:27:14 2011