Lines Matching refs:out_mad
151 const struct ib_mad *in_mad, struct ib_mad *out_mad) in process_pma_cmd() argument
180 memcpy((out_mad->data + 40), &cpi, sizeof(cpi)); in process_pma_cmd()
187 (struct ib_pma_portcounters_ext *)(out_mad->data + 40); in process_pma_cmd()
202 (struct ib_pma_portcounters *)(out_mad->data + 40); in process_pma_cmd()
291 struct ib_smp *out_mad = NULL; in mlx5_query_ext_port_caps() local
296 out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); in mlx5_query_ext_port_caps()
297 if (!in_mad || !out_mad) in mlx5_query_ext_port_caps()
304 err = mlx5_MAD_IFC(dev, 1, 1, 1, NULL, NULL, in_mad, out_mad); in mlx5_query_ext_port_caps()
306 packet_error = be16_to_cpu(out_mad->status); in mlx5_query_ext_port_caps()
313 kfree(out_mad); in mlx5_query_ext_port_caps()
318 struct ib_smp *out_mad) in mlx5_query_mad_ifc_smp_attr_node_info() argument
331 out_mad); in mlx5_query_mad_ifc_smp_attr_node_info()
340 struct ib_smp *out_mad = NULL; in mlx5_query_mad_ifc_system_image_guid() local
343 out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); in mlx5_query_mad_ifc_system_image_guid()
344 if (!out_mad) in mlx5_query_mad_ifc_system_image_guid()
347 err = mlx5_query_mad_ifc_smp_attr_node_info(ibdev, out_mad); in mlx5_query_mad_ifc_system_image_guid()
351 memcpy(sys_image_guid, out_mad->data + 4, 8); in mlx5_query_mad_ifc_system_image_guid()
354 kfree(out_mad); in mlx5_query_mad_ifc_system_image_guid()
362 struct ib_smp *out_mad = NULL; in mlx5_query_mad_ifc_max_pkeys() local
365 out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); in mlx5_query_mad_ifc_max_pkeys()
366 if (!out_mad) in mlx5_query_mad_ifc_max_pkeys()
369 err = mlx5_query_mad_ifc_smp_attr_node_info(ibdev, out_mad); in mlx5_query_mad_ifc_max_pkeys()
373 *max_pkeys = be16_to_cpup((__be16 *)(out_mad->data + 28)); in mlx5_query_mad_ifc_max_pkeys()
376 kfree(out_mad); in mlx5_query_mad_ifc_max_pkeys()
384 struct ib_smp *out_mad = NULL; in mlx5_query_mad_ifc_vendor_id() local
387 out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); in mlx5_query_mad_ifc_vendor_id()
388 if (!out_mad) in mlx5_query_mad_ifc_vendor_id()
391 err = mlx5_query_mad_ifc_smp_attr_node_info(ibdev, out_mad); in mlx5_query_mad_ifc_vendor_id()
395 *vendor_id = be32_to_cpup((__be32 *)(out_mad->data + 36)) & 0xffff; in mlx5_query_mad_ifc_vendor_id()
398 kfree(out_mad); in mlx5_query_mad_ifc_vendor_id()
406 struct ib_smp *out_mad = NULL; in mlx5_query_mad_ifc_node_desc() local
410 out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); in mlx5_query_mad_ifc_node_desc()
411 if (!in_mad || !out_mad) in mlx5_query_mad_ifc_node_desc()
417 err = mlx5_MAD_IFC(dev, 1, 1, 1, NULL, NULL, in_mad, out_mad); in mlx5_query_mad_ifc_node_desc()
421 memcpy(node_desc, out_mad->data, IB_DEVICE_NODE_DESC_MAX); in mlx5_query_mad_ifc_node_desc()
424 kfree(out_mad); in mlx5_query_mad_ifc_node_desc()
431 struct ib_smp *out_mad = NULL; in mlx5_query_mad_ifc_node_guid() local
435 out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); in mlx5_query_mad_ifc_node_guid()
436 if (!in_mad || !out_mad) in mlx5_query_mad_ifc_node_guid()
442 err = mlx5_MAD_IFC(dev, 1, 1, 1, NULL, NULL, in_mad, out_mad); in mlx5_query_mad_ifc_node_guid()
446 memcpy(node_guid, out_mad->data + 12, 8); in mlx5_query_mad_ifc_node_guid()
449 kfree(out_mad); in mlx5_query_mad_ifc_node_guid()
457 struct ib_smp *out_mad = NULL; in mlx5_query_mad_ifc_pkey() local
461 out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); in mlx5_query_mad_ifc_pkey()
462 if (!in_mad || !out_mad) in mlx5_query_mad_ifc_pkey()
470 out_mad); in mlx5_query_mad_ifc_pkey()
474 *pkey = be16_to_cpu(((__be16 *)out_mad->data)[index % 32]); in mlx5_query_mad_ifc_pkey()
478 kfree(out_mad); in mlx5_query_mad_ifc_pkey()
486 struct ib_smp *out_mad = NULL; in mlx5_query_mad_ifc_gids() local
490 out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); in mlx5_query_mad_ifc_gids()
491 if (!in_mad || !out_mad) in mlx5_query_mad_ifc_gids()
499 out_mad); in mlx5_query_mad_ifc_gids()
503 memcpy(gid->raw, out_mad->data + 8, 8); in mlx5_query_mad_ifc_gids()
510 out_mad); in mlx5_query_mad_ifc_gids()
514 memcpy(gid->raw + 8, out_mad->data + (index % 8) * 8, 8); in mlx5_query_mad_ifc_gids()
518 kfree(out_mad); in mlx5_query_mad_ifc_gids()
528 struct ib_smp *out_mad = NULL; in mlx5_query_mad_ifc_port() local
533 out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); in mlx5_query_mad_ifc_port()
534 if (!in_mad || !out_mad) in mlx5_query_mad_ifc_port()
543 err = mlx5_MAD_IFC(dev, 1, 1, port, NULL, NULL, in_mad, out_mad); in mlx5_query_mad_ifc_port()
549 props->lid = be16_to_cpup((__be16 *)(out_mad->data + 16)); in mlx5_query_mad_ifc_port()
550 props->lmc = out_mad->data[34] & 0x7; in mlx5_query_mad_ifc_port()
551 props->sm_lid = be16_to_cpup((__be16 *)(out_mad->data + 18)); in mlx5_query_mad_ifc_port()
552 props->sm_sl = out_mad->data[36] & 0xf; in mlx5_query_mad_ifc_port()
553 props->state = out_mad->data[32] & 0xf; in mlx5_query_mad_ifc_port()
554 props->phys_state = out_mad->data[33] >> 4; in mlx5_query_mad_ifc_port()
555 props->port_cap_flags = be32_to_cpup((__be32 *)(out_mad->data + 20)); in mlx5_query_mad_ifc_port()
556 props->gid_tbl_len = out_mad->data[50]; in mlx5_query_mad_ifc_port()
559 props->bad_pkey_cntr = be16_to_cpup((__be16 *)(out_mad->data + 46)); in mlx5_query_mad_ifc_port()
560 props->qkey_viol_cntr = be16_to_cpup((__be16 *)(out_mad->data + 48)); in mlx5_query_mad_ifc_port()
561 props->active_width = out_mad->data[31] & 0xf; in mlx5_query_mad_ifc_port()
562 props->active_speed = out_mad->data[35] >> 4; in mlx5_query_mad_ifc_port()
563 props->max_mtu = out_mad->data[41] & 0xf; in mlx5_query_mad_ifc_port()
564 props->active_mtu = out_mad->data[36] >> 4; in mlx5_query_mad_ifc_port()
565 props->subnet_timeout = out_mad->data[51] & 0x1f; in mlx5_query_mad_ifc_port()
566 props->max_vl_num = out_mad->data[37] >> 4; in mlx5_query_mad_ifc_port()
567 props->init_type_reply = out_mad->data[41] >> 4; in mlx5_query_mad_ifc_port()
571 be16_to_cpup((__be16 *)(out_mad->data + 60)); in mlx5_query_mad_ifc_port()
574 props->active_width = out_mad->data[31] & 0x1f; in mlx5_query_mad_ifc_port()
579 ext_active_speed = out_mad->data[62] >> 4; in mlx5_query_mad_ifc_port()
605 NULL, NULL, in_mad, out_mad); in mlx5_query_mad_ifc_port()
610 if (out_mad->data[15] & 0x1) in mlx5_query_mad_ifc_port()
617 kfree(out_mad); in mlx5_query_mad_ifc_port()