Lines Matching refs:out_mad
64 struct ib_smp *out_mad = NULL; in mthca_query_device() local
72 out_mad = kmalloc(sizeof *out_mad, GFP_KERNEL); in mthca_query_device()
73 if (!in_mad || !out_mad) in mthca_query_device()
84 1, NULL, NULL, in_mad, out_mad); in mthca_query_device()
89 props->vendor_id = be32_to_cpup((__be32 *) (out_mad->data + 36)) & in mthca_query_device()
91 props->vendor_part_id = be16_to_cpup((__be16 *) (out_mad->data + 30)); in mthca_query_device()
92 props->hw_ver = be32_to_cpup((__be32 *) (out_mad->data + 32)); in mthca_query_device()
93 memcpy(&props->sys_image_guid, out_mad->data + 4, 8); in mthca_query_device()
134 kfree(out_mad); in mthca_query_device()
142 struct ib_smp *out_mad = NULL; in mthca_query_port() local
146 out_mad = kmalloc(sizeof *out_mad, GFP_KERNEL); in mthca_query_port()
147 if (!in_mad || !out_mad) in mthca_query_port()
157 port, NULL, NULL, in_mad, out_mad); in mthca_query_port()
161 props->lid = be16_to_cpup((__be16 *) (out_mad->data + 16)); in mthca_query_port()
162 props->lmc = out_mad->data[34] & 0x7; in mthca_query_port()
163 props->sm_lid = be16_to_cpup((__be16 *) (out_mad->data + 18)); in mthca_query_port()
164 props->sm_sl = out_mad->data[36] & 0xf; in mthca_query_port()
165 props->state = out_mad->data[32] & 0xf; in mthca_query_port()
166 props->phys_state = out_mad->data[33] >> 4; in mthca_query_port()
167 props->port_cap_flags = be32_to_cpup((__be32 *) (out_mad->data + 20)); in mthca_query_port()
171 props->bad_pkey_cntr = be16_to_cpup((__be16 *) (out_mad->data + 46)); in mthca_query_port()
172 props->qkey_viol_cntr = be16_to_cpup((__be16 *) (out_mad->data + 48)); in mthca_query_port()
173 props->active_width = out_mad->data[31] & 0xf; in mthca_query_port()
174 props->active_speed = out_mad->data[35] >> 4; in mthca_query_port()
175 props->max_mtu = out_mad->data[41] & 0xf; in mthca_query_port()
176 props->active_mtu = out_mad->data[36] >> 4; in mthca_query_port()
177 props->subnet_timeout = out_mad->data[51] & 0x1f; in mthca_query_port()
178 props->max_vl_num = out_mad->data[37] >> 4; in mthca_query_port()
179 props->init_type_reply = out_mad->data[41] >> 4; in mthca_query_port()
183 kfree(out_mad); in mthca_query_port()
238 struct ib_smp *out_mad = NULL; in mthca_query_pkey() local
242 out_mad = kmalloc(sizeof *out_mad, GFP_KERNEL); in mthca_query_pkey()
243 if (!in_mad || !out_mad) in mthca_query_pkey()
251 port, NULL, NULL, in_mad, out_mad); in mthca_query_pkey()
255 *pkey = be16_to_cpu(((__be16 *) out_mad->data)[index % 32]); in mthca_query_pkey()
259 kfree(out_mad); in mthca_query_pkey()
267 struct ib_smp *out_mad = NULL; in mthca_query_gid() local
271 out_mad = kmalloc(sizeof *out_mad, GFP_KERNEL); in mthca_query_gid()
272 if (!in_mad || !out_mad) in mthca_query_gid()
280 port, NULL, NULL, in_mad, out_mad); in mthca_query_gid()
284 memcpy(gid->raw, out_mad->data + 8, 8); in mthca_query_gid()
291 port, NULL, NULL, in_mad, out_mad); in mthca_query_gid()
295 memcpy(gid->raw + 8, out_mad->data + (index % 8) * 8, 8); in mthca_query_gid()
299 kfree(out_mad); in mthca_query_gid()
1128 struct ib_smp *out_mad = NULL; in mthca_init_node_data() local
1132 out_mad = kmalloc(sizeof *out_mad, GFP_KERNEL); in mthca_init_node_data()
1133 if (!in_mad || !out_mad) in mthca_init_node_data()
1140 1, NULL, NULL, in_mad, out_mad); in mthca_init_node_data()
1144 memcpy(dev->ib_dev.node_desc, out_mad->data, IB_DEVICE_NODE_DESC_MAX); in mthca_init_node_data()
1149 1, NULL, NULL, in_mad, out_mad); in mthca_init_node_data()
1154 dev->rev_id = be32_to_cpup((__be32 *) (out_mad->data + 32)); in mthca_init_node_data()
1155 memcpy(&dev->ib_dev.node_guid, out_mad->data + 12, 8); in mthca_init_node_data()
1159 kfree(out_mad); in mthca_init_node_data()