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()
133 kfree(out_mad); in mthca_query_device()
141 struct ib_smp *out_mad = NULL; in mthca_query_port() local
145 out_mad = kmalloc(sizeof *out_mad, GFP_KERNEL); in mthca_query_port()
146 if (!in_mad || !out_mad) in mthca_query_port()
156 port, NULL, NULL, in_mad, out_mad); in mthca_query_port()
160 props->lid = be16_to_cpup((__be16 *) (out_mad->data + 16)); in mthca_query_port()
161 props->lmc = out_mad->data[34] & 0x7; in mthca_query_port()
162 props->sm_lid = be16_to_cpup((__be16 *) (out_mad->data + 18)); in mthca_query_port()
163 props->sm_sl = out_mad->data[36] & 0xf; in mthca_query_port()
164 props->state = out_mad->data[32] & 0xf; in mthca_query_port()
165 props->phys_state = out_mad->data[33] >> 4; in mthca_query_port()
166 props->port_cap_flags = be32_to_cpup((__be32 *) (out_mad->data + 20)); in mthca_query_port()
170 props->bad_pkey_cntr = be16_to_cpup((__be16 *) (out_mad->data + 46)); in mthca_query_port()
171 props->qkey_viol_cntr = be16_to_cpup((__be16 *) (out_mad->data + 48)); in mthca_query_port()
172 props->active_width = out_mad->data[31] & 0xf; in mthca_query_port()
173 props->active_speed = out_mad->data[35] >> 4; in mthca_query_port()
174 props->max_mtu = out_mad->data[41] & 0xf; in mthca_query_port()
175 props->active_mtu = out_mad->data[36] >> 4; in mthca_query_port()
176 props->subnet_timeout = out_mad->data[51] & 0x1f; in mthca_query_port()
177 props->max_vl_num = out_mad->data[37] >> 4; in mthca_query_port()
178 props->init_type_reply = out_mad->data[41] >> 4; in mthca_query_port()
182 kfree(out_mad); in mthca_query_port()
237 struct ib_smp *out_mad = NULL; in mthca_query_pkey() local
241 out_mad = kmalloc(sizeof *out_mad, GFP_KERNEL); in mthca_query_pkey()
242 if (!in_mad || !out_mad) in mthca_query_pkey()
250 port, NULL, NULL, in_mad, out_mad); in mthca_query_pkey()
254 *pkey = be16_to_cpu(((__be16 *) out_mad->data)[index % 32]); in mthca_query_pkey()
258 kfree(out_mad); in mthca_query_pkey()
266 struct ib_smp *out_mad = NULL; in mthca_query_gid() local
270 out_mad = kmalloc(sizeof *out_mad, GFP_KERNEL); in mthca_query_gid()
271 if (!in_mad || !out_mad) in mthca_query_gid()
279 port, NULL, NULL, in_mad, out_mad); in mthca_query_gid()
283 memcpy(gid->raw, out_mad->data + 8, 8); in mthca_query_gid()
290 port, NULL, NULL, in_mad, out_mad); in mthca_query_gid()
294 memcpy(gid->raw + 8, out_mad->data + (index % 8) * 8, 8); in mthca_query_gid()
298 kfree(out_mad); in mthca_query_gid()
1126 struct ib_smp *out_mad = NULL; in mthca_init_node_data() local
1130 out_mad = kmalloc(sizeof *out_mad, GFP_KERNEL); in mthca_init_node_data()
1131 if (!in_mad || !out_mad) in mthca_init_node_data()
1138 1, NULL, NULL, in_mad, out_mad); in mthca_init_node_data()
1142 memcpy(dev->ib_dev.node_desc, out_mad->data, IB_DEVICE_NODE_DESC_MAX); in mthca_init_node_data()
1147 1, NULL, NULL, in_mad, out_mad); in mthca_init_node_data()
1152 dev->rev_id = be32_to_cpup((__be32 *) (out_mad->data + 32)); in mthca_init_node_data()
1153 memcpy(&dev->ib_dev.node_guid, out_mad->data + 12, 8); in mthca_init_node_data()
1157 kfree(out_mad); in mthca_init_node_data()