Lines Matching refs:out_mad
57 struct ib_smp *out_mad; in mthca_query_device() local
65 out_mad = kmalloc(sizeof *out_mad, GFP_KERNEL); in mthca_query_device()
66 if (!in_mad || !out_mad) in mthca_query_device()
77 1, NULL, NULL, in_mad, out_mad); in mthca_query_device()
82 props->vendor_id = be32_to_cpup((__be32 *) (out_mad->data + 36)) & in mthca_query_device()
84 props->vendor_part_id = be16_to_cpup((__be16 *) (out_mad->data + 30)); in mthca_query_device()
85 props->hw_ver = be32_to_cpup((__be32 *) (out_mad->data + 32)); in mthca_query_device()
86 memcpy(&props->sys_image_guid, out_mad->data + 4, 8); in mthca_query_device()
117 kfree(out_mad); in mthca_query_device()
125 struct ib_smp *out_mad; in mthca_query_port() local
129 out_mad = kmalloc(sizeof *out_mad, GFP_KERNEL); in mthca_query_port()
130 if (!in_mad || !out_mad) in mthca_query_port()
140 port, NULL, NULL, in_mad, out_mad); in mthca_query_port()
144 props->lid = be16_to_cpup((__be16 *) (out_mad->data + 16)); in mthca_query_port()
145 props->lmc = out_mad->data[34] & 0x7; in mthca_query_port()
146 props->sm_lid = be16_to_cpup((__be16 *) (out_mad->data + 18)); in mthca_query_port()
147 props->sm_sl = out_mad->data[36] & 0xf; in mthca_query_port()
148 props->state = out_mad->data[32] & 0xf; in mthca_query_port()
149 props->phys_state = out_mad->data[33] >> 4; in mthca_query_port()
150 props->port_cap_flags = be32_to_cpup((__be32 *) (out_mad->data + 20)); in mthca_query_port()
154 props->bad_pkey_cntr = be16_to_cpup((__be16 *) (out_mad->data + 46)); in mthca_query_port()
155 props->qkey_viol_cntr = be16_to_cpup((__be16 *) (out_mad->data + 48)); in mthca_query_port()
156 props->active_width = out_mad->data[31] & 0xf; in mthca_query_port()
157 props->active_speed = out_mad->data[35] >> 4; in mthca_query_port()
158 props->max_mtu = out_mad->data[41] & 0xf; in mthca_query_port()
159 props->active_mtu = out_mad->data[36] >> 4; in mthca_query_port()
160 props->subnet_timeout = out_mad->data[51] & 0x1f; in mthca_query_port()
161 props->max_vl_num = out_mad->data[37] >> 4; in mthca_query_port()
162 props->init_type_reply = out_mad->data[41] >> 4; in mthca_query_port()
166 kfree(out_mad); in mthca_query_port()
221 struct ib_smp *out_mad; in mthca_query_pkey() local
225 out_mad = kmalloc(sizeof *out_mad, GFP_KERNEL); in mthca_query_pkey()
226 if (!in_mad || !out_mad) in mthca_query_pkey()
234 port, NULL, NULL, in_mad, out_mad); in mthca_query_pkey()
238 *pkey = be16_to_cpu(((__be16 *) out_mad->data)[index % 32]); in mthca_query_pkey()
242 kfree(out_mad); in mthca_query_pkey()
250 struct ib_smp *out_mad; in mthca_query_gid() local
254 out_mad = kmalloc(sizeof *out_mad, GFP_KERNEL); in mthca_query_gid()
255 if (!in_mad || !out_mad) in mthca_query_gid()
263 port, NULL, NULL, in_mad, out_mad); in mthca_query_gid()
267 memcpy(gid->raw, out_mad->data + 8, 8); in mthca_query_gid()
274 port, NULL, NULL, in_mad, out_mad); in mthca_query_gid()
278 memcpy(gid->raw + 8, out_mad->data + (index % 8) * 8, 8); in mthca_query_gid()
282 kfree(out_mad); in mthca_query_gid()
994 struct ib_smp *out_mad; in mthca_init_node_data() local
998 out_mad = kmalloc(sizeof *out_mad, GFP_KERNEL); in mthca_init_node_data()
999 if (!in_mad || !out_mad) in mthca_init_node_data()
1006 1, NULL, NULL, in_mad, out_mad); in mthca_init_node_data()
1010 memcpy(dev->ib_dev.node_desc, out_mad->data, IB_DEVICE_NODE_DESC_MAX); in mthca_init_node_data()
1015 1, NULL, NULL, in_mad, out_mad); in mthca_init_node_data()
1020 dev->rev_id = be32_to_cpup((__be32 *) (out_mad->data + 32)); in mthca_init_node_data()
1021 memcpy(&dev->ib_dev.node_guid, out_mad->data + 12, 8); in mthca_init_node_data()
1025 kfree(out_mad); in mthca_init_node_data()