* [PATCH] opensm/osm_dump.c: Fix enhanced switch port 0 handling in print_node_report
@ 2013-02-20 19:02 Hal Rosenstock
0 siblings, 0 replies; only message in thread
From: Hal Rosenstock @ 2013-02-20 19:02 UTC (permalink / raw)
To: linux-rdma (linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org)
Enhanced switch port 0 has port state, link speed, link width, and MTU.
Only base (original) switch port 0 doesn't.
Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
diff --git a/opensm/osm_dump.c b/opensm/osm_dump.c
index aae6a18..7f29259 100644
--- a/opensm/osm_dump.c
+++ b/opensm/osm_dump.c
@@ -563,9 +563,10 @@ static void print_node_report(cl_map_item_t * item, FILE * file, void *cxt)
p_pi = &p_physp->port_info;
/*
- * Port state is not defined for switch port 0
+ * Port state is not defined for base switch port 0
*/
- if (port_num == 0)
+ if (port_num == 0 &&
+ ib_switch_info_is_enhanced_port0(&p_node->sw->switch_info) == FALSE)
fprintf(file, " :");
else
fprintf(file, " %s :",
@@ -584,7 +585,10 @@ static void print_node_report(cl_map_item_t * item, FILE * file, void *cxt)
else
fprintf(file, " : :");
- if (port_num != 0)
+ if (port_num == 0 &&
+ ib_switch_info_is_enhanced_port0(&p_node->sw->switch_info) == FALSE)
+ fprintf(file, " : : ");
+ else
fprintf(file, " %s : %s : %s ",
osm_get_mtu_str
(ib_port_info_get_neighbor_mtu(p_pi)),
@@ -594,8 +598,6 @@ static void print_node_report(cl_map_item_t * item, FILE * file, void *cxt)
ib_port_info_get_link_speed_ext_active(p_pi),
ib_port_info_get_port_state(p_pi),
p_physp->ext_port_info.link_speed_active & FDR10));
- else
- fprintf(file, " : : ");
if (osm_physp_get_port_guid(p_physp) == osm->subn.sm_port_guid)
fprintf(file, "* %016" PRIx64 " *",
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-02-20 19:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-20 19:02 [PATCH] opensm/osm_dump.c: Fix enhanced switch port 0 handling in print_node_report Hal Rosenstock
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.