build_smp_wc(local->wr_id, IB_LID_PERMISSIVE, 
build_smp_wc(local->wr_id, be16_to_cpu(IB_LID_PERMISSIVE), 
static void local_completions(void *data){	struct ib_mad_agent_private *mad_agent_priv;	struct ib_mad_local_private *local;	struct ib_mad_agent_private *recv_mad_agent;	unsigned long flags;	int recv = 0;	struct ib_wc wc;	struct ib_mad_send_wc mad_send_wc;	mad_agent_priv = (struct ib_mad_agent_private *)data;	spin_lock_irqsave(&mad_agent_priv->lock, flags);	while (!list_empty(&mad_agent_priv->local_list)) {		local = list_entry(mad_agent_priv->local_list.next,				   struct ib_mad_local_private,				   completion_list);		spin_unlock_irqrestore(&mad_agent_priv->lock, flags);		if (local->mad_priv) {			recv_mad_agent = local->recv_mad_agent;			if (!recv_mad_agent) {				printk(KERN_ERR PFX "No receive MAD agent for local completion\n");				goto local_send_completion;			}			recv = 1;			/*			 * Defined behavior is to complete response			 * before request			 */			build_smp_wc(local->wr_id, IB_LID_PERMISSIVE,				     0 /* pkey index */,				     recv_mad_agent->agent.port_num, &wc);			local->mad_priv->header.recv_wc.wc = &wc;			local->mad_priv->header.recv_wc.mad_len =						sizeof(struct ib_mad);			INIT_LIST_HEAD(&local->mad_priv->header.recv_wc.rmpp_list);			list_add(&local->mad_priv->header.recv_wc.recv_buf.list,				 &local->mad_priv->header.recv_wc.rmpp_list);			local->mad_priv->header.recv_wc.recv_buf.grh = NULL;			local->mad_priv->header.recv_wc.recv_buf.mad =						&local->mad_priv->mad.mad;			if (atomic_read(&recv_mad_agent->qp_info->snoop_count))				snoop_recv(recv_mad_agent->qp_info,					  &local->mad_priv->header.recv_wc,					   IB_MAD_SNOOP_RECVS);			recv_mad_agent->agent.recv_handler(						&recv_mad_agent->agent,						&local->mad_priv->header.recv_wc);			spin_lock_irqsave(&recv_mad_agent->lock, flags);			atomic_dec(&recv_mad_agent->refcount);			spin_unlock_irqrestore(&recv_mad_agent->lock, flags);		}local_send_completion:		/* Complete send */		mad_send_wc.status = IB_WC_SUCCESS;		mad_send_wc.vendor_err = 0;		mad_send_wc.wr_id = local->wr_id;		if (atomic_read(&mad_agent_priv->qp_info->snoop_count))			snoop_send(mad_agent_priv->qp_info, &local->send_wr,				  &mad_send_wc,				   IB_MAD_SNOOP_SEND_COMPLETIONS);		mad_agent_priv->agent.send_handler(&mad_agent_priv->agent,						   &mad_send_wc);		spin_lock_irqsave(&mad_agent_priv->lock, flags);		list_del(&local->completion_list);		atomic_dec(&mad_agent_priv->refcount);		if (!recv)			kmem_cache_free(ib_mad_cache, local->mad_priv);		kfree(local);	}	spin_unlock_irqrestore(&mad_agent_priv->lock, flags);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/97f52eb438be7caebe026421545619d8a0c1398a/mad.c/clean/drivers/infiniband/core/mad.c