Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 32611
b: refs/heads/master
c: 04c3354
h: refs/heads/master
i:
  32609: 84bcd5c
  32607: 67dfe82
v: v3
  • Loading branch information
Michael S. Tsirkin authored and Linus Torvalds committed Jul 15, 2006
1 parent d35bc3a commit c145a1f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0964d9161826ca5cab5a03192490ec676c8abf8c
refs/heads/master: 04c335430f6d9f9088c852bc05a3a0c8baa921c4
21 changes: 18 additions & 3 deletions trunk/drivers/infiniband/core/cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ static void cm_reset_to_idle(struct cm_id_private *cm_id_priv)
}
}

void ib_destroy_cm_id(struct ib_cm_id *cm_id)
static void cm_destroy_id(struct ib_cm_id *cm_id, int err)
{
struct cm_id_private *cm_id_priv;
struct cm_work *work;
Expand Down Expand Up @@ -735,12 +735,22 @@ void ib_destroy_cm_id(struct ib_cm_id *cm_id)
sizeof cm_id_priv->av.port->cm_dev->ca_guid,
NULL, 0);
break;
case IB_CM_REQ_RCVD:
if (err == -ENOMEM) {
/* Do not reject to allow future retries. */
cm_reset_to_idle(cm_id_priv);
spin_unlock_irqrestore(&cm_id_priv->lock, flags);
} else {
spin_unlock_irqrestore(&cm_id_priv->lock, flags);
ib_send_cm_rej(cm_id, IB_CM_REJ_CONSUMER_DEFINED,
NULL, 0, NULL, 0);
}
break;
case IB_CM_MRA_REQ_RCVD:
case IB_CM_REP_SENT:
case IB_CM_MRA_REP_RCVD:
ib_cancel_mad(cm_id_priv->av.port->mad_agent, cm_id_priv->msg);
/* Fall through */
case IB_CM_REQ_RCVD:
case IB_CM_MRA_REQ_SENT:
case IB_CM_REP_RCVD:
case IB_CM_MRA_REP_SENT:
Expand Down Expand Up @@ -775,6 +785,11 @@ void ib_destroy_cm_id(struct ib_cm_id *cm_id)
kfree(cm_id_priv->private_data);
kfree(cm_id_priv);
}

void ib_destroy_cm_id(struct ib_cm_id *cm_id)
{
cm_destroy_id(cm_id, 0);
}
EXPORT_SYMBOL(ib_destroy_cm_id);

int ib_cm_listen(struct ib_cm_id *cm_id, __be64 service_id, __be64 service_mask,
Expand Down Expand Up @@ -1163,7 +1178,7 @@ static void cm_process_work(struct cm_id_private *cm_id_priv,
}
cm_deref_id(cm_id_priv);
if (ret)
ib_destroy_cm_id(&cm_id_priv->id);
cm_destroy_id(&cm_id_priv->id, ret);
}

static void cm_format_mra(struct cm_mra_msg *mra_msg,
Expand Down

0 comments on commit c145a1f

Please sign in to comment.