diff options
Diffstat (limited to 'drivers/infiniband/hw/mlx4/mad.c')
-rw-r--r-- | drivers/infiniband/hw/mlx4/mad.c | 54 |
1 files changed, 28 insertions, 26 deletions
diff --git a/drivers/infiniband/hw/mlx4/mad.c b/drivers/infiniband/hw/mlx4/mad.c index 67c7120f0d52..870e56b6b25f 100644 --- a/drivers/infiniband/hw/mlx4/mad.c +++ b/drivers/infiniband/hw/mlx4/mad.c | |||
@@ -457,7 +457,8 @@ int mlx4_ib_send_to_slave(struct mlx4_ib_dev *dev, int slave, u8 port, | |||
457 | struct ib_grh *grh, struct ib_mad *mad) | 457 | struct ib_grh *grh, struct ib_mad *mad) |
458 | { | 458 | { |
459 | struct ib_sge list; | 459 | struct ib_sge list; |
460 | struct ib_send_wr wr, *bad_wr; | 460 | struct ib_ud_wr wr; |
461 | struct ib_send_wr *bad_wr; | ||
461 | struct mlx4_ib_demux_pv_ctx *tun_ctx; | 462 | struct mlx4_ib_demux_pv_ctx *tun_ctx; |
462 | struct mlx4_ib_demux_pv_qp *tun_qp; | 463 | struct mlx4_ib_demux_pv_qp *tun_qp; |
463 | struct mlx4_rcv_tunnel_mad *tun_mad; | 464 | struct mlx4_rcv_tunnel_mad *tun_mad; |
@@ -582,18 +583,18 @@ int mlx4_ib_send_to_slave(struct mlx4_ib_dev *dev, int slave, u8 port, | |||
582 | list.length = sizeof (struct mlx4_rcv_tunnel_mad); | 583 | list.length = sizeof (struct mlx4_rcv_tunnel_mad); |
583 | list.lkey = tun_ctx->pd->local_dma_lkey; | 584 | list.lkey = tun_ctx->pd->local_dma_lkey; |
584 | 585 | ||
585 | wr.wr.ud.ah = ah; | 586 | wr.ah = ah; |
586 | wr.wr.ud.port_num = port; | 587 | wr.port_num = port; |
587 | wr.wr.ud.remote_qkey = IB_QP_SET_QKEY; | 588 | wr.remote_qkey = IB_QP_SET_QKEY; |
588 | wr.wr.ud.remote_qpn = dqpn; | 589 | wr.remote_qpn = dqpn; |
589 | wr.next = NULL; | 590 | wr.wr.next = NULL; |
590 | wr.wr_id = ((u64) tun_tx_ix) | MLX4_TUN_SET_WRID_QPN(dest_qpt); | 591 | wr.wr.wr_id = ((u64) tun_tx_ix) | MLX4_TUN_SET_WRID_QPN(dest_qpt); |
591 | wr.sg_list = &list; | 592 | wr.wr.sg_list = &list; |
592 | wr.num_sge = 1; | 593 | wr.wr.num_sge = 1; |
593 | wr.opcode = IB_WR_SEND; | 594 | wr.wr.opcode = IB_WR_SEND; |
594 | wr.send_flags = IB_SEND_SIGNALED; | 595 | wr.wr.send_flags = IB_SEND_SIGNALED; |
595 | 596 | ||
596 | ret = ib_post_send(src_qp, &wr, &bad_wr); | 597 | ret = ib_post_send(src_qp, &wr.wr, &bad_wr); |
597 | out: | 598 | out: |
598 | if (ret) | 599 | if (ret) |
599 | ib_destroy_ah(ah); | 600 | ib_destroy_ah(ah); |
@@ -1186,7 +1187,8 @@ int mlx4_ib_send_to_wire(struct mlx4_ib_dev *dev, int slave, u8 port, | |||
1186 | u8 *s_mac, u16 vlan_id, struct ib_mad *mad) | 1187 | u8 *s_mac, u16 vlan_id, struct ib_mad *mad) |
1187 | { | 1188 | { |
1188 | struct ib_sge list; | 1189 | struct ib_sge list; |
1189 | struct ib_send_wr wr, *bad_wr; | 1190 | struct ib_ud_wr wr; |
1191 | struct ib_send_wr *bad_wr; | ||
1190 | struct mlx4_ib_demux_pv_ctx *sqp_ctx; | 1192 | struct mlx4_ib_demux_pv_ctx *sqp_ctx; |
1191 | struct mlx4_ib_demux_pv_qp *sqp; | 1193 | struct mlx4_ib_demux_pv_qp *sqp; |
1192 | struct mlx4_mad_snd_buf *sqp_mad; | 1194 | struct mlx4_mad_snd_buf *sqp_mad; |
@@ -1257,17 +1259,17 @@ int mlx4_ib_send_to_wire(struct mlx4_ib_dev *dev, int slave, u8 port, | |||
1257 | list.length = sizeof (struct mlx4_mad_snd_buf); | 1259 | list.length = sizeof (struct mlx4_mad_snd_buf); |
1258 | list.lkey = sqp_ctx->pd->local_dma_lkey; | 1260 | list.lkey = sqp_ctx->pd->local_dma_lkey; |
1259 | 1261 | ||
1260 | wr.wr.ud.ah = ah; | 1262 | wr.ah = ah; |
1261 | wr.wr.ud.port_num = port; | 1263 | wr.port_num = port; |
1262 | wr.wr.ud.pkey_index = wire_pkey_ix; | 1264 | wr.pkey_index = wire_pkey_ix; |
1263 | wr.wr.ud.remote_qkey = qkey; | 1265 | wr.remote_qkey = qkey; |
1264 | wr.wr.ud.remote_qpn = remote_qpn; | 1266 | wr.remote_qpn = remote_qpn; |
1265 | wr.next = NULL; | 1267 | wr.wr.next = NULL; |
1266 | wr.wr_id = ((u64) wire_tx_ix) | MLX4_TUN_SET_WRID_QPN(src_qpnum); | 1268 | wr.wr.wr_id = ((u64) wire_tx_ix) | MLX4_TUN_SET_WRID_QPN(src_qpnum); |
1267 | wr.sg_list = &list; | 1269 | wr.wr.sg_list = &list; |
1268 | wr.num_sge = 1; | 1270 | wr.wr.num_sge = 1; |
1269 | wr.opcode = IB_WR_SEND; | 1271 | wr.wr.opcode = IB_WR_SEND; |
1270 | wr.send_flags = IB_SEND_SIGNALED; | 1272 | wr.wr.send_flags = IB_SEND_SIGNALED; |
1271 | if (s_mac) | 1273 | if (s_mac) |
1272 | memcpy(to_mah(ah)->av.eth.s_mac, s_mac, 6); | 1274 | memcpy(to_mah(ah)->av.eth.s_mac, s_mac, 6); |
1273 | if (vlan_id < 0x1000) | 1275 | if (vlan_id < 0x1000) |
@@ -1275,7 +1277,7 @@ int mlx4_ib_send_to_wire(struct mlx4_ib_dev *dev, int slave, u8 port, | |||
1275 | to_mah(ah)->av.eth.vlan = cpu_to_be16(vlan_id); | 1277 | to_mah(ah)->av.eth.vlan = cpu_to_be16(vlan_id); |
1276 | 1278 | ||
1277 | 1279 | ||
1278 | ret = ib_post_send(send_qp, &wr, &bad_wr); | 1280 | ret = ib_post_send(send_qp, &wr.wr, &bad_wr); |
1279 | out: | 1281 | out: |
1280 | if (ret) | 1282 | if (ret) |
1281 | ib_destroy_ah(ah); | 1283 | ib_destroy_ah(ah); |