in_mad 475 drivers/infiniband/core/sysfs.c struct ib_mad *in_mad; in_mad 484 drivers/infiniband/core/sysfs.c in_mad = kzalloc(sizeof *in_mad, GFP_KERNEL); in_mad 486 drivers/infiniband/core/sysfs.c if (!in_mad || !out_mad) { in_mad 491 drivers/infiniband/core/sysfs.c in_mad->mad_hdr.base_version = 1; in_mad 492 drivers/infiniband/core/sysfs.c in_mad->mad_hdr.mgmt_class = IB_MGMT_CLASS_PERF_MGMT; in_mad 493 drivers/infiniband/core/sysfs.c in_mad->mad_hdr.class_version = 1; in_mad 494 drivers/infiniband/core/sysfs.c in_mad->mad_hdr.method = IB_MGMT_METHOD_GET; in_mad 495 drivers/infiniband/core/sysfs.c in_mad->mad_hdr.attr_id = attr; in_mad 498 drivers/infiniband/core/sysfs.c in_mad->data[41] = port_num; /* PortSelect field */ in_mad 502 drivers/infiniband/core/sysfs.c (const struct ib_mad_hdr *)in_mad, mad_size, in_mad 513 drivers/infiniband/core/sysfs.c kfree(in_mad); in_mad 4493 drivers/infiniband/hw/hfi1/mad.c const struct opa_mad *in_mad, in_mad 4499 drivers/infiniband/hw/hfi1/mad.c if (!is_local_mad(ibp, in_mad, in_wc) && in_mad 4513 drivers/infiniband/hw/hfi1/mad.c u8 port, const struct opa_mad *in_mad, in_mad 4524 drivers/infiniband/hw/hfi1/mad.c *out_mad = *in_mad; in_mad 4618 drivers/infiniband/hw/hfi1/mad.c u8 port, const struct ib_mad *in_mad, in_mad 4625 drivers/infiniband/hw/hfi1/mad.c *out_mad = *in_mad; in_mad 4645 drivers/infiniband/hw/hfi1/mad.c if (in_mad->mad_hdr.attr_id == IB_SMP_ATTR_PORT_INFO && in_mad 4677 drivers/infiniband/hw/hfi1/mad.c const struct ib_mad *in_mad, in_mad 4685 drivers/infiniband/hw/hfi1/mad.c *out_mad = *in_mad; in_mad 4739 drivers/infiniband/hw/hfi1/mad.c const struct opa_mad *in_mad, in_mad 4745 drivers/infiniband/hw/hfi1/mad.c *out_mad = *in_mad; in_mad 4822 drivers/infiniband/hw/hfi1/mad.c const struct opa_mad *in_mad, in_mad 4840 drivers/infiniband/hw/hfi1/mad.c switch (in_mad->mad_hdr.mgmt_class) { in_mad 4843 drivers/infiniband/hw/hfi1/mad.c local_mad = is_local_mad(ibp, in_mad, in_wc); in_mad 4849 drivers/infiniband/hw/hfi1/mad.c ret = process_subn_opa(ibdev, mad_flags, port, in_mad, in_mad 4853 drivers/infiniband/hw/hfi1/mad.c ret = hfi1_pkey_validation_pma(ibp, in_mad, in_wc); in_mad 4857 drivers/infiniband/hw/hfi1/mad.c ret = process_perf_opa(ibdev, port, in_mad, out_mad, &resp_len); in_mad 4876 drivers/infiniband/hw/hfi1/mad.c const struct ib_mad *in_mad, in_mad 4881 drivers/infiniband/hw/hfi1/mad.c switch (in_mad->mad_hdr.mgmt_class) { in_mad 4884 drivers/infiniband/hw/hfi1/mad.c ret = process_subn(ibdev, mad_flags, port, in_mad, out_mad); in_mad 4887 drivers/infiniband/hw/hfi1/mad.c ret = process_perf(ibdev, port, in_mad, out_mad); in_mad 4918 drivers/infiniband/hw/hfi1/mad.c const struct ib_mad_hdr *in_mad, size_t in_mad_size, in_mad 4922 drivers/infiniband/hw/hfi1/mad.c switch (in_mad->base_version) { in_mad 4930 drivers/infiniband/hw/hfi1/mad.c (struct opa_mad *)in_mad, in_mad 4937 drivers/infiniband/hw/hfi1/mad.c (const struct ib_mad *)in_mad, in_mad 333 drivers/infiniband/hw/hfi1/verbs.h const struct ib_mad_hdr *in_mad, size_t in_mad_size, in_mad 111 drivers/infiniband/hw/mlx4/mad.c const void *in_mad, void *response_mad) in_mad 130 drivers/infiniband/hw/mlx4/mad.c memcpy(inbox, in_mad, 256); in_mad 804 drivers/infiniband/hw/mlx4/mad.c const struct ib_mad *in_mad, struct ib_mad *out_mad) in_mad 818 drivers/infiniband/hw/mlx4/mad.c be64_to_cpu(in_mad->mad_hdr.tid), in_mad 819 drivers/infiniband/hw/mlx4/mad.c in_mad->mad_hdr.mgmt_class, in_mad->mad_hdr.method, in_mad 820 drivers/infiniband/hw/mlx4/mad.c be16_to_cpu(in_mad->mad_hdr.attr_id)); in_mad 833 drivers/infiniband/hw/mlx4/mad.c if (in_mad->mad_hdr.method == IB_MGMT_METHOD_TRAP && slid == 0) { in_mad 834 drivers/infiniband/hw/mlx4/mad.c forward_trap(to_mdev(ibdev), port_num, in_mad); in_mad 838 drivers/infiniband/hw/mlx4/mad.c if (in_mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_LID_ROUTED || in_mad 839 drivers/infiniband/hw/mlx4/mad.c in_mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) { in_mad 840 drivers/infiniband/hw/mlx4/mad.c if (in_mad->mad_hdr.method != IB_MGMT_METHOD_GET && in_mad 841 drivers/infiniband/hw/mlx4/mad.c in_mad->mad_hdr.method != IB_MGMT_METHOD_SET && in_mad 842 drivers/infiniband/hw/mlx4/mad.c in_mad->mad_hdr.method != IB_MGMT_METHOD_TRAP_REPRESS) in_mad 848 drivers/infiniband/hw/mlx4/mad.c if (in_mad->mad_hdr.attr_id == IB_SMP_ATTR_SM_INFO) in_mad 850 drivers/infiniband/hw/mlx4/mad.c } else if (in_mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_PERF_MGMT || in_mad 851 drivers/infiniband/hw/mlx4/mad.c in_mad->mad_hdr.mgmt_class == MLX4_IB_VENDOR_CLASS1 || in_mad 852 drivers/infiniband/hw/mlx4/mad.c in_mad->mad_hdr.mgmt_class == MLX4_IB_VENDOR_CLASS2 || in_mad 853 drivers/infiniband/hw/mlx4/mad.c in_mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_CONG_MGMT) { in_mad 854 drivers/infiniband/hw/mlx4/mad.c if (in_mad->mad_hdr.method != IB_MGMT_METHOD_GET && in_mad 855 drivers/infiniband/hw/mlx4/mad.c in_mad->mad_hdr.method != IB_MGMT_METHOD_SET) in_mad 860 drivers/infiniband/hw/mlx4/mad.c if ((in_mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_LID_ROUTED || in_mad 861 drivers/infiniband/hw/mlx4/mad.c in_mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) && in_mad 862 drivers/infiniband/hw/mlx4/mad.c in_mad->mad_hdr.method == IB_MGMT_METHOD_SET && in_mad 863 drivers/infiniband/hw/mlx4/mad.c in_mad->mad_hdr.attr_id == IB_SMP_ATTR_PORT_INFO && in_mad 871 drivers/infiniband/hw/mlx4/mad.c port_num, in_wc, in_grh, in_mad, out_mad); in_mad 876 drivers/infiniband/hw/mlx4/mad.c smp_snoop(ibdev, port_num, in_mad, prev_lid); in_mad 883 drivers/infiniband/hw/mlx4/mad.c if (in_mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) in_mad 886 drivers/infiniband/hw/mlx4/mad.c if (in_mad->mad_hdr.method == IB_MGMT_METHOD_TRAP_REPRESS) in_mad 939 drivers/infiniband/hw/mlx4/mad.c const struct ib_mad *in_mad, struct ib_mad *out_mad) in_mad 946 drivers/infiniband/hw/mlx4/mad.c if (in_mad->mad_hdr.mgmt_class != IB_MGMT_CLASS_PERF_MGMT) in_mad 949 drivers/infiniband/hw/mlx4/mad.c if (in_mad->mad_hdr.attr_id == IB_PMA_CLASS_PORT_INFO) in_mad 974 drivers/infiniband/hw/mlx4/mad.c in_mad->mad_hdr.attr_id); in_mad 992 drivers/infiniband/hw/mlx4/mad.c const struct ib_mad *in_mad = (const struct ib_mad *)in; in_mad 996 drivers/infiniband/hw/mlx4/mad.c if (WARN_ON_ONCE(in_mad_size != sizeof(*in_mad) || in_mad 1005 drivers/infiniband/hw/mlx4/mad.c (in_mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_PERF_MGMT && in_mad 1006 drivers/infiniband/hw/mlx4/mad.c (in_mad->mad_hdr.attr_id == IB_PMA_PORT_COUNTERS || in_mad 1007 drivers/infiniband/hw/mlx4/mad.c in_mad->mad_hdr.attr_id == IB_PMA_PORT_COUNTERS_EXT || in_mad 1008 drivers/infiniband/hw/mlx4/mad.c in_mad->mad_hdr.attr_id == IB_PMA_CLASS_PORT_INFO))) in_mad 1010 drivers/infiniband/hw/mlx4/mad.c in_grh, in_mad, out_mad); in_mad 1013 drivers/infiniband/hw/mlx4/mad.c in_grh, in_mad, out_mad); in_mad 1018 drivers/infiniband/hw/mlx4/mad.c in_grh, in_mad, out_mad); in_mad 1137 drivers/infiniband/hw/mlx4/mad.c struct ib_smp *in_mad = NULL; in_mad 1144 drivers/infiniband/hw/mlx4/mad.c in_mad = kmalloc(sizeof *in_mad, GFP_KERNEL); in_mad 1146 drivers/infiniband/hw/mlx4/mad.c if (!in_mad || !out_mad) in_mad 1154 drivers/infiniband/hw/mlx4/mad.c memset(in_mad, 0, sizeof *in_mad); in_mad 1157 drivers/infiniband/hw/mlx4/mad.c in_mad->base_version = 1; in_mad 1158 drivers/infiniband/hw/mlx4/mad.c in_mad->mgmt_class = IB_MGMT_CLASS_SUBN_LID_ROUTED; in_mad 1159 drivers/infiniband/hw/mlx4/mad.c in_mad->class_version = 1; in_mad 1160 drivers/infiniband/hw/mlx4/mad.c in_mad->method = IB_MGMT_METHOD_GET; in_mad 1161 drivers/infiniband/hw/mlx4/mad.c in_mad->attr_id = IB_SMP_ATTR_GUID_INFO; in_mad 1162 drivers/infiniband/hw/mlx4/mad.c in_mad->attr_mod = cpu_to_be32(guid_tbl_blk_num + i); in_mad 1166 drivers/infiniband/hw/mlx4/mad.c port_num, NULL, NULL, in_mad, out_mad)) { in_mad 1180 drivers/infiniband/hw/mlx4/mad.c kfree(in_mad); in_mad 438 drivers/infiniband/hw/mlx4/main.c struct ib_smp *in_mad = NULL; in_mad 463 drivers/infiniband/hw/mlx4/main.c in_mad = kzalloc(sizeof *in_mad, GFP_KERNEL); in_mad 466 drivers/infiniband/hw/mlx4/main.c if (!in_mad || !out_mad) in_mad 469 drivers/infiniband/hw/mlx4/main.c init_query_mad(in_mad); in_mad 470 drivers/infiniband/hw/mlx4/main.c in_mad->attr_id = IB_SMP_ATTR_NODE_INFO; in_mad 473 drivers/infiniband/hw/mlx4/main.c 1, NULL, NULL, in_mad, out_mad); in_mad 642 drivers/infiniband/hw/mlx4/main.c kfree(in_mad); in_mad 660 drivers/infiniband/hw/mlx4/main.c struct ib_smp *in_mad = NULL; in_mad 666 drivers/infiniband/hw/mlx4/main.c in_mad = kzalloc(sizeof *in_mad, GFP_KERNEL); in_mad 668 drivers/infiniband/hw/mlx4/main.c if (!in_mad || !out_mad) in_mad 671 drivers/infiniband/hw/mlx4/main.c init_query_mad(in_mad); in_mad 672 drivers/infiniband/hw/mlx4/main.c in_mad->attr_id = IB_SMP_ATTR_PORT_INFO; in_mad 673 drivers/infiniband/hw/mlx4/main.c in_mad->attr_mod = cpu_to_be32(port); in_mad 679 drivers/infiniband/hw/mlx4/main.c in_mad, out_mad); in_mad 723 drivers/infiniband/hw/mlx4/main.c init_query_mad(in_mad); in_mad 724 drivers/infiniband/hw/mlx4/main.c in_mad->attr_id = MLX4_ATTR_EXTENDED_PORT_INFO; in_mad 725 drivers/infiniband/hw/mlx4/main.c in_mad->attr_mod = cpu_to_be32(port); in_mad 728 drivers/infiniband/hw/mlx4/main.c NULL, NULL, in_mad, out_mad); in_mad 742 drivers/infiniband/hw/mlx4/main.c kfree(in_mad); in_mad 837 drivers/infiniband/hw/mlx4/main.c struct ib_smp *in_mad = NULL; in_mad 844 drivers/infiniband/hw/mlx4/main.c in_mad = kzalloc(sizeof *in_mad, GFP_KERNEL); in_mad 846 drivers/infiniband/hw/mlx4/main.c if (!in_mad || !out_mad) in_mad 849 drivers/infiniband/hw/mlx4/main.c init_query_mad(in_mad); in_mad 850 drivers/infiniband/hw/mlx4/main.c in_mad->attr_id = IB_SMP_ATTR_PORT_INFO; in_mad 851 drivers/infiniband/hw/mlx4/main.c in_mad->attr_mod = cpu_to_be32(port); in_mad 856 drivers/infiniband/hw/mlx4/main.c err = mlx4_MAD_IFC(dev, mad_ifc_flags, port, NULL, NULL, in_mad, out_mad); in_mad 871 drivers/infiniband/hw/mlx4/main.c init_query_mad(in_mad); in_mad 872 drivers/infiniband/hw/mlx4/main.c in_mad->attr_id = IB_SMP_ATTR_GUID_INFO; in_mad 873 drivers/infiniband/hw/mlx4/main.c in_mad->attr_mod = cpu_to_be32(index / 8); in_mad 876 drivers/infiniband/hw/mlx4/main.c NULL, NULL, in_mad, out_mad); in_mad 885 drivers/infiniband/hw/mlx4/main.c kfree(in_mad); in_mad 901 drivers/infiniband/hw/mlx4/main.c struct ib_smp *in_mad = NULL; in_mad 912 drivers/infiniband/hw/mlx4/main.c in_mad = kzalloc(sizeof(*in_mad), GFP_KERNEL); in_mad 914 drivers/infiniband/hw/mlx4/main.c if (!in_mad || !out_mad) in_mad 917 drivers/infiniband/hw/mlx4/main.c init_query_mad(in_mad); in_mad 918 drivers/infiniband/hw/mlx4/main.c in_mad->attr_id = IB_SMP_ATTR_SL_TO_VL_TABLE; in_mad 919 drivers/infiniband/hw/mlx4/main.c in_mad->attr_mod = 0; in_mad 925 drivers/infiniband/hw/mlx4/main.c in_mad, out_mad); in_mad 934 drivers/infiniband/hw/mlx4/main.c kfree(in_mad); in_mad 961 drivers/infiniband/hw/mlx4/main.c struct ib_smp *in_mad = NULL; in_mad 966 drivers/infiniband/hw/mlx4/main.c in_mad = kzalloc(sizeof *in_mad, GFP_KERNEL); in_mad 968 drivers/infiniband/hw/mlx4/main.c if (!in_mad || !out_mad) in_mad 971 drivers/infiniband/hw/mlx4/main.c init_query_mad(in_mad); in_mad 972 drivers/infiniband/hw/mlx4/main.c in_mad->attr_id = IB_SMP_ATTR_PKEY_TABLE; in_mad 973 drivers/infiniband/hw/mlx4/main.c in_mad->attr_mod = cpu_to_be32(index / 32); in_mad 979 drivers/infiniband/hw/mlx4/main.c in_mad, out_mad); in_mad 986 drivers/infiniband/hw/mlx4/main.c kfree(in_mad); in_mad 1999 drivers/infiniband/hw/mlx4/main.c struct ib_smp *in_mad = NULL; in_mad 2004 drivers/infiniband/hw/mlx4/main.c in_mad = kzalloc(sizeof *in_mad, GFP_KERNEL); in_mad 2006 drivers/infiniband/hw/mlx4/main.c if (!in_mad || !out_mad) in_mad 2009 drivers/infiniband/hw/mlx4/main.c init_query_mad(in_mad); in_mad 2010 drivers/infiniband/hw/mlx4/main.c in_mad->attr_id = IB_SMP_ATTR_NODE_DESC; in_mad 2014 drivers/infiniband/hw/mlx4/main.c err = mlx4_MAD_IFC(dev, mad_ifc_flags, 1, NULL, NULL, in_mad, out_mad); in_mad 2020 drivers/infiniband/hw/mlx4/main.c in_mad->attr_id = IB_SMP_ATTR_NODE_INFO; in_mad 2022 drivers/infiniband/hw/mlx4/main.c err = mlx4_MAD_IFC(dev, mad_ifc_flags, 1, NULL, NULL, in_mad, out_mad); in_mad 2030 drivers/infiniband/hw/mlx4/main.c kfree(in_mad); in_mad 788 drivers/infiniband/hw/mlx4/mlx4_ib.h const void *in_mad, void *response_mad); in_mad 47 drivers/infiniband/hw/mlx5/mad.c struct ib_mad *in_mad) in_mad 49 drivers/infiniband/hw/mlx5/mad.c if (in_mad->mad_hdr.mgmt_class != IB_MGMT_CLASS_SUBN_LID_ROUTED && in_mad 50 drivers/infiniband/hw/mlx5/mad.c in_mad->mad_hdr.mgmt_class != IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) in_mad 57 drivers/infiniband/hw/mlx5/mad.c const struct ib_grh *in_grh, const void *in_mad, in_mad 62 drivers/infiniband/hw/mlx5/mad.c if (!can_do_mad_ifc(dev, port, (struct ib_mad *)in_mad)) in_mad 73 drivers/infiniband/hw/mlx5/mad.c return mlx5_cmd_mad_ifc(dev->mdev, in_mad, response_mad, op_modifier, in_mad 79 drivers/infiniband/hw/mlx5/mad.c const struct ib_mad *in_mad, struct ib_mad *out_mad) in_mad 86 drivers/infiniband/hw/mlx5/mad.c if (in_mad->mad_hdr.method == IB_MGMT_METHOD_TRAP && slid == 0) in_mad 89 drivers/infiniband/hw/mlx5/mad.c if (in_mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_LID_ROUTED || in_mad 90 drivers/infiniband/hw/mlx5/mad.c in_mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) { in_mad 91 drivers/infiniband/hw/mlx5/mad.c if (in_mad->mad_hdr.method != IB_MGMT_METHOD_GET && in_mad 92 drivers/infiniband/hw/mlx5/mad.c in_mad->mad_hdr.method != IB_MGMT_METHOD_SET && in_mad 93 drivers/infiniband/hw/mlx5/mad.c in_mad->mad_hdr.method != IB_MGMT_METHOD_TRAP_REPRESS) in_mad 98 drivers/infiniband/hw/mlx5/mad.c if (in_mad->mad_hdr.attr_id == IB_SMP_ATTR_SM_INFO) in_mad 100 drivers/infiniband/hw/mlx5/mad.c } else if (in_mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_PERF_MGMT || in_mad 101 drivers/infiniband/hw/mlx5/mad.c in_mad->mad_hdr.mgmt_class == MLX5_IB_VENDOR_CLASS1 || in_mad 102 drivers/infiniband/hw/mlx5/mad.c in_mad->mad_hdr.mgmt_class == MLX5_IB_VENDOR_CLASS2 || in_mad 103 drivers/infiniband/hw/mlx5/mad.c in_mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_CONG_MGMT) { in_mad 104 drivers/infiniband/hw/mlx5/mad.c if (in_mad->mad_hdr.method != IB_MGMT_METHOD_GET && in_mad 105 drivers/infiniband/hw/mlx5/mad.c in_mad->mad_hdr.method != IB_MGMT_METHOD_SET) in_mad 114 drivers/infiniband/hw/mlx5/mad.c port_num, in_wc, in_grh, in_mad, out_mad); in_mad 119 drivers/infiniband/hw/mlx5/mad.c if (in_mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) in_mad 122 drivers/infiniband/hw/mlx5/mad.c if (in_mad->mad_hdr.method == IB_MGMT_METHOD_TRAP_REPRESS) in_mad 204 drivers/infiniband/hw/mlx5/mad.c const struct ib_mad *in_mad, struct ib_mad *out_mad) in_mad 223 drivers/infiniband/hw/mlx5/mad.c if (in_mad->mad_hdr.attr_id == IB_PMA_CLASS_PORT_INFO) { in_mad 232 drivers/infiniband/hw/mlx5/mad.c if (in_mad->mad_hdr.attr_id == IB_PMA_PORT_COUNTERS_EXT) { in_mad 279 drivers/infiniband/hw/mlx5/mad.c const struct ib_mad *in_mad = (const struct ib_mad *)in; in_mad 283 drivers/infiniband/hw/mlx5/mad.c if (WARN_ON_ONCE(in_mad_size != sizeof(*in_mad) || in_mad 290 drivers/infiniband/hw/mlx5/mad.c in_mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_PERF_MGMT && in_mad 291 drivers/infiniband/hw/mlx5/mad.c in_mad->mad_hdr.method == IB_MGMT_METHOD_GET) { in_mad 292 drivers/infiniband/hw/mlx5/mad.c ret = process_pma_cmd(dev, port_num, in_mad, out_mad); in_mad 295 drivers/infiniband/hw/mlx5/mad.c in_mad, out_mad); in_mad 302 drivers/infiniband/hw/mlx5/mad.c struct ib_smp *in_mad = NULL; in_mad 307 drivers/infiniband/hw/mlx5/mad.c in_mad = kzalloc(sizeof(*in_mad), GFP_KERNEL); in_mad 309 drivers/infiniband/hw/mlx5/mad.c if (!in_mad || !out_mad) in_mad 312 drivers/infiniband/hw/mlx5/mad.c init_query_mad(in_mad); in_mad 313 drivers/infiniband/hw/mlx5/mad.c in_mad->attr_id = MLX5_ATTR_EXTENDED_PORT_INFO; in_mad 314 drivers/infiniband/hw/mlx5/mad.c in_mad->attr_mod = cpu_to_be32(port); in_mad 316 drivers/infiniband/hw/mlx5/mad.c err = mlx5_MAD_IFC(dev, 1, 1, 1, NULL, NULL, in_mad, out_mad); in_mad 324 drivers/infiniband/hw/mlx5/mad.c kfree(in_mad); in_mad 332 drivers/infiniband/hw/mlx5/mad.c struct ib_smp *in_mad = NULL; in_mad 335 drivers/infiniband/hw/mlx5/mad.c in_mad = kzalloc(sizeof(*in_mad), GFP_KERNEL); in_mad 336 drivers/infiniband/hw/mlx5/mad.c if (!in_mad) in_mad 339 drivers/infiniband/hw/mlx5/mad.c init_query_mad(in_mad); in_mad 340 drivers/infiniband/hw/mlx5/mad.c in_mad->attr_id = IB_SMP_ATTR_NODE_INFO; in_mad 342 drivers/infiniband/hw/mlx5/mad.c err = mlx5_MAD_IFC(to_mdev(ibdev), 1, 1, 1, NULL, NULL, in_mad, in_mad 345 drivers/infiniband/hw/mlx5/mad.c kfree(in_mad); in_mad 417 drivers/infiniband/hw/mlx5/mad.c struct ib_smp *in_mad = NULL; in_mad 421 drivers/infiniband/hw/mlx5/mad.c in_mad = kzalloc(sizeof(*in_mad), GFP_KERNEL); in_mad 423 drivers/infiniband/hw/mlx5/mad.c if (!in_mad || !out_mad) in_mad 426 drivers/infiniband/hw/mlx5/mad.c init_query_mad(in_mad); in_mad 427 drivers/infiniband/hw/mlx5/mad.c in_mad->attr_id = IB_SMP_ATTR_NODE_DESC; in_mad 429 drivers/infiniband/hw/mlx5/mad.c err = mlx5_MAD_IFC(dev, 1, 1, 1, NULL, NULL, in_mad, out_mad); in_mad 435 drivers/infiniband/hw/mlx5/mad.c kfree(in_mad); in_mad 442 drivers/infiniband/hw/mlx5/mad.c struct ib_smp *in_mad = NULL; in_mad 446 drivers/infiniband/hw/mlx5/mad.c in_mad = kzalloc(sizeof(*in_mad), GFP_KERNEL); in_mad 448 drivers/infiniband/hw/mlx5/mad.c if (!in_mad || !out_mad) in_mad 451 drivers/infiniband/hw/mlx5/mad.c init_query_mad(in_mad); in_mad 452 drivers/infiniband/hw/mlx5/mad.c in_mad->attr_id = IB_SMP_ATTR_NODE_INFO; in_mad 454 drivers/infiniband/hw/mlx5/mad.c err = mlx5_MAD_IFC(dev, 1, 1, 1, NULL, NULL, in_mad, out_mad); in_mad 460 drivers/infiniband/hw/mlx5/mad.c kfree(in_mad); in_mad 468 drivers/infiniband/hw/mlx5/mad.c struct ib_smp *in_mad = NULL; in_mad 472 drivers/infiniband/hw/mlx5/mad.c in_mad = kzalloc(sizeof(*in_mad), GFP_KERNEL); in_mad 474 drivers/infiniband/hw/mlx5/mad.c if (!in_mad || !out_mad) in_mad 477 drivers/infiniband/hw/mlx5/mad.c init_query_mad(in_mad); in_mad 478 drivers/infiniband/hw/mlx5/mad.c in_mad->attr_id = IB_SMP_ATTR_PKEY_TABLE; in_mad 479 drivers/infiniband/hw/mlx5/mad.c in_mad->attr_mod = cpu_to_be32(index / 32); in_mad 481 drivers/infiniband/hw/mlx5/mad.c err = mlx5_MAD_IFC(to_mdev(ibdev), 1, 1, port, NULL, NULL, in_mad, in_mad 489 drivers/infiniband/hw/mlx5/mad.c kfree(in_mad); in_mad 497 drivers/infiniband/hw/mlx5/mad.c struct ib_smp *in_mad = NULL; in_mad 501 drivers/infiniband/hw/mlx5/mad.c in_mad = kzalloc(sizeof(*in_mad), GFP_KERNEL); in_mad 503 drivers/infiniband/hw/mlx5/mad.c if (!in_mad || !out_mad) in_mad 506 drivers/infiniband/hw/mlx5/mad.c init_query_mad(in_mad); in_mad 507 drivers/infiniband/hw/mlx5/mad.c in_mad->attr_id = IB_SMP_ATTR_PORT_INFO; in_mad 508 drivers/infiniband/hw/mlx5/mad.c in_mad->attr_mod = cpu_to_be32(port); in_mad 510 drivers/infiniband/hw/mlx5/mad.c err = mlx5_MAD_IFC(to_mdev(ibdev), 1, 1, port, NULL, NULL, in_mad, in_mad 517 drivers/infiniband/hw/mlx5/mad.c init_query_mad(in_mad); in_mad 518 drivers/infiniband/hw/mlx5/mad.c in_mad->attr_id = IB_SMP_ATTR_GUID_INFO; in_mad 519 drivers/infiniband/hw/mlx5/mad.c in_mad->attr_mod = cpu_to_be32(index / 8); in_mad 521 drivers/infiniband/hw/mlx5/mad.c err = mlx5_MAD_IFC(to_mdev(ibdev), 1, 1, port, NULL, NULL, in_mad, in_mad 529 drivers/infiniband/hw/mlx5/mad.c kfree(in_mad); in_mad 539 drivers/infiniband/hw/mlx5/mad.c struct ib_smp *in_mad = NULL; in_mad 544 drivers/infiniband/hw/mlx5/mad.c in_mad = kzalloc(sizeof(*in_mad), GFP_KERNEL); in_mad 546 drivers/infiniband/hw/mlx5/mad.c if (!in_mad || !out_mad) in_mad 551 drivers/infiniband/hw/mlx5/mad.c init_query_mad(in_mad); in_mad 552 drivers/infiniband/hw/mlx5/mad.c in_mad->attr_id = IB_SMP_ATTR_PORT_INFO; in_mad 553 drivers/infiniband/hw/mlx5/mad.c in_mad->attr_mod = cpu_to_be32(port); in_mad 555 drivers/infiniband/hw/mlx5/mad.c err = mlx5_MAD_IFC(dev, 1, 1, port, NULL, NULL, in_mad, out_mad); in_mad 612 drivers/infiniband/hw/mlx5/mad.c init_query_mad(in_mad); in_mad 613 drivers/infiniband/hw/mlx5/mad.c in_mad->attr_id = MLX5_ATTR_EXTENDED_PORT_INFO; in_mad 614 drivers/infiniband/hw/mlx5/mad.c in_mad->attr_mod = cpu_to_be32(port); in_mad 617 drivers/infiniband/hw/mlx5/mad.c NULL, NULL, in_mad, out_mad); in_mad 628 drivers/infiniband/hw/mlx5/mad.c kfree(in_mad); in_mad 1864 drivers/infiniband/hw/mthca/mthca_cmd.c const void *in_mad, void *response_mad) in_mad 1892 drivers/infiniband/hw/mthca/mthca_cmd.c memcpy(inbox, in_mad, 256); in_mad 316 drivers/infiniband/hw/mthca/mthca_cmd.h const void *in_mad, void *response_mad); in_mad 212 drivers/infiniband/hw/mthca/mthca_mad.c const struct ib_mad *in_mad = (const struct ib_mad *)in; in_mad 215 drivers/infiniband/hw/mthca/mthca_mad.c if (WARN_ON_ONCE(in_mad_size != sizeof(*in_mad) || in_mad 220 drivers/infiniband/hw/mthca/mthca_mad.c if (in_mad->mad_hdr.method == IB_MGMT_METHOD_TRAP && in_mad 222 drivers/infiniband/hw/mthca/mthca_mad.c forward_trap(to_mdev(ibdev), port_num, in_mad); in_mad 232 drivers/infiniband/hw/mthca/mthca_mad.c if (in_mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_LID_ROUTED || in_mad 233 drivers/infiniband/hw/mthca/mthca_mad.c in_mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) { in_mad 234 drivers/infiniband/hw/mthca/mthca_mad.c if (in_mad->mad_hdr.method != IB_MGMT_METHOD_GET && in_mad 235 drivers/infiniband/hw/mthca/mthca_mad.c in_mad->mad_hdr.method != IB_MGMT_METHOD_SET && in_mad 236 drivers/infiniband/hw/mthca/mthca_mad.c in_mad->mad_hdr.method != IB_MGMT_METHOD_TRAP_REPRESS) in_mad 243 drivers/infiniband/hw/mthca/mthca_mad.c if (in_mad->mad_hdr.attr_id == IB_SMP_ATTR_SM_INFO || in_mad 244 drivers/infiniband/hw/mthca/mthca_mad.c ((in_mad->mad_hdr.attr_id & IB_SMP_ATTR_VENDOR_MASK) == in_mad 247 drivers/infiniband/hw/mthca/mthca_mad.c } else if (in_mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_PERF_MGMT || in_mad 248 drivers/infiniband/hw/mthca/mthca_mad.c in_mad->mad_hdr.mgmt_class == MTHCA_VENDOR_CLASS1 || in_mad 249 drivers/infiniband/hw/mthca/mthca_mad.c in_mad->mad_hdr.mgmt_class == MTHCA_VENDOR_CLASS2) { in_mad 250 drivers/infiniband/hw/mthca/mthca_mad.c if (in_mad->mad_hdr.method != IB_MGMT_METHOD_GET && in_mad 251 drivers/infiniband/hw/mthca/mthca_mad.c in_mad->mad_hdr.method != IB_MGMT_METHOD_SET) in_mad 255 drivers/infiniband/hw/mthca/mthca_mad.c if ((in_mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_LID_ROUTED || in_mad 256 drivers/infiniband/hw/mthca/mthca_mad.c in_mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) && in_mad 257 drivers/infiniband/hw/mthca/mthca_mad.c in_mad->mad_hdr.method == IB_MGMT_METHOD_SET && in_mad 258 drivers/infiniband/hw/mthca/mthca_mad.c in_mad->mad_hdr.attr_id == IB_SMP_ATTR_PORT_INFO && in_mad 265 drivers/infiniband/hw/mthca/mthca_mad.c port_num, in_wc, in_grh, in_mad, out_mad); in_mad 274 drivers/infiniband/hw/mthca/mthca_mad.c smp_snoop(ibdev, port_num, in_mad, prev_lid); in_mad 279 drivers/infiniband/hw/mthca/mthca_mad.c if (in_mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) in_mad 282 drivers/infiniband/hw/mthca/mthca_mad.c if (in_mad->mad_hdr.method == IB_MGMT_METHOD_TRAP_REPRESS) in_mad 64 drivers/infiniband/hw/mthca/mthca_provider.c struct ib_smp *in_mad = NULL; in_mad 72 drivers/infiniband/hw/mthca/mthca_provider.c in_mad = kzalloc(sizeof *in_mad, GFP_KERNEL); in_mad 74 drivers/infiniband/hw/mthca/mthca_provider.c if (!in_mad || !out_mad) in_mad 81 drivers/infiniband/hw/mthca/mthca_provider.c init_query_mad(in_mad); in_mad 82 drivers/infiniband/hw/mthca/mthca_provider.c in_mad->attr_id = IB_SMP_ATTR_NODE_INFO; in_mad 85 drivers/infiniband/hw/mthca/mthca_provider.c 1, NULL, NULL, in_mad, out_mad); in_mad 134 drivers/infiniband/hw/mthca/mthca_provider.c kfree(in_mad); in_mad 142 drivers/infiniband/hw/mthca/mthca_provider.c struct ib_smp *in_mad = NULL; in_mad 146 drivers/infiniband/hw/mthca/mthca_provider.c in_mad = kzalloc(sizeof *in_mad, GFP_KERNEL); in_mad 148 drivers/infiniband/hw/mthca/mthca_provider.c if (!in_mad || !out_mad) in_mad 153 drivers/infiniband/hw/mthca/mthca_provider.c init_query_mad(in_mad); in_mad 154 drivers/infiniband/hw/mthca/mthca_provider.c in_mad->attr_id = IB_SMP_ATTR_PORT_INFO; in_mad 155 drivers/infiniband/hw/mthca/mthca_provider.c in_mad->attr_mod = cpu_to_be32(port); in_mad 158 drivers/infiniband/hw/mthca/mthca_provider.c port, NULL, NULL, in_mad, out_mad); in_mad 183 drivers/infiniband/hw/mthca/mthca_provider.c kfree(in_mad); in_mad 238 drivers/infiniband/hw/mthca/mthca_provider.c struct ib_smp *in_mad = NULL; in_mad 242 drivers/infiniband/hw/mthca/mthca_provider.c in_mad = kzalloc(sizeof *in_mad, GFP_KERNEL); in_mad 244 drivers/infiniband/hw/mthca/mthca_provider.c if (!in_mad || !out_mad) in_mad 247 drivers/infiniband/hw/mthca/mthca_provider.c init_query_mad(in_mad); in_mad 248 drivers/infiniband/hw/mthca/mthca_provider.c in_mad->attr_id = IB_SMP_ATTR_PKEY_TABLE; in_mad 249 drivers/infiniband/hw/mthca/mthca_provider.c in_mad->attr_mod = cpu_to_be32(index / 32); in_mad 252 drivers/infiniband/hw/mthca/mthca_provider.c port, NULL, NULL, in_mad, out_mad); in_mad 259 drivers/infiniband/hw/mthca/mthca_provider.c kfree(in_mad); in_mad 267 drivers/infiniband/hw/mthca/mthca_provider.c struct ib_smp *in_mad = NULL; in_mad 271 drivers/infiniband/hw/mthca/mthca_provider.c in_mad = kzalloc(sizeof *in_mad, GFP_KERNEL); in_mad 273 drivers/infiniband/hw/mthca/mthca_provider.c if (!in_mad || !out_mad) in_mad 276 drivers/infiniband/hw/mthca/mthca_provider.c init_query_mad(in_mad); in_mad 277 drivers/infiniband/hw/mthca/mthca_provider.c in_mad->attr_id = IB_SMP_ATTR_PORT_INFO; in_mad 278 drivers/infiniband/hw/mthca/mthca_provider.c in_mad->attr_mod = cpu_to_be32(port); in_mad 281 drivers/infiniband/hw/mthca/mthca_provider.c port, NULL, NULL, in_mad, out_mad); in_mad 287 drivers/infiniband/hw/mthca/mthca_provider.c init_query_mad(in_mad); in_mad 288 drivers/infiniband/hw/mthca/mthca_provider.c in_mad->attr_id = IB_SMP_ATTR_GUID_INFO; in_mad 289 drivers/infiniband/hw/mthca/mthca_provider.c in_mad->attr_mod = cpu_to_be32(index / 8); in_mad 292 drivers/infiniband/hw/mthca/mthca_provider.c port, NULL, NULL, in_mad, out_mad); in_mad 299 drivers/infiniband/hw/mthca/mthca_provider.c kfree(in_mad); in_mad 1080 drivers/infiniband/hw/mthca/mthca_provider.c struct ib_smp *in_mad = NULL; in_mad 1084 drivers/infiniband/hw/mthca/mthca_provider.c in_mad = kzalloc(sizeof *in_mad, GFP_KERNEL); in_mad 1086 drivers/infiniband/hw/mthca/mthca_provider.c if (!in_mad || !out_mad) in_mad 1089 drivers/infiniband/hw/mthca/mthca_provider.c init_query_mad(in_mad); in_mad 1090 drivers/infiniband/hw/mthca/mthca_provider.c in_mad->attr_id = IB_SMP_ATTR_NODE_DESC; in_mad 1093 drivers/infiniband/hw/mthca/mthca_provider.c 1, NULL, NULL, in_mad, out_mad); in_mad 1099 drivers/infiniband/hw/mthca/mthca_provider.c in_mad->attr_id = IB_SMP_ATTR_NODE_INFO; in_mad 1102 drivers/infiniband/hw/mthca/mthca_provider.c 1, NULL, NULL, in_mad, out_mad); in_mad 1111 drivers/infiniband/hw/mthca/mthca_provider.c kfree(in_mad); in_mad 261 drivers/infiniband/hw/ocrdma/ocrdma_ah.c const struct ib_mad *in_mad = (const struct ib_mad *)in; in_mad 264 drivers/infiniband/hw/ocrdma/ocrdma_ah.c if (WARN_ON_ONCE(in_mad_size != sizeof(*in_mad) || in_mad 268 drivers/infiniband/hw/ocrdma/ocrdma_ah.c switch (in_mad->mad_hdr.mgmt_class) { in_mad 97 drivers/infiniband/hw/qedr/verbs.h const struct ib_mad_hdr *in_mad, in_mad 1861 drivers/infiniband/hw/qib/qib_mad.c u8 port, const struct ib_mad *in_mad, in_mad 1869 drivers/infiniband/hw/qib/qib_mad.c *out_mad = *in_mad; in_mad 1887 drivers/infiniband/hw/qib/qib_mad.c if (in_mad->mad_hdr.attr_id == IB_SMP_ATTR_PORT_INFO && in_mad 2013 drivers/infiniband/hw/qib/qib_mad.c const struct ib_mad *in_mad, in_mad 2019 drivers/infiniband/hw/qib/qib_mad.c *out_mad = *in_mad; in_mad 2306 drivers/infiniband/hw/qib/qib_mad.c u8 port, const struct ib_mad *in_mad, in_mad 2313 drivers/infiniband/hw/qib/qib_mad.c *out_mad = *in_mad; in_mad 2415 drivers/infiniband/hw/qib/qib_mad.c const struct ib_mad *in_mad = (const struct ib_mad *)in; in_mad 2418 drivers/infiniband/hw/qib/qib_mad.c if (WARN_ON_ONCE(in_mad_size != sizeof(*in_mad) || in_mad 2422 drivers/infiniband/hw/qib/qib_mad.c switch (in_mad->mad_hdr.mgmt_class) { in_mad 2425 drivers/infiniband/hw/qib/qib_mad.c ret = process_subn(ibdev, mad_flags, port, in_mad, out_mad); in_mad 2429 drivers/infiniband/hw/qib/qib_mad.c ret = process_perf(ibdev, port, in_mad, out_mad); in_mad 2438 drivers/infiniband/hw/qib/qib_mad.c ret = process_cc(ibdev, mad_flags, port, in_mad, out_mad); in_mad 843 drivers/net/ethernet/mellanox/mlx4/cmd.c struct ib_smp *in_mad = (struct ib_smp *)(inbox->buf); in_mad 851 drivers/net/ethernet/mellanox/mlx4/cmd.c in_mad->attr_mod = cpu_to_be32(index / 32); in_mad 2280 include/rdma/ib_verbs.h const struct ib_mad_hdr *in_mad, size_t in_mad_size,