Lines Matching refs:out_mad
151 const struct ib_mad *in_mad, struct ib_mad *out_mad) in process_pma_cmd() argument
174 memcpy((out_mad->data + 40), &cpi, sizeof(cpi)); in process_pma_cmd()
181 (struct ib_pma_portcounters_ext *)(out_mad->data + 40); in process_pma_cmd()
196 (struct ib_pma_portcounters *)(out_mad->data + 40); in process_pma_cmd()
285 struct ib_smp *out_mad = NULL; in mlx5_query_ext_port_caps() local
290 out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); in mlx5_query_ext_port_caps()
291 if (!in_mad || !out_mad) in mlx5_query_ext_port_caps()
298 err = mlx5_MAD_IFC(dev, 1, 1, 1, NULL, NULL, in_mad, out_mad); in mlx5_query_ext_port_caps()
300 packet_error = be16_to_cpu(out_mad->status); in mlx5_query_ext_port_caps()
307 kfree(out_mad); in mlx5_query_ext_port_caps()
312 struct ib_smp *out_mad) in mlx5_query_mad_ifc_smp_attr_node_info() argument
325 out_mad); in mlx5_query_mad_ifc_smp_attr_node_info()
334 struct ib_smp *out_mad = NULL; in mlx5_query_mad_ifc_system_image_guid() local
337 out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); in mlx5_query_mad_ifc_system_image_guid()
338 if (!out_mad) in mlx5_query_mad_ifc_system_image_guid()
341 err = mlx5_query_mad_ifc_smp_attr_node_info(ibdev, out_mad); in mlx5_query_mad_ifc_system_image_guid()
345 memcpy(sys_image_guid, out_mad->data + 4, 8); in mlx5_query_mad_ifc_system_image_guid()
348 kfree(out_mad); in mlx5_query_mad_ifc_system_image_guid()
356 struct ib_smp *out_mad = NULL; in mlx5_query_mad_ifc_max_pkeys() local
359 out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); in mlx5_query_mad_ifc_max_pkeys()
360 if (!out_mad) in mlx5_query_mad_ifc_max_pkeys()
363 err = mlx5_query_mad_ifc_smp_attr_node_info(ibdev, out_mad); in mlx5_query_mad_ifc_max_pkeys()
367 *max_pkeys = be16_to_cpup((__be16 *)(out_mad->data + 28)); in mlx5_query_mad_ifc_max_pkeys()
370 kfree(out_mad); in mlx5_query_mad_ifc_max_pkeys()
378 struct ib_smp *out_mad = NULL; in mlx5_query_mad_ifc_vendor_id() local
381 out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); in mlx5_query_mad_ifc_vendor_id()
382 if (!out_mad) in mlx5_query_mad_ifc_vendor_id()
385 err = mlx5_query_mad_ifc_smp_attr_node_info(ibdev, out_mad); in mlx5_query_mad_ifc_vendor_id()
389 *vendor_id = be32_to_cpup((__be32 *)(out_mad->data + 36)) & 0xffff; in mlx5_query_mad_ifc_vendor_id()
392 kfree(out_mad); in mlx5_query_mad_ifc_vendor_id()
400 struct ib_smp *out_mad = NULL; in mlx5_query_mad_ifc_node_desc() local
404 out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); in mlx5_query_mad_ifc_node_desc()
405 if (!in_mad || !out_mad) in mlx5_query_mad_ifc_node_desc()
411 err = mlx5_MAD_IFC(dev, 1, 1, 1, NULL, NULL, in_mad, out_mad); in mlx5_query_mad_ifc_node_desc()
415 memcpy(node_desc, out_mad->data, IB_DEVICE_NODE_DESC_MAX); in mlx5_query_mad_ifc_node_desc()
418 kfree(out_mad); in mlx5_query_mad_ifc_node_desc()
425 struct ib_smp *out_mad = NULL; in mlx5_query_mad_ifc_node_guid() local
429 out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); in mlx5_query_mad_ifc_node_guid()
430 if (!in_mad || !out_mad) in mlx5_query_mad_ifc_node_guid()
436 err = mlx5_MAD_IFC(dev, 1, 1, 1, NULL, NULL, in_mad, out_mad); in mlx5_query_mad_ifc_node_guid()
440 memcpy(node_guid, out_mad->data + 12, 8); in mlx5_query_mad_ifc_node_guid()
443 kfree(out_mad); in mlx5_query_mad_ifc_node_guid()
451 struct ib_smp *out_mad = NULL; in mlx5_query_mad_ifc_pkey() local
455 out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); in mlx5_query_mad_ifc_pkey()
456 if (!in_mad || !out_mad) in mlx5_query_mad_ifc_pkey()
464 out_mad); in mlx5_query_mad_ifc_pkey()
468 *pkey = be16_to_cpu(((__be16 *)out_mad->data)[index % 32]); in mlx5_query_mad_ifc_pkey()
472 kfree(out_mad); in mlx5_query_mad_ifc_pkey()
480 struct ib_smp *out_mad = NULL; in mlx5_query_mad_ifc_gids() local
484 out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); in mlx5_query_mad_ifc_gids()
485 if (!in_mad || !out_mad) in mlx5_query_mad_ifc_gids()
493 out_mad); in mlx5_query_mad_ifc_gids()
497 memcpy(gid->raw, out_mad->data + 8, 8); in mlx5_query_mad_ifc_gids()
504 out_mad); in mlx5_query_mad_ifc_gids()
508 memcpy(gid->raw + 8, out_mad->data + (index % 8) * 8, 8); in mlx5_query_mad_ifc_gids()
512 kfree(out_mad); in mlx5_query_mad_ifc_gids()
522 struct ib_smp *out_mad = NULL; in mlx5_query_mad_ifc_port() local
527 out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); in mlx5_query_mad_ifc_port()
528 if (!in_mad || !out_mad) in mlx5_query_mad_ifc_port()
537 err = mlx5_MAD_IFC(dev, 1, 1, port, NULL, NULL, in_mad, out_mad); in mlx5_query_mad_ifc_port()
543 props->lid = be16_to_cpup((__be16 *)(out_mad->data + 16)); in mlx5_query_mad_ifc_port()
544 props->lmc = out_mad->data[34] & 0x7; in mlx5_query_mad_ifc_port()
545 props->sm_lid = be16_to_cpup((__be16 *)(out_mad->data + 18)); in mlx5_query_mad_ifc_port()
546 props->sm_sl = out_mad->data[36] & 0xf; in mlx5_query_mad_ifc_port()
547 props->state = out_mad->data[32] & 0xf; in mlx5_query_mad_ifc_port()
548 props->phys_state = out_mad->data[33] >> 4; in mlx5_query_mad_ifc_port()
549 props->port_cap_flags = be32_to_cpup((__be32 *)(out_mad->data + 20)); in mlx5_query_mad_ifc_port()
550 props->gid_tbl_len = out_mad->data[50]; in mlx5_query_mad_ifc_port()
553 props->bad_pkey_cntr = be16_to_cpup((__be16 *)(out_mad->data + 46)); in mlx5_query_mad_ifc_port()
554 props->qkey_viol_cntr = be16_to_cpup((__be16 *)(out_mad->data + 48)); in mlx5_query_mad_ifc_port()
555 props->active_width = out_mad->data[31] & 0xf; in mlx5_query_mad_ifc_port()
556 props->active_speed = out_mad->data[35] >> 4; in mlx5_query_mad_ifc_port()
557 props->max_mtu = out_mad->data[41] & 0xf; in mlx5_query_mad_ifc_port()
558 props->active_mtu = out_mad->data[36] >> 4; in mlx5_query_mad_ifc_port()
559 props->subnet_timeout = out_mad->data[51] & 0x1f; in mlx5_query_mad_ifc_port()
560 props->max_vl_num = out_mad->data[37] >> 4; in mlx5_query_mad_ifc_port()
561 props->init_type_reply = out_mad->data[41] >> 4; in mlx5_query_mad_ifc_port()
565 be16_to_cpup((__be16 *)(out_mad->data + 60)); in mlx5_query_mad_ifc_port()
568 props->active_width = out_mad->data[31] & 0x1f; in mlx5_query_mad_ifc_port()
573 ext_active_speed = out_mad->data[62] >> 4; in mlx5_query_mad_ifc_port()
599 NULL, NULL, in_mad, out_mad); in mlx5_query_mad_ifc_port()
604 if (out_mad->data[15] & 0x1) in mlx5_query_mad_ifc_port()
611 kfree(out_mad); in mlx5_query_mad_ifc_port()