Lines Matching refs:out_mad

210 			   const struct ib_mad *in_mad, struct ib_mad *out_mad)  in process_pma_cmd()  argument
241 memcpy((out_mad->data + 40), &cpi, sizeof(cpi)); in process_pma_cmd()
248 (struct ib_pma_portcounters_ext *)(out_mad->data + 40); in process_pma_cmd()
272 (struct ib_pma_portcounters *)(out_mad->data + 40); in process_pma_cmd()
360 struct ib_smp *out_mad; in mlx5_query_ext_port_caps() local
365 out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); in mlx5_query_ext_port_caps()
366 if (!in_mad || !out_mad) in mlx5_query_ext_port_caps()
373 err = mlx5_MAD_IFC(dev, 1, 1, 1, NULL, NULL, in_mad, out_mad); in mlx5_query_ext_port_caps()
375 packet_error = be16_to_cpu(out_mad->status); in mlx5_query_ext_port_caps()
382 kfree(out_mad); in mlx5_query_ext_port_caps()
387 struct ib_smp *out_mad) in mlx5_query_mad_ifc_smp_attr_node_info() argument
400 out_mad); in mlx5_query_mad_ifc_smp_attr_node_info()
409 struct ib_smp *out_mad; in mlx5_query_mad_ifc_system_image_guid() local
412 out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); in mlx5_query_mad_ifc_system_image_guid()
413 if (!out_mad) in mlx5_query_mad_ifc_system_image_guid()
416 err = mlx5_query_mad_ifc_smp_attr_node_info(ibdev, out_mad); in mlx5_query_mad_ifc_system_image_guid()
420 memcpy(sys_image_guid, out_mad->data + 4, 8); in mlx5_query_mad_ifc_system_image_guid()
423 kfree(out_mad); in mlx5_query_mad_ifc_system_image_guid()
431 struct ib_smp *out_mad; in mlx5_query_mad_ifc_max_pkeys() local
434 out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); in mlx5_query_mad_ifc_max_pkeys()
435 if (!out_mad) in mlx5_query_mad_ifc_max_pkeys()
438 err = mlx5_query_mad_ifc_smp_attr_node_info(ibdev, out_mad); in mlx5_query_mad_ifc_max_pkeys()
442 *max_pkeys = be16_to_cpup((__be16 *)(out_mad->data + 28)); in mlx5_query_mad_ifc_max_pkeys()
445 kfree(out_mad); in mlx5_query_mad_ifc_max_pkeys()
453 struct ib_smp *out_mad; in mlx5_query_mad_ifc_vendor_id() local
456 out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); in mlx5_query_mad_ifc_vendor_id()
457 if (!out_mad) in mlx5_query_mad_ifc_vendor_id()
460 err = mlx5_query_mad_ifc_smp_attr_node_info(ibdev, out_mad); in mlx5_query_mad_ifc_vendor_id()
464 *vendor_id = be32_to_cpup((__be32 *)(out_mad->data + 36)) & 0xffff; in mlx5_query_mad_ifc_vendor_id()
467 kfree(out_mad); in mlx5_query_mad_ifc_vendor_id()
475 struct ib_smp *out_mad; in mlx5_query_mad_ifc_node_desc() local
479 out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); in mlx5_query_mad_ifc_node_desc()
480 if (!in_mad || !out_mad) in mlx5_query_mad_ifc_node_desc()
486 err = mlx5_MAD_IFC(dev, 1, 1, 1, NULL, NULL, in_mad, out_mad); in mlx5_query_mad_ifc_node_desc()
490 memcpy(node_desc, out_mad->data, IB_DEVICE_NODE_DESC_MAX); in mlx5_query_mad_ifc_node_desc()
493 kfree(out_mad); in mlx5_query_mad_ifc_node_desc()
500 struct ib_smp *out_mad; in mlx5_query_mad_ifc_node_guid() local
504 out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); in mlx5_query_mad_ifc_node_guid()
505 if (!in_mad || !out_mad) in mlx5_query_mad_ifc_node_guid()
511 err = mlx5_MAD_IFC(dev, 1, 1, 1, NULL, NULL, in_mad, out_mad); in mlx5_query_mad_ifc_node_guid()
515 memcpy(node_guid, out_mad->data + 12, 8); in mlx5_query_mad_ifc_node_guid()
518 kfree(out_mad); in mlx5_query_mad_ifc_node_guid()
526 struct ib_smp *out_mad; in mlx5_query_mad_ifc_pkey() local
530 out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); in mlx5_query_mad_ifc_pkey()
531 if (!in_mad || !out_mad) in mlx5_query_mad_ifc_pkey()
539 out_mad); in mlx5_query_mad_ifc_pkey()
543 *pkey = be16_to_cpu(((__be16 *)out_mad->data)[index % 32]); in mlx5_query_mad_ifc_pkey()
547 kfree(out_mad); in mlx5_query_mad_ifc_pkey()
555 struct ib_smp *out_mad; in mlx5_query_mad_ifc_gids() local
559 out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); in mlx5_query_mad_ifc_gids()
560 if (!in_mad || !out_mad) in mlx5_query_mad_ifc_gids()
568 out_mad); in mlx5_query_mad_ifc_gids()
572 memcpy(gid->raw, out_mad->data + 8, 8); in mlx5_query_mad_ifc_gids()
579 out_mad); in mlx5_query_mad_ifc_gids()
583 memcpy(gid->raw + 8, out_mad->data + (index % 8) * 8, 8); in mlx5_query_mad_ifc_gids()
587 kfree(out_mad); in mlx5_query_mad_ifc_gids()
597 struct ib_smp *out_mad; in mlx5_query_mad_ifc_port() local
602 out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); in mlx5_query_mad_ifc_port()
603 if (!in_mad || !out_mad) in mlx5_query_mad_ifc_port()
612 err = mlx5_MAD_IFC(dev, 1, 1, port, NULL, NULL, in_mad, out_mad); in mlx5_query_mad_ifc_port()
618 props->lid = be16_to_cpup((__be16 *)(out_mad->data + 16)); in mlx5_query_mad_ifc_port()
619 props->lmc = out_mad->data[34] & 0x7; in mlx5_query_mad_ifc_port()
620 props->sm_lid = be16_to_cpup((__be16 *)(out_mad->data + 18)); in mlx5_query_mad_ifc_port()
621 props->sm_sl = out_mad->data[36] & 0xf; in mlx5_query_mad_ifc_port()
622 props->state = out_mad->data[32] & 0xf; in mlx5_query_mad_ifc_port()
623 props->phys_state = out_mad->data[33] >> 4; in mlx5_query_mad_ifc_port()
624 props->port_cap_flags = be32_to_cpup((__be32 *)(out_mad->data + 20)); in mlx5_query_mad_ifc_port()
625 props->gid_tbl_len = out_mad->data[50]; in mlx5_query_mad_ifc_port()
628 props->bad_pkey_cntr = be16_to_cpup((__be16 *)(out_mad->data + 46)); in mlx5_query_mad_ifc_port()
629 props->qkey_viol_cntr = be16_to_cpup((__be16 *)(out_mad->data + 48)); in mlx5_query_mad_ifc_port()
630 props->active_width = out_mad->data[31] & 0xf; in mlx5_query_mad_ifc_port()
631 props->active_speed = out_mad->data[35] >> 4; in mlx5_query_mad_ifc_port()
632 props->max_mtu = out_mad->data[41] & 0xf; in mlx5_query_mad_ifc_port()
633 props->active_mtu = out_mad->data[36] >> 4; in mlx5_query_mad_ifc_port()
634 props->subnet_timeout = out_mad->data[51] & 0x1f; in mlx5_query_mad_ifc_port()
635 props->max_vl_num = out_mad->data[37] >> 4; in mlx5_query_mad_ifc_port()
636 props->init_type_reply = out_mad->data[41] >> 4; in mlx5_query_mad_ifc_port()
640 be16_to_cpup((__be16 *)(out_mad->data + 60)); in mlx5_query_mad_ifc_port()
643 props->active_width = out_mad->data[31] & 0x1f; in mlx5_query_mad_ifc_port()
648 ext_active_speed = out_mad->data[62] >> 4; in mlx5_query_mad_ifc_port()
673 ext_active_speed = (out_mad->data[56] >> 4) & 0x6; in mlx5_query_mad_ifc_port()
692 NULL, NULL, in_mad, out_mad); in mlx5_query_mad_ifc_port()
697 if (out_mad->data[15] & 0x1) in mlx5_query_mad_ifc_port()
704 kfree(out_mad); in mlx5_query_mad_ifc_port()