From: Mitko Haralanov <[email protected]>

Set the M_Key field in SubnGet and SugnGetResp MADs based
on correctly interpreting the protection level specified
in the M_KeyProtBits field.

Signed-off-by: Mitko Haralanov <[email protected]>
Signed-off-by: Mike Marciniszyn <[email protected]>
---
 drivers/infiniband/hw/qib/qib_mad.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/infiniband/hw/qib/qib_mad.c 
b/drivers/infiniband/hw/qib/qib_mad.c
index 7c44726..5494082 100644
--- a/drivers/infiniband/hw/qib/qib_mad.c
+++ b/drivers/infiniband/hw/qib/qib_mad.c
@@ -465,7 +465,7 @@ static int subn_get_portinfo(struct ib_smp *smp, struct 
ib_device *ibdev,
 
        /* Only return the mkey if the protection field allows it. */
        if (smp->method == IB_MGMT_METHOD_SET || ibp->mkey == smp->mkey ||
-           ibp->mkeyprot == 0)
+           ibp->mkeyprot != 0)
                pip->mkey = ibp->mkey;
        pip->gid_prefix = ibp->gid_prefix;
        lid = ppd->lid;

--
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

Reply via email to