[openib-general] [PATCH] Remove unneeded call in MAD code

Sean Hefty mshefty at ichips.intel.com
Fri Nov 12 12:39:12 PST 2004


This patch removes ib_mad_return_posted_send_mads, which isn't needed when
shutting down.  There cannot be any sends outstanding at this point, or
clients still exist.

- Sean

Index: core/mad.c
===================================================================
--- core/mad.c	(revision 1222)
+++ core/mad.c	(working copy)
@@ -1692,21 +1692,6 @@
 }
 
 /*
- * Return all the posted send MADs
- */
-static void ib_mad_return_posted_send_mads(struct ib_mad_qp_info *qp_info)
-{
-	unsigned long flags;
-
-	/* Just clear port send posted MAD list... revisit!!! */
-	spin_lock_irqsave(&qp_info->send_queue.lock, flags);
-	INIT_LIST_HEAD(&qp_info->send_queue.list);
-	qp_info->send_queue.count = 0;
-	INIT_LIST_HEAD(&qp_info->overflow_list);
-	spin_unlock_irqrestore(&qp_info->send_queue.lock, flags);
-}
-
-/*
  * Modify QP into Init state
  */
 static inline int ib_mad_change_qp_state_to_init(struct ib_qp *qp)
@@ -1909,7 +1894,6 @@
 			       i);
 		}
 		ib_mad_return_posted_recv_mads(&port_priv->qp_info[i]);
-		ib_mad_return_posted_send_mads(&port_priv->qp_info[i]);
 	}
 }
 



More information about the general mailing list