Lines Matching defs: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;
98 if (!memcmp(mgm->gid, zero_gid, 16)) {
106 if (!memcmp(mgm->gid, gid, 16))
110 *index = be32_to_cpu(mgm->next_gid_index) >> 6;
124 struct mthca_mgm *mgm;
134 mgm = mailbox->buf;
143 if (!memcmp(mgm->gid, zero_gid, 16))
144 memcpy(mgm->gid, gid->raw, 16);
160 memset(mgm, 0, sizeof *mgm);
161 memcpy(mgm->gid, gid->raw, 16);
165 if (mgm->qp[i] == cpu_to_be32(ibqp->qp_num | (1 << 31))) {
170 } else if (!(mgm->qp[i] & cpu_to_be32(1 << 31))) {
171 mgm->qp[i] = cpu_to_be32(ibqp->qp_num | (1 << 31));
197 mgm->next_gid_index = cpu_to_be32(index << 6);
218 struct mthca_mgm *mgm;
227 mgm = mailbox->buf;
242 if (mgm->qp[i] == cpu_to_be32(ibqp->qp_num | (1 << 31)))
244 if (!(mgm->qp[i] & cpu_to_be32(1 << 31)))
254 mgm->qp[loc] = mgm->qp[i - 1];
255 mgm->qp[i - 1] = 0;
268 int amgm_index_to_free = be32_to_cpu(mgm->next_gid_index) >> 6;
277 memset(mgm->gid, 0, 16);
290 int curr_next_index = be32_to_cpu(mgm->next_gid_index) >> 6;
297 mgm->next_gid_index = cpu_to_be32(curr_next_index << 6);