diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-04 16:31:54 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-04 16:31:54 -0800 |
commit | ba77df570c6710c9c19b31e0e48e4bcdf31cefe8 (patch) | |
tree | 997c210135b5578982df256dd5a0140e04d972d1 /drivers/infiniband/hw/mthca/mthca_qp.c | |
parent | 602d4a7e2f4b843d1a67375d4d7104073495b758 (diff) | |
parent | d09e32764176b61c4afee9fd5e7fe04713bfa56f (diff) | |
download | blackbird-obmc-linux-ba77df570c6710c9c19b31e0e48e4bcdf31cefe8.tar.gz blackbird-obmc-linux-ba77df570c6710c9c19b31e0e48e4bcdf31cefe8.zip |
Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_qp.c')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_qp.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_qp.c b/drivers/infiniband/hw/mthca/mthca_qp.c index 7c9afde5ace5..8852ea477c21 100644 --- a/drivers/infiniband/hw/mthca/mthca_qp.c +++ b/drivers/infiniband/hw/mthca/mthca_qp.c @@ -584,6 +584,13 @@ int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask) return -EINVAL; } + if ((attr_mask & IB_QP_PKEY_INDEX) && + attr->pkey_index >= dev->limits.pkey_table_len) { + mthca_dbg(dev, "PKey index (%u) too large. max is %d\n", + attr->pkey_index,dev->limits.pkey_table_len-1); + return -EINVAL; + } + mailbox = mthca_alloc_mailbox(dev, GFP_KERNEL); if (IS_ERR(mailbox)) return PTR_ERR(mailbox); |