From cd187a4dbb4cf5f663e824827ac04c77588d9360 Mon Sep 17 00:00:00 2001 From: Ralph Campbell Date: Fri, 27 Feb 2009 14:44:32 -0800 Subject: [PATCH] --- yaml --- r: 133631 b: refs/heads/master c: d9620a4c82c61a91c9313f80ba951c902573c028 h: refs/heads/master i: 133629: 9670c2837cdfc5d07122265677101b8303b95377 133627: dbdb306cf9ef5e50203911bc2923ce8eb01ab94e 133623: 6ad4236b2f0c4d12574a21cd114f04dc5f4851a0 133615: efdac6e8f898167fa27d459e421b53b1ed59ea4b 133599: a0baca8d7854afb770ed718516f06ec18113c74a 133567: 1c81766cf73ae5e6c88972476af463538867b705 133503: fcfbd483008cf548bae1c3ef368c1005c850333f 133375: 0c995b71ec8863282d6f356131dcb97a66432613 133119: d1f7ac09831de80c227bbffc92a978177408273d v: v3 --- [refs] | 2 +- trunk/drivers/infiniband/core/mad.c | 21 ++++++++++----------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/[refs] b/[refs] index 60ce2c0490bd..39d76b934074 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1d9bc6d648ece77ffb41c5a577eab81fac5ad4de +refs/heads/master: d9620a4c82c61a91c9313f80ba951c902573c028 diff --git a/trunk/drivers/infiniband/core/mad.c b/trunk/drivers/infiniband/core/mad.c index 735ad4ea10f0..dbcd285405ec 100644 --- a/trunk/drivers/infiniband/core/mad.c +++ b/trunk/drivers/infiniband/core/mad.c @@ -301,6 +301,16 @@ struct ib_mad_agent *ib_register_mad_agent(struct ib_device *device, mad_agent_priv->agent.context = context; mad_agent_priv->agent.qp = port_priv->qp_info[qpn].qp; mad_agent_priv->agent.port_num = port_num; + spin_lock_init(&mad_agent_priv->lock); + INIT_LIST_HEAD(&mad_agent_priv->send_list); + INIT_LIST_HEAD(&mad_agent_priv->wait_list); + INIT_LIST_HEAD(&mad_agent_priv->done_list); + INIT_LIST_HEAD(&mad_agent_priv->rmpp_list); + INIT_DELAYED_WORK(&mad_agent_priv->timed_work, timeout_sends); + INIT_LIST_HEAD(&mad_agent_priv->local_list); + INIT_WORK(&mad_agent_priv->local_work, local_completions); + atomic_set(&mad_agent_priv->refcount, 1); + init_completion(&mad_agent_priv->comp); spin_lock_irqsave(&port_priv->reg_lock, flags); mad_agent_priv->agent.hi_tid = ++ib_mad_client_id; @@ -350,17 +360,6 @@ struct ib_mad_agent *ib_register_mad_agent(struct ib_device *device, list_add_tail(&mad_agent_priv->agent_list, &port_priv->agent_list); spin_unlock_irqrestore(&port_priv->reg_lock, flags); - spin_lock_init(&mad_agent_priv->lock); - INIT_LIST_HEAD(&mad_agent_priv->send_list); - INIT_LIST_HEAD(&mad_agent_priv->wait_list); - INIT_LIST_HEAD(&mad_agent_priv->done_list); - INIT_LIST_HEAD(&mad_agent_priv->rmpp_list); - INIT_DELAYED_WORK(&mad_agent_priv->timed_work, timeout_sends); - INIT_LIST_HEAD(&mad_agent_priv->local_list); - INIT_WORK(&mad_agent_priv->local_work, local_completions); - atomic_set(&mad_agent_priv->refcount, 1); - init_completion(&mad_agent_priv->comp); - return &mad_agent_priv->agent; error4: