diff mbox

[opensm] libvendor/osm_vendor_ibumad.c: Check the next CA card if the error is returned for the current one

Message ID 5395DDF7.6040006@dev.mellanox.co.il (mailing list archive)
State Accepted
Delegated to: Hal Rosenstock
Headers show

Commit Message

Hal Rosenstock June 9, 2014, 4:16 p.m. UTC
From: Vladimir Koushnir <vladimirk@mellanox.com>

osm_vendor_open_port should check matching of the input GUID
on all CA cards. When umad_get_ca_portguids returns an error
on the current CA card,next card should be examined.
This change resolves an issue with Win opensm.
Win lower layers are not following libibumad Linux convention/assumption
and are sometimes returning an error
when umad_get_ca_portguids is called from osm_vendor_open_port.

Signed-off-by: Vladimir Koushnir <vladimirk@mellanox.com>
Signed-off-by: Hal Rosenstock <hal@mellanox.com>
---
 libvendor/osm_vendor_ibumad.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
diff mbox

Patch

diff --git a/libvendor/osm_vendor_ibumad.c b/libvendor/osm_vendor_ibumad.c
index 69020f2..838923b 100644
--- a/libvendor/osm_vendor_ibumad.c
+++ b/libvendor/osm_vendor_ibumad.c
@@ -727,10 +727,14 @@  osm_vendor_open_port(IN osm_vendor_t * const p_vend,
 	for (ca = 0; ca < p_vend->ca_count; ca++) {
 		if ((r = umad_get_ca_portguids(p_vend->ca_names[ca], portguids,
 					       OSM_UMAD_MAX_PORTS_PER_CA + 1)) < 0) {
+#ifdef __WIN__
+			OSM_LOG(p_vend->p_log, OSM_LOG_VERBOSE,
+#else
 			OSM_LOG(p_vend->p_log, OSM_LOG_ERROR, "ERR 5421: "
+#endif
 				"Unable to get CA %s port guids (%s)\n",
 				p_vend->ca_names[ca], strerror(r));
-			goto Exit;
+			continue;
 		}
 		for (i = 0; i < r; i++)
 			if (port_guid == portguids[i]) {