Lines Matching refs:out_mad

64 	struct ib_smp *out_mad = NULL;  in mthca_query_device()  local
69 out_mad = kmalloc(sizeof *out_mad, GFP_KERNEL); in mthca_query_device()
70 if (!in_mad || !out_mad) in mthca_query_device()
81 1, NULL, NULL, in_mad, out_mad); in mthca_query_device()
86 props->vendor_id = be32_to_cpup((__be32 *) (out_mad->data + 36)) & in mthca_query_device()
88 props->vendor_part_id = be16_to_cpup((__be16 *) (out_mad->data + 30)); in mthca_query_device()
89 props->hw_ver = be32_to_cpup((__be32 *) (out_mad->data + 32)); in mthca_query_device()
90 memcpy(&props->sys_image_guid, out_mad->data + 4, 8); in mthca_query_device()
129 kfree(out_mad); in mthca_query_device()
137 struct ib_smp *out_mad = NULL; in mthca_query_port() local
141 out_mad = kmalloc(sizeof *out_mad, GFP_KERNEL); in mthca_query_port()
142 if (!in_mad || !out_mad) in mthca_query_port()
152 port, NULL, NULL, in_mad, out_mad); in mthca_query_port()
156 props->lid = be16_to_cpup((__be16 *) (out_mad->data + 16)); in mthca_query_port()
157 props->lmc = out_mad->data[34] & 0x7; in mthca_query_port()
158 props->sm_lid = be16_to_cpup((__be16 *) (out_mad->data + 18)); in mthca_query_port()
159 props->sm_sl = out_mad->data[36] & 0xf; in mthca_query_port()
160 props->state = out_mad->data[32] & 0xf; in mthca_query_port()
161 props->phys_state = out_mad->data[33] >> 4; in mthca_query_port()
162 props->port_cap_flags = be32_to_cpup((__be32 *) (out_mad->data + 20)); in mthca_query_port()
166 props->bad_pkey_cntr = be16_to_cpup((__be16 *) (out_mad->data + 46)); in mthca_query_port()
167 props->qkey_viol_cntr = be16_to_cpup((__be16 *) (out_mad->data + 48)); in mthca_query_port()
168 props->active_width = out_mad->data[31] & 0xf; in mthca_query_port()
169 props->active_speed = out_mad->data[35] >> 4; in mthca_query_port()
170 props->max_mtu = out_mad->data[41] & 0xf; in mthca_query_port()
171 props->active_mtu = out_mad->data[36] >> 4; in mthca_query_port()
172 props->subnet_timeout = out_mad->data[51] & 0x1f; in mthca_query_port()
173 props->max_vl_num = out_mad->data[37] >> 4; in mthca_query_port()
174 props->init_type_reply = out_mad->data[41] >> 4; in mthca_query_port()
178 kfree(out_mad); in mthca_query_port()
232 struct ib_smp *out_mad = NULL; in mthca_query_pkey() local
236 out_mad = kmalloc(sizeof *out_mad, GFP_KERNEL); in mthca_query_pkey()
237 if (!in_mad || !out_mad) in mthca_query_pkey()
245 port, NULL, NULL, in_mad, out_mad); in mthca_query_pkey()
249 *pkey = be16_to_cpu(((__be16 *) out_mad->data)[index % 32]); in mthca_query_pkey()
253 kfree(out_mad); in mthca_query_pkey()
261 struct ib_smp *out_mad = NULL; in mthca_query_gid() local
265 out_mad = kmalloc(sizeof *out_mad, GFP_KERNEL); in mthca_query_gid()
266 if (!in_mad || !out_mad) in mthca_query_gid()
274 port, NULL, NULL, in_mad, out_mad); in mthca_query_gid()
278 memcpy(gid->raw, out_mad->data + 8, 8); in mthca_query_gid()
285 port, NULL, NULL, in_mad, out_mad); in mthca_query_gid()
289 memcpy(gid->raw + 8, out_mad->data + (index % 8) * 8, 8); in mthca_query_gid()
293 kfree(out_mad); in mthca_query_gid()
1212 struct ib_smp *out_mad = NULL; in mthca_init_node_data() local
1216 out_mad = kmalloc(sizeof *out_mad, GFP_KERNEL); in mthca_init_node_data()
1217 if (!in_mad || !out_mad) in mthca_init_node_data()
1224 1, NULL, NULL, in_mad, out_mad); in mthca_init_node_data()
1228 memcpy(dev->ib_dev.node_desc, out_mad->data, 64); in mthca_init_node_data()
1233 1, NULL, NULL, in_mad, out_mad); in mthca_init_node_data()
1238 dev->rev_id = be32_to_cpup((__be32 *) (out_mad->data + 32)); in mthca_init_node_data()
1239 memcpy(&dev->ib_dev.node_guid, out_mad->data + 12, 8); in mthca_init_node_data()
1243 kfree(out_mad); in mthca_init_node_data()