diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-28 16:47:34 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-28 16:47:34 -0700 |
commit | 89fbb69c4f285019ba5e029963dc11cc6beb078a (patch) | |
tree | d918cd1ba0ef9afa692cef281afee2f6d6634a1e /drivers/infiniband/hw/mthca/mthca_mcg.c | |
parent | 7efe5d7c3e3a82e43b0f8fb29c6797317bce7a9a (diff) | |
parent | 4cce3390c998600f6648e075e475cf8f6dd8cebe (diff) | |
download | blackbird-op-linux-89fbb69c4f285019ba5e029963dc11cc6beb078a.tar.gz blackbird-op-linux-89fbb69c4f285019ba5e029963dc11cc6beb078a.zip |
Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_mcg.c')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_mcg.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_mcg.c b/drivers/infiniband/hw/mthca/mthca_mcg.c index a2707605f4c8..b47ea7daf088 100644 --- a/drivers/infiniband/hw/mthca/mthca_mcg.c +++ b/drivers/infiniband/hw/mthca/mthca_mcg.c @@ -37,10 +37,6 @@ #include "mthca_dev.h" #include "mthca_cmd.h" -enum { - MTHCA_QP_PER_MGM = 4 * (MTHCA_MGM_ENTRY_SIZE / 16 - 2) -}; - struct mthca_mgm { __be32 next_gid_index; u32 reserved[3]; @@ -189,7 +185,12 @@ int mthca_multicast_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) } for (i = 0; i < MTHCA_QP_PER_MGM; ++i) - if (!(mgm->qp[i] & cpu_to_be32(1 << 31))) { + if (mgm->qp[i] == cpu_to_be32(ibqp->qp_num | (1 << 31))) { + mthca_dbg(dev, "QP %06x already a member of MGM\n", + ibqp->qp_num); + err = 0; + goto out; + } else if (!(mgm->qp[i] & cpu_to_be32(1 << 31))) { mgm->qp[i] = cpu_to_be32(ibqp->qp_num | (1 << 31)); break; } |