aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMoni Shoua <monisonlists@gmail.com>2007-07-23 03:07:42 -0400
committerRoland Dreier <rolandd@cisco.com>2007-08-03 13:45:17 -0400
commit36026ecc20e5df722bbe2ea9e451c73d686ef107 (patch)
tree729cb528a72bfd40cc56b97d75df2f07c0094a60
parent7a883eaf62f4b943ebec738ce3b0796c67ef5d32 (diff)
IB/core: Ignore membership bit in ib_find_pkey()
ib_find_pkey() is used as a replacement for ib_find_cached_pkey(), and the original function ignored the membership bit when searching for a P_Key, so ib_find_pkey() should ignore the bit too. In particular, IPoIB turns on the P_Key membership bit of limited membership P_Keys when creating a child interface and looks for the full membership P_key. This broke if a port was a partial member of a partition when IPoIB switched from ib_find_cached_pkey() to ib_find_pkey(), and this change fixes things again. Signed-off-by: Moni Shoua <monis@voltaire.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
-rw-r--r--drivers/infiniband/core/device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c
index 3ada17c0f239..2506c43ba041 100644
--- a/drivers/infiniband/core/device.c
+++ b/drivers/infiniband/core/device.c
@@ -702,7 +702,7 @@ int ib_find_pkey(struct ib_device *device,
702 if (ret) 702 if (ret)
703 return ret; 703 return ret;
704 704
705 if (pkey == tmp_pkey) { 705 if ((pkey & 0x7fff) == (tmp_pkey & 0x7fff)) {
706 *index = i; 706 *index = i;
707 return 0; 707 return 0;
708 } 708 }