Lines Matching refs:out_mad
70 struct ib_smp *out_mad = NULL; in mlx5_ib_query_device() local
79 out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); in mlx5_ib_query_device()
80 if (!in_mad || !out_mad) in mlx5_ib_query_device()
86 err = mlx5_MAD_IFC(to_mdev(ibdev), 1, 1, 1, NULL, NULL, in_mad, out_mad); in mlx5_ib_query_device()
122 props->vendor_id = be32_to_cpup((__be32 *)(out_mad->data + 36)) & in mlx5_ib_query_device()
124 props->vendor_part_id = be16_to_cpup((__be16 *)(out_mad->data + 30)); in mlx5_ib_query_device()
125 props->hw_ver = be32_to_cpup((__be32 *)(out_mad->data + 32)); in mlx5_ib_query_device()
126 memcpy(&props->sys_image_guid, out_mad->data + 4, 8); in mlx5_ib_query_device()
151 props->max_pkeys = be16_to_cpup((__be16 *)(out_mad->data + 28)); in mlx5_ib_query_device()
166 kfree(out_mad); in mlx5_ib_query_device()
176 struct ib_smp *out_mad = NULL; in mlx5_ib_query_port() local
188 out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); in mlx5_ib_query_port()
189 if (!in_mad || !out_mad) in mlx5_ib_query_port()
198 err = mlx5_MAD_IFC(dev, 1, 1, port, NULL, NULL, in_mad, out_mad); in mlx5_ib_query_port()
205 props->lid = be16_to_cpup((__be16 *)(out_mad->data + 16)); in mlx5_ib_query_port()
206 props->lmc = out_mad->data[34] & 0x7; in mlx5_ib_query_port()
207 props->sm_lid = be16_to_cpup((__be16 *)(out_mad->data + 18)); in mlx5_ib_query_port()
208 props->sm_sl = out_mad->data[36] & 0xf; in mlx5_ib_query_port()
209 props->state = out_mad->data[32] & 0xf; in mlx5_ib_query_port()
210 props->phys_state = out_mad->data[33] >> 4; in mlx5_ib_query_port()
211 props->port_cap_flags = be32_to_cpup((__be32 *)(out_mad->data + 20)); in mlx5_ib_query_port()
212 props->gid_tbl_len = out_mad->data[50]; in mlx5_ib_query_port()
215 props->bad_pkey_cntr = be16_to_cpup((__be16 *)(out_mad->data + 46)); in mlx5_ib_query_port()
216 props->qkey_viol_cntr = be16_to_cpup((__be16 *)(out_mad->data + 48)); in mlx5_ib_query_port()
217 props->active_width = out_mad->data[31] & 0xf; in mlx5_ib_query_port()
218 props->active_speed = out_mad->data[35] >> 4; in mlx5_ib_query_port()
219 props->max_mtu = out_mad->data[41] & 0xf; in mlx5_ib_query_port()
220 props->active_mtu = out_mad->data[36] >> 4; in mlx5_ib_query_port()
221 props->subnet_timeout = out_mad->data[51] & 0x1f; in mlx5_ib_query_port()
222 props->max_vl_num = out_mad->data[37] >> 4; in mlx5_ib_query_port()
223 props->init_type_reply = out_mad->data[41] >> 4; in mlx5_ib_query_port()
227 ext_active_speed = out_mad->data[62] >> 4; in mlx5_ib_query_port()
248 NULL, NULL, in_mad, out_mad); in mlx5_ib_query_port()
253 if (out_mad->data[15] & 0x1) in mlx5_ib_query_port()
260 kfree(out_mad); in mlx5_ib_query_port()
269 struct ib_smp *out_mad = NULL; in mlx5_ib_query_gid() local
273 out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); in mlx5_ib_query_gid()
274 if (!in_mad || !out_mad) in mlx5_ib_query_gid()
281 err = mlx5_MAD_IFC(to_mdev(ibdev), 1, 1, port, NULL, NULL, in_mad, out_mad); in mlx5_ib_query_gid()
285 memcpy(gid->raw, out_mad->data + 8, 8); in mlx5_ib_query_gid()
291 err = mlx5_MAD_IFC(to_mdev(ibdev), 1, 1, port, NULL, NULL, in_mad, out_mad); in mlx5_ib_query_gid()
295 memcpy(gid->raw + 8, out_mad->data + (index % 8) * 8, 8); in mlx5_ib_query_gid()
299 kfree(out_mad); in mlx5_ib_query_gid()
307 struct ib_smp *out_mad = NULL; in mlx5_ib_query_pkey() local
311 out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); in mlx5_ib_query_pkey()
312 if (!in_mad || !out_mad) in mlx5_ib_query_pkey()
319 err = mlx5_MAD_IFC(to_mdev(ibdev), 1, 1, port, NULL, NULL, in_mad, out_mad); in mlx5_ib_query_pkey()
323 *pkey = be16_to_cpu(((__be16 *)out_mad->data)[index % 32]); in mlx5_ib_query_pkey()
327 kfree(out_mad); in mlx5_ib_query_pkey()
735 struct ib_smp *out_mad = NULL; in init_node_data() local
739 out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); in init_node_data()
740 if (!in_mad || !out_mad) in init_node_data()
746 err = mlx5_MAD_IFC(dev, 1, 1, 1, NULL, NULL, in_mad, out_mad); in init_node_data()
750 memcpy(dev->ib_dev.node_desc, out_mad->data, 64); in init_node_data()
754 err = mlx5_MAD_IFC(dev, 1, 1, 1, NULL, NULL, in_mad, out_mad); in init_node_data()
758 dev->mdev->rev_id = be32_to_cpup((__be32 *)(out_mad->data + 32)); in init_node_data()
759 memcpy(&dev->ib_dev.node_guid, out_mad->data + 12, 8); in init_node_data()
763 kfree(out_mad); in init_node_data()