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