Skip to contentSkip to conversation

opensm: Always set enabled speed and width

PATCH Applied Eli Dorfman (Voltaire) 2 participants 2 messages Apr 25, 2010 – May 22, 2010 1 message not in the archive InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 opensm: Always set enabled speed and width

Initialize default link speed and width to "No State Change" and always set in SubnSet(PortInfo)

---
 infiniband-diags/src/ibportstate.c |   17 ++++++++---------
 1 files changed, 8 insertions(+), 9 deletions(-)
infiniband-diags/src/ibportstate.c +8 -9
index 66f069e..b99c0e1 100644
@@ -64,13 +64,13 @@ enum port_ops {
 };
 
 struct ibmad_port *srcport;
-int speed = 15;
-int width = 255;
+int speed = 0; /* no state change */
+int width = 0; /* no state change */
 int lid;
 int smlid;
 int lmc;
 int mtu;
-int vls;
+int vls = 0; /* no state change */
 
 struct {
 	const char *name;
@@ -394,12 +394,11 @@ int main(int argc, char **argv)
 			mad_set_field(data, 0, IB_PORT_STATE_F, 4);
 			break;
 		}
-		if (port_args[SPEED].set)
-			mad_set_field(data, 0, IB_PORT_LINK_SPEED_ENABLED_F,
-				      speed);
-		if (port_args[WIDTH].set)
-			mad_set_field(data, 0, IB_PORT_LINK_WIDTH_ENABLED_F,
-				      width);
+
+		/* always set enabled speed/width - defaults to NOP */
+		mad_set_field(data, 0, IB_PORT_LINK_SPEED_ENABLED_F, speed);
+		mad_set_field(data, 0, IB_PORT_LINK_WIDTH_ENABLED_F, width);
+
 		if (port_args[VLS].set)
 			mad_set_field(data, 0, IB_PORT_OPER_VLS_F, vls);
 		if (port_args[MTU].set)
Signature · 6 lines
1.5.5

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]