Lines Matching refs:out_mad

69 	struct ib_mad *out_mad = (struct ib_mad *)out;  in mlx5_ib_process_mad()  local
72 *out_mad_size != sizeof(*out_mad))) in mlx5_ib_process_mad()
105 port_num, in_wc, in_grh, in_mad, out_mad); in mlx5_ib_process_mad()
111 out_mad->mad_hdr.status |= cpu_to_be16(1 << 15); in mlx5_ib_process_mad()
123 struct ib_smp *out_mad = NULL; in mlx5_query_ext_port_caps() local
128 out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); in mlx5_query_ext_port_caps()
129 if (!in_mad || !out_mad) in mlx5_query_ext_port_caps()
136 err = mlx5_MAD_IFC(dev, 1, 1, 1, NULL, NULL, in_mad, out_mad); in mlx5_query_ext_port_caps()
138 packet_error = be16_to_cpu(out_mad->status); in mlx5_query_ext_port_caps()
145 kfree(out_mad); in mlx5_query_ext_port_caps()
150 struct ib_smp *out_mad) in mlx5_query_mad_ifc_smp_attr_node_info() argument
163 out_mad); in mlx5_query_mad_ifc_smp_attr_node_info()
172 struct ib_smp *out_mad = NULL; in mlx5_query_mad_ifc_system_image_guid() local
175 out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); in mlx5_query_mad_ifc_system_image_guid()
176 if (!out_mad) in mlx5_query_mad_ifc_system_image_guid()
179 err = mlx5_query_mad_ifc_smp_attr_node_info(ibdev, out_mad); in mlx5_query_mad_ifc_system_image_guid()
183 memcpy(sys_image_guid, out_mad->data + 4, 8); in mlx5_query_mad_ifc_system_image_guid()
186 kfree(out_mad); in mlx5_query_mad_ifc_system_image_guid()
194 struct ib_smp *out_mad = NULL; in mlx5_query_mad_ifc_max_pkeys() local
197 out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); in mlx5_query_mad_ifc_max_pkeys()
198 if (!out_mad) in mlx5_query_mad_ifc_max_pkeys()
201 err = mlx5_query_mad_ifc_smp_attr_node_info(ibdev, out_mad); in mlx5_query_mad_ifc_max_pkeys()
205 *max_pkeys = be16_to_cpup((__be16 *)(out_mad->data + 28)); in mlx5_query_mad_ifc_max_pkeys()
208 kfree(out_mad); in mlx5_query_mad_ifc_max_pkeys()
216 struct ib_smp *out_mad = NULL; in mlx5_query_mad_ifc_vendor_id() local
219 out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); in mlx5_query_mad_ifc_vendor_id()
220 if (!out_mad) in mlx5_query_mad_ifc_vendor_id()
223 err = mlx5_query_mad_ifc_smp_attr_node_info(ibdev, out_mad); in mlx5_query_mad_ifc_vendor_id()
227 *vendor_id = be32_to_cpup((__be32 *)(out_mad->data + 36)) & 0xffff; in mlx5_query_mad_ifc_vendor_id()
230 kfree(out_mad); in mlx5_query_mad_ifc_vendor_id()
238 struct ib_smp *out_mad = NULL; in mlx5_query_mad_ifc_node_desc() local
242 out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); in mlx5_query_mad_ifc_node_desc()
243 if (!in_mad || !out_mad) in mlx5_query_mad_ifc_node_desc()
249 err = mlx5_MAD_IFC(dev, 1, 1, 1, NULL, NULL, in_mad, out_mad); in mlx5_query_mad_ifc_node_desc()
253 memcpy(node_desc, out_mad->data, 64); in mlx5_query_mad_ifc_node_desc()
256 kfree(out_mad); in mlx5_query_mad_ifc_node_desc()
263 struct ib_smp *out_mad = NULL; in mlx5_query_mad_ifc_node_guid() local
267 out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); in mlx5_query_mad_ifc_node_guid()
268 if (!in_mad || !out_mad) in mlx5_query_mad_ifc_node_guid()
274 err = mlx5_MAD_IFC(dev, 1, 1, 1, NULL, NULL, in_mad, out_mad); in mlx5_query_mad_ifc_node_guid()
278 memcpy(node_guid, out_mad->data + 12, 8); in mlx5_query_mad_ifc_node_guid()
281 kfree(out_mad); in mlx5_query_mad_ifc_node_guid()
289 struct ib_smp *out_mad = NULL; in mlx5_query_mad_ifc_pkey() local
293 out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); in mlx5_query_mad_ifc_pkey()
294 if (!in_mad || !out_mad) in mlx5_query_mad_ifc_pkey()
302 out_mad); in mlx5_query_mad_ifc_pkey()
306 *pkey = be16_to_cpu(((__be16 *)out_mad->data)[index % 32]); in mlx5_query_mad_ifc_pkey()
310 kfree(out_mad); in mlx5_query_mad_ifc_pkey()
318 struct ib_smp *out_mad = NULL; in mlx5_query_mad_ifc_gids() local
322 out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); in mlx5_query_mad_ifc_gids()
323 if (!in_mad || !out_mad) in mlx5_query_mad_ifc_gids()
331 out_mad); in mlx5_query_mad_ifc_gids()
335 memcpy(gid->raw, out_mad->data + 8, 8); in mlx5_query_mad_ifc_gids()
342 out_mad); in mlx5_query_mad_ifc_gids()
346 memcpy(gid->raw + 8, out_mad->data + (index % 8) * 8, 8); in mlx5_query_mad_ifc_gids()
350 kfree(out_mad); in mlx5_query_mad_ifc_gids()
360 struct ib_smp *out_mad = NULL; in mlx5_query_mad_ifc_port() local
370 out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); in mlx5_query_mad_ifc_port()
371 if (!in_mad || !out_mad) in mlx5_query_mad_ifc_port()
380 err = mlx5_MAD_IFC(dev, 1, 1, port, NULL, NULL, in_mad, out_mad); in mlx5_query_mad_ifc_port()
386 props->lid = be16_to_cpup((__be16 *)(out_mad->data + 16)); in mlx5_query_mad_ifc_port()
387 props->lmc = out_mad->data[34] & 0x7; in mlx5_query_mad_ifc_port()
388 props->sm_lid = be16_to_cpup((__be16 *)(out_mad->data + 18)); in mlx5_query_mad_ifc_port()
389 props->sm_sl = out_mad->data[36] & 0xf; in mlx5_query_mad_ifc_port()
390 props->state = out_mad->data[32] & 0xf; in mlx5_query_mad_ifc_port()
391 props->phys_state = out_mad->data[33] >> 4; in mlx5_query_mad_ifc_port()
392 props->port_cap_flags = be32_to_cpup((__be32 *)(out_mad->data + 20)); in mlx5_query_mad_ifc_port()
393 props->gid_tbl_len = out_mad->data[50]; in mlx5_query_mad_ifc_port()
396 props->bad_pkey_cntr = be16_to_cpup((__be16 *)(out_mad->data + 46)); in mlx5_query_mad_ifc_port()
397 props->qkey_viol_cntr = be16_to_cpup((__be16 *)(out_mad->data + 48)); in mlx5_query_mad_ifc_port()
398 props->active_width = out_mad->data[31] & 0xf; in mlx5_query_mad_ifc_port()
399 props->active_speed = out_mad->data[35] >> 4; in mlx5_query_mad_ifc_port()
400 props->max_mtu = out_mad->data[41] & 0xf; in mlx5_query_mad_ifc_port()
401 props->active_mtu = out_mad->data[36] >> 4; in mlx5_query_mad_ifc_port()
402 props->subnet_timeout = out_mad->data[51] & 0x1f; in mlx5_query_mad_ifc_port()
403 props->max_vl_num = out_mad->data[37] >> 4; in mlx5_query_mad_ifc_port()
404 props->init_type_reply = out_mad->data[41] >> 4; in mlx5_query_mad_ifc_port()
408 ext_active_speed = out_mad->data[62] >> 4; in mlx5_query_mad_ifc_port()
429 NULL, NULL, in_mad, out_mad); in mlx5_query_mad_ifc_port()
434 if (out_mad->data[15] & 0x1) in mlx5_query_mad_ifc_port()
441 kfree(out_mad); in mlx5_query_mad_ifc_port()