Lines Matching refs:out_mad
76 const struct ib_mad *in_mad, struct ib_mad *out_mad) in process_mad() argument
111 port_num, in_wc, in_grh, in_mad, out_mad); in process_mad()
117 out_mad->mad_hdr.status |= cpu_to_be16(1 << 15); in process_mad()
201 const struct ib_mad *in_mad, struct ib_mad *out_mad) in process_pma_cmd() argument
211 memcpy((out_mad->data + 40), &cpi, sizeof(cpi)); in process_pma_cmd()
217 (struct ib_pma_portcounters_ext *)(out_mad->data + 40); in process_pma_cmd()
230 (struct ib_pma_portcounters *)(out_mad->data + 40); in process_pma_cmd()
258 struct ib_mad *out_mad = (struct ib_mad *)out; in mlx5_ib_process_mad() local
264 *out_mad_size != sizeof(*out_mad))) in mlx5_ib_process_mad()
267 memset(out_mad->data, 0, sizeof(out_mad->data)); in mlx5_ib_process_mad()
276 ret = process_pma_cmd(mdev, mdev_port_num, in_mad, out_mad); in mlx5_ib_process_mad()
279 in_mad, out_mad); in mlx5_ib_process_mad()
288 struct ib_smp *out_mad = NULL; in mlx5_query_ext_port_caps() local
293 out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); in mlx5_query_ext_port_caps()
294 if (!in_mad || !out_mad) in mlx5_query_ext_port_caps()
301 err = mlx5_MAD_IFC(dev, 1, 1, 1, NULL, NULL, in_mad, out_mad); in mlx5_query_ext_port_caps()
303 packet_error = be16_to_cpu(out_mad->status); in mlx5_query_ext_port_caps()
310 kfree(out_mad); in mlx5_query_ext_port_caps()
315 struct ib_smp *out_mad) in mlx5_query_mad_ifc_smp_attr_node_info() argument
328 out_mad); in mlx5_query_mad_ifc_smp_attr_node_info()
337 struct ib_smp *out_mad = NULL; in mlx5_query_mad_ifc_system_image_guid() local
340 out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); in mlx5_query_mad_ifc_system_image_guid()
341 if (!out_mad) in mlx5_query_mad_ifc_system_image_guid()
344 err = mlx5_query_mad_ifc_smp_attr_node_info(ibdev, out_mad); in mlx5_query_mad_ifc_system_image_guid()
348 memcpy(sys_image_guid, out_mad->data + 4, 8); in mlx5_query_mad_ifc_system_image_guid()
351 kfree(out_mad); in mlx5_query_mad_ifc_system_image_guid()
359 struct ib_smp *out_mad = NULL; in mlx5_query_mad_ifc_max_pkeys() local
362 out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); in mlx5_query_mad_ifc_max_pkeys()
363 if (!out_mad) in mlx5_query_mad_ifc_max_pkeys()
366 err = mlx5_query_mad_ifc_smp_attr_node_info(ibdev, out_mad); in mlx5_query_mad_ifc_max_pkeys()
370 *max_pkeys = be16_to_cpup((__be16 *)(out_mad->data + 28)); in mlx5_query_mad_ifc_max_pkeys()
373 kfree(out_mad); in mlx5_query_mad_ifc_max_pkeys()
381 struct ib_smp *out_mad = NULL; in mlx5_query_mad_ifc_vendor_id() local
384 out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); in mlx5_query_mad_ifc_vendor_id()
385 if (!out_mad) in mlx5_query_mad_ifc_vendor_id()
388 err = mlx5_query_mad_ifc_smp_attr_node_info(ibdev, out_mad); in mlx5_query_mad_ifc_vendor_id()
392 *vendor_id = be32_to_cpup((__be32 *)(out_mad->data + 36)) & 0xffff; in mlx5_query_mad_ifc_vendor_id()
395 kfree(out_mad); in mlx5_query_mad_ifc_vendor_id()
403 struct ib_smp *out_mad = NULL; in mlx5_query_mad_ifc_node_desc() local
407 out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); in mlx5_query_mad_ifc_node_desc()
408 if (!in_mad || !out_mad) in mlx5_query_mad_ifc_node_desc()
414 err = mlx5_MAD_IFC(dev, 1, 1, 1, NULL, NULL, in_mad, out_mad); in mlx5_query_mad_ifc_node_desc()
418 memcpy(node_desc, out_mad->data, IB_DEVICE_NODE_DESC_MAX); in mlx5_query_mad_ifc_node_desc()
421 kfree(out_mad); in mlx5_query_mad_ifc_node_desc()
428 struct ib_smp *out_mad = NULL; in mlx5_query_mad_ifc_node_guid() local
432 out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); in mlx5_query_mad_ifc_node_guid()
433 if (!in_mad || !out_mad) in mlx5_query_mad_ifc_node_guid()
439 err = mlx5_MAD_IFC(dev, 1, 1, 1, NULL, NULL, in_mad, out_mad); in mlx5_query_mad_ifc_node_guid()
443 memcpy(node_guid, out_mad->data + 12, 8); in mlx5_query_mad_ifc_node_guid()
446 kfree(out_mad); in mlx5_query_mad_ifc_node_guid()
454 struct ib_smp *out_mad = NULL; in mlx5_query_mad_ifc_pkey() local
458 out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); in mlx5_query_mad_ifc_pkey()
459 if (!in_mad || !out_mad) in mlx5_query_mad_ifc_pkey()
467 out_mad); in mlx5_query_mad_ifc_pkey()
471 *pkey = be16_to_cpu(((__be16 *)out_mad->data)[index % 32]); in mlx5_query_mad_ifc_pkey()
475 kfree(out_mad); in mlx5_query_mad_ifc_pkey()
483 struct ib_smp *out_mad = NULL; in mlx5_query_mad_ifc_gids() local
487 out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); in mlx5_query_mad_ifc_gids()
488 if (!in_mad || !out_mad) in mlx5_query_mad_ifc_gids()
496 out_mad); in mlx5_query_mad_ifc_gids()
500 memcpy(gid->raw, out_mad->data + 8, 8); in mlx5_query_mad_ifc_gids()
507 out_mad); in mlx5_query_mad_ifc_gids()
511 memcpy(gid->raw + 8, out_mad->data + (index % 8) * 8, 8); in mlx5_query_mad_ifc_gids()
515 kfree(out_mad); in mlx5_query_mad_ifc_gids()
525 struct ib_smp *out_mad = NULL; in mlx5_query_mad_ifc_port() local
535 out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); in mlx5_query_mad_ifc_port()
536 if (!in_mad || !out_mad) in mlx5_query_mad_ifc_port()
545 err = mlx5_MAD_IFC(dev, 1, 1, port, NULL, NULL, in_mad, out_mad); in mlx5_query_mad_ifc_port()
551 props->lid = be16_to_cpup((__be16 *)(out_mad->data + 16)); in mlx5_query_mad_ifc_port()
552 props->lmc = out_mad->data[34] & 0x7; in mlx5_query_mad_ifc_port()
553 props->sm_lid = be16_to_cpup((__be16 *)(out_mad->data + 18)); in mlx5_query_mad_ifc_port()
554 props->sm_sl = out_mad->data[36] & 0xf; in mlx5_query_mad_ifc_port()
555 props->state = out_mad->data[32] & 0xf; in mlx5_query_mad_ifc_port()
556 props->phys_state = out_mad->data[33] >> 4; in mlx5_query_mad_ifc_port()
557 props->port_cap_flags = be32_to_cpup((__be32 *)(out_mad->data + 20)); in mlx5_query_mad_ifc_port()
558 props->gid_tbl_len = out_mad->data[50]; in mlx5_query_mad_ifc_port()
561 props->bad_pkey_cntr = be16_to_cpup((__be16 *)(out_mad->data + 46)); in mlx5_query_mad_ifc_port()
562 props->qkey_viol_cntr = be16_to_cpup((__be16 *)(out_mad->data + 48)); in mlx5_query_mad_ifc_port()
563 props->active_width = out_mad->data[31] & 0xf; in mlx5_query_mad_ifc_port()
564 props->active_speed = out_mad->data[35] >> 4; in mlx5_query_mad_ifc_port()
565 props->max_mtu = out_mad->data[41] & 0xf; in mlx5_query_mad_ifc_port()
566 props->active_mtu = out_mad->data[36] >> 4; in mlx5_query_mad_ifc_port()
567 props->subnet_timeout = out_mad->data[51] & 0x1f; in mlx5_query_mad_ifc_port()
568 props->max_vl_num = out_mad->data[37] >> 4; in mlx5_query_mad_ifc_port()
569 props->init_type_reply = out_mad->data[41] >> 4; in mlx5_query_mad_ifc_port()
573 ext_active_speed = out_mad->data[62] >> 4; in mlx5_query_mad_ifc_port()
594 NULL, NULL, in_mad, out_mad); in mlx5_query_mad_ifc_port()
599 if (out_mad->data[15] & 0x1) in mlx5_query_mad_ifc_port()
606 kfree(out_mad); in mlx5_query_mad_ifc_port()