Skip to content

Commit

Permalink
[PATCH] IB: Change saving of user's send wr_id in MAD
Browse files Browse the repository at this point in the history
Move saving of user's send wr_id to better match layering of received response
handling.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Hal Rosenstock <halr@voltaire.com>
Cc: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Hal Rosenstock authored and Linus Torvalds committed Jul 27, 2005
1 parent 4a0754f commit f8197a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/infiniband/core/mad.c
Original file line number Diff line number Diff line change
Expand Up @@ -847,9 +847,8 @@ static int ib_send_mad(struct ib_mad_agent_private *mad_agent_priv,
unsigned long flags;
int ret;

/* Replace user's WR ID with our own to find WR upon completion */
/* Set WR ID to find mad_send_wr upon completion */
qp_info = mad_agent_priv->qp_info;
mad_send_wr->wr_id = mad_send_wr->send_wr.wr_id;
mad_send_wr->send_wr.wr_id = (unsigned long)&mad_send_wr->mad_list;
mad_send_wr->mad_list.mad_queue = &qp_info->send_queue;

Expand Down Expand Up @@ -948,6 +947,7 @@ int ib_post_send_mad(struct ib_mad_agent *mad_agent,
mad_send_wr->send_wr.sg_list = mad_send_wr->sg_list;
memcpy(mad_send_wr->sg_list, send_wr->sg_list,
sizeof *send_wr->sg_list * send_wr->num_sge);
mad_send_wr->wr_id = mad_send_wr->send_wr.wr_id;
mad_send_wr->send_wr.next = NULL;
mad_send_wr->tid = send_wr->wr.ud.mad_hdr->tid;
mad_send_wr->agent = mad_agent;
Expand Down

0 comments on commit f8197a4

Please sign in to comment.