diff options
author | Hal Rosenstock <halr@voltaire.com> | 2005-07-27 14:45:24 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-27 19:26:10 -0400 |
commit | f8197a4ed1bba8c80ed6ddf4535ded80cb4152cf (patch) | |
tree | 0f3bcc7445938c3ff0f5f9e241faa08dafe90ea9 /drivers/infiniband/core | |
parent | 4a0754fae8fb5162d1cf4f738d48bb1e8190c09f (diff) |
[PATCH] IB: Change saving of user's send wr_id in MAD
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>
Diffstat (limited to 'drivers/infiniband/core')
-rw-r--r-- | drivers/infiniband/core/mad.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c index ebe8c3a45410..5535a45a8548 100644 --- a/drivers/infiniband/core/mad.c +++ b/drivers/infiniband/core/mad.c | |||
@@ -847,9 +847,8 @@ static int ib_send_mad(struct ib_mad_agent_private *mad_agent_priv, | |||
847 | unsigned long flags; | 847 | unsigned long flags; |
848 | int ret; | 848 | int ret; |
849 | 849 | ||
850 | /* Replace user's WR ID with our own to find WR upon completion */ | 850 | /* Set WR ID to find mad_send_wr upon completion */ |
851 | qp_info = mad_agent_priv->qp_info; | 851 | qp_info = mad_agent_priv->qp_info; |
852 | mad_send_wr->wr_id = mad_send_wr->send_wr.wr_id; | ||
853 | mad_send_wr->send_wr.wr_id = (unsigned long)&mad_send_wr->mad_list; | 852 | mad_send_wr->send_wr.wr_id = (unsigned long)&mad_send_wr->mad_list; |
854 | mad_send_wr->mad_list.mad_queue = &qp_info->send_queue; | 853 | mad_send_wr->mad_list.mad_queue = &qp_info->send_queue; |
855 | 854 | ||
@@ -948,6 +947,7 @@ int ib_post_send_mad(struct ib_mad_agent *mad_agent, | |||
948 | mad_send_wr->send_wr.sg_list = mad_send_wr->sg_list; | 947 | mad_send_wr->send_wr.sg_list = mad_send_wr->sg_list; |
949 | memcpy(mad_send_wr->sg_list, send_wr->sg_list, | 948 | memcpy(mad_send_wr->sg_list, send_wr->sg_list, |
950 | sizeof *send_wr->sg_list * send_wr->num_sge); | 949 | sizeof *send_wr->sg_list * send_wr->num_sge); |
950 | mad_send_wr->wr_id = mad_send_wr->send_wr.wr_id; | ||
951 | mad_send_wr->send_wr.next = NULL; | 951 | mad_send_wr->send_wr.next = NULL; |
952 | mad_send_wr->tid = send_wr->wr.ud.mad_hdr->tid; | 952 | mad_send_wr->tid = send_wr->wr.ud.mad_hdr->tid; |
953 | mad_send_wr->agent = mad_agent; | 953 | mad_send_wr->agent = mad_agent; |