Lines Matching refs:mgm
49 * Caller must hold MCG table semaphore. gid and mgm parameters must
55 * and *mgm holds MGM entry.
58 * previous entry in hash chain and *mgm holds AMGM entry.
61 * entry in hash chain and *mgm holds end of hash chain.
68 struct mthca_mgm *mgm = mgm_mailbox->buf;
105 if (!memcmp(mgm->gid, zero_gid, 16)) {
113 if (!memcmp(mgm->gid, gid, 16))
117 *index = be32_to_cpu(mgm->next_gid_index) >> 6;
131 struct mthca_mgm *mgm;
142 mgm = mailbox->buf;
151 if (!memcmp(mgm->gid, zero_gid, 16))
152 memcpy(mgm->gid, gid->raw, 16);
171 memset(mgm, 0, sizeof *mgm);
172 memcpy(mgm->gid, gid->raw, 16);
176 if (mgm->qp[i] == cpu_to_be32(ibqp->qp_num | (1 << 31))) {
181 } else if (!(mgm->qp[i] & cpu_to_be32(1 << 31))) {
182 mgm->qp[i] = cpu_to_be32(ibqp->qp_num | (1 << 31));
213 mgm->next_gid_index = cpu_to_be32(index << 6);
238 struct mthca_mgm *mgm;
248 mgm = mailbox->buf;
263 if (mgm->qp[i] == cpu_to_be32(ibqp->qp_num | (1 << 31)))
265 if (!(mgm->qp[i] & cpu_to_be32(1 << 31)))
275 mgm->qp[loc] = mgm->qp[i - 1];
276 mgm->qp[i - 1] = 0;
292 int amgm_index_to_free = be32_to_cpu(mgm->next_gid_index) >> 6;
305 memset(mgm->gid, 0, 16);
321 int curr_next_index = be32_to_cpu(mgm->next_gid_index) >> 6;
331 mgm->next_gid_index = cpu_to_be32(curr_next_index << 6);