Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 54384
b: refs/heads/master
c: 347fcfb
h: refs/heads/master
v: v3
  • Loading branch information
Michael S. Tsirkin authored and Roland Dreier committed May 1, 2007
1 parent 1267126 commit 26d8107
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 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: 6b66b2da1e821181a001c00b04a807724ad803cd
refs/heads/master: 347fcfbed261fdd11f46fa03d524e1bddddab3a6
8 changes: 6 additions & 2 deletions trunk/drivers/infiniband/ulp/ipoib/ipoib_cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,9 @@ int ipoib_cm_dev_open(struct net_device *dev)
priv->cm.id = ib_create_cm_id(priv->ca, ipoib_cm_rx_handler, dev);
if (IS_ERR(priv->cm.id)) {
printk(KERN_WARNING "%s: failed to create CM ID\n", priv->ca->name);
return IS_ERR(priv->cm.id);
ret = PTR_ERR(priv->cm.id);
priv->cm.id = NULL;
return ret;
}

ret = ib_cm_listen(priv->cm.id, cpu_to_be64(IPOIB_CM_IETF_ID | priv->qp->qp_num),
Expand All @@ -601,6 +603,7 @@ int ipoib_cm_dev_open(struct net_device *dev)
printk(KERN_WARNING "%s: failed to listen on ID 0x%llx\n", priv->ca->name,
IPOIB_CM_IETF_ID | priv->qp->qp_num);
ib_destroy_cm_id(priv->cm.id);
priv->cm.id = NULL;
return ret;
}
return 0;
Expand All @@ -611,10 +614,11 @@ void ipoib_cm_dev_stop(struct net_device *dev)
struct ipoib_dev_priv *priv = netdev_priv(dev);
struct ipoib_cm_rx *p;

if (!IPOIB_CM_SUPPORTED(dev->dev_addr))
if (!IPOIB_CM_SUPPORTED(dev->dev_addr) || !priv->cm.id)
return;

ib_destroy_cm_id(priv->cm.id);
priv->cm.id = NULL;
spin_lock_irq(&priv->lock);
while (!list_empty(&priv->cm.passive_ids)) {
p = list_entry(priv->cm.passive_ids.next, typeof(*p), list);
Expand Down

0 comments on commit 26d8107

Please sign in to comment.