diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/core/mad_rmpp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/infiniband/core/mad_rmpp.c b/drivers/infiniband/core/mad_rmpp.c index 43fd805e0265..2bd8b1cc57c4 100644 --- a/drivers/infiniband/core/mad_rmpp.c +++ b/drivers/infiniband/core/mad_rmpp.c | |||
@@ -593,7 +593,8 @@ static int send_next_seg(struct ib_mad_send_wr_private *mad_send_wr) | |||
593 | rmpp_mad->rmpp_hdr.paylen_newwin = | 593 | rmpp_mad->rmpp_hdr.paylen_newwin = |
594 | cpu_to_be32(mad_send_wr->total_seg * | 594 | cpu_to_be32(mad_send_wr->total_seg * |
595 | (sizeof(struct ib_rmpp_mad) - | 595 | (sizeof(struct ib_rmpp_mad) - |
596 | offsetof(struct ib_rmpp_mad, data))); | 596 | offsetof(struct ib_rmpp_mad, data)) - |
597 | mad_send_wr->pad); | ||
597 | mad_send_wr->sg_list[0].length = sizeof(struct ib_rmpp_mad); | 598 | mad_send_wr->sg_list[0].length = sizeof(struct ib_rmpp_mad); |
598 | } else { | 599 | } else { |
599 | mad_send_wr->send_wr.num_sge = 2; | 600 | mad_send_wr->send_wr.num_sge = 2; |
@@ -602,6 +603,7 @@ static int send_next_seg(struct ib_mad_send_wr_private *mad_send_wr) | |||
602 | mad_send_wr->sg_list[1].length = sizeof(struct ib_rmpp_mad) - | 603 | mad_send_wr->sg_list[1].length = sizeof(struct ib_rmpp_mad) - |
603 | mad_send_wr->data_offset; | 604 | mad_send_wr->data_offset; |
604 | mad_send_wr->sg_list[1].lkey = mad_send_wr->sg_list[0].lkey; | 605 | mad_send_wr->sg_list[1].lkey = mad_send_wr->sg_list[0].lkey; |
606 | rmpp_mad->rmpp_hdr.paylen_newwin = 0; | ||
605 | } | 607 | } |
606 | 608 | ||
607 | if (mad_send_wr->seg_num == mad_send_wr->total_seg) { | 609 | if (mad_send_wr->seg_num == mad_send_wr->total_seg) { |