public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ibacm/acm.c: Make sure shift for subnet timeout is not negative
@ 2012-05-30 21:31 Hal Rosenstock
       [not found] ` <4FC69196.9070200-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Hal Rosenstock @ 2012-05-30 21:31 UTC (permalink / raw)
  To: Hefty, Sean
  Cc: linux-rdma (linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org)


in acm_port_up

Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
diff --git a/src/acm.c b/src/acm.c
index b47ee8a..c40f079 100644
--- a/src/acm.c
+++ b/src/acm.c
@@ -2794,7 +2794,8 @@ static void acm_port_up(struct acm_port *port)
 
 	port->mtu = attr.active_mtu;
 	port->rate = acm_get_rate(attr.active_width, attr.active_speed);
-	port->subnet_timeout = 1 << (attr.subnet_timeout - 8);
+	if (attr.subnet_timeout >= 8)
+		port->subnet_timeout = 1 << (attr.subnet_timeout - 8);
 	for (port->gid_cnt = 0;; port->gid_cnt++) {
 		ret = ibv_query_gid(port->dev->verbs, port->port_num, port->gid_cnt, &gid);
 		if (ret || !gid.global.interface_id)
--
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] 2+ messages in thread

* RE: [PATCH] ibacm/acm.c: Make sure shift for subnet timeout is not negative
       [not found] ` <4FC69196.9070200-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
@ 2012-05-31 23:20   ` Hefty, Sean
  0 siblings, 0 replies; 2+ messages in thread
From: Hefty, Sean @ 2012-05-31 23:20 UTC (permalink / raw)
  To: Hal Rosenstock
  Cc: linux-rdma (linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org)

thanks! - applied
--
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	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-05-31 23:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-30 21:31 [PATCH] ibacm/acm.c: Make sure shift for subnet timeout is not negative Hal Rosenstock
     [not found] ` <4FC69196.9070200-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2012-05-31 23:20   ` Hefty, Sean

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox