linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH ibacm 3/8] acm.c: Invalid pkey has low order 15 bits 0
@ 2013-08-06 11:45 Hal Rosenstock
  0 siblings, 0 replies; only message in thread
From: Hal Rosenstock @ 2013-08-06 11:45 UTC (permalink / raw)
  To: Hefty, Sean
  Cc: linux-rdma (linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org)


so add in handling for pkey 0x8000 as well as 0 for invalid

Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
 src/acm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/acm.c b/src/acm.c
index a15f094..7de5873 100644
--- a/src/acm.c
+++ b/src/acm.c
@@ -3211,7 +3211,7 @@ static void acm_port_up(struct acm_port *port)
 	atomic_set(&port->sa_dest.refcnt, 1);
 	for (i = 0; i < attr.pkey_tbl_len; i++) {
 		ret = ibv_query_pkey(port->dev->verbs, port->port_num, i, &pkey);
-		if (ret || !pkey)
+		if (ret || !(ntohs(pkey) & 0x7fff))
 			continue;
 		port->pkey_cnt++;
 		acm_ep_up(port, (uint16_t) i);
-- 
1.7.8.2

--
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-08-06 11:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-06 11:45 [PATCH ibacm 3/8] acm.c: Invalid pkey has low order 15 bits 0 Hal Rosenstock

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).