Skip to content

Commit

Permalink
IB/core: Ignore membership bit in ib_find_pkey()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Moni Shoua authored and Roland Dreier committed Aug 3, 2007
1 parent 7a883ea commit 36026ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/infiniband/core/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ int ib_find_pkey(struct ib_device *device,
if (ret)
return ret;

if (pkey == tmp_pkey) {
if ((pkey & 0x7fff) == (tmp_pkey & 0x7fff)) {
*index = i;
return 0;
}
Expand Down

0 comments on commit 36026ec

Please sign in to comment.