[openib-general] [PATCH]return the wrong bad_send_wr in ib_post_send_mad()

Shirley Ma mashirle at us.ibm.com
Mon Nov 1 15:37:02 PST 2004


Here is the patch for return the correct bad_send_wr value after calling 
ib_send_mad() in ib_post_send_mad().

diff -urN access/mad.c access.patch3/mad.c
--- access/mad.c	2004-11-01 14:51:41.000000000 -0800
+++ access.patch3/mad.c	2004-11-01 15:31:05.013571784 -0800
@@ -389,7 +389,6 @@
 	cur_send_wr = send_wr;
 	while (cur_send_wr) {
 		unsigned long			flags;
-		struct ib_send_wr		*bad_wr;
 		struct ib_mad_send_wr_private	*mad_send_wr;
 
 		next_send_wr = (struct ib_send_wr *)cur_send_wr->next;
@@ -423,7 +422,7 @@
 
 		cur_send_wr->next = NULL;
 		ret = ib_send_mad(mad_agent_priv, mad_send_wr,
-				  cur_send_wr, &bad_wr);
+				  cur_send_wr, bad_send_wr);
 		if (ret) {
 			/* Handle QP overrun separately... -ENOMEM */
 
@@ -432,7 +431,6 @@
 			list_del(&mad_send_wr->agent_list);
 			spin_unlock_irqrestore(&mad_agent_priv->lock, flags);
 
-			*bad_send_wr = cur_send_wr;
 			atomic_dec(&mad_agent_priv->refcount);
 			return ret;		
 		}

-- 
Thanks
Shirley Ma
IBM Linux Technology Center



More information about the general mailing list