diff options
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_mcg.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_mcg.c b/drivers/infiniband/hw/mthca/mthca_mcg.c index 9a0612a9d304..b47ea7daf088 100644 --- a/drivers/infiniband/hw/mthca/mthca_mcg.c +++ b/drivers/infiniband/hw/mthca/mthca_mcg.c | |||
@@ -185,7 +185,12 @@ int mthca_multicast_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) | |||
185 | } | 185 | } |
186 | 186 | ||
187 | for (i = 0; i < MTHCA_QP_PER_MGM; ++i) | 187 | for (i = 0; i < MTHCA_QP_PER_MGM; ++i) |
188 | if (!(mgm->qp[i] & cpu_to_be32(1 << 31))) { | 188 | if (mgm->qp[i] == cpu_to_be32(ibqp->qp_num | (1 << 31))) { |
189 | mthca_dbg(dev, "QP %06x already a member of MGM\n", | ||
190 | ibqp->qp_num); | ||
191 | err = 0; | ||
192 | goto out; | ||
193 | } else if (!(mgm->qp[i] & cpu_to_be32(1 << 31))) { | ||
189 | mgm->qp[i] = cpu_to_be32(ibqp->qp_num | (1 << 31)); | 194 | mgm->qp[i] = cpu_to_be32(ibqp->qp_num | (1 << 31)); |
190 | break; | 195 | break; |
191 | } | 196 | } |