Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 129903
b: refs/heads/master
c: cbbe1ef
h: refs/heads/master
i:
  129901: 1c44fd5
  129899: a67d3c3
  129895: 4e9521f
  129887: 307f758
v: v3
  • Loading branch information
Roland Dreier committed Jan 15, 2009
1 parent b96ccb3 commit d1130e5
Show file tree
Hide file tree
Showing 2 changed files with 9 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: b8a1b1ce14252b59b2d5c89de25b54f9bfd4cc5e
refs/heads/master: cbbe1efa4972350286b52cb48aefaa11e198c0fb
11 changes: 8 additions & 3 deletions trunk/drivers/infiniband/ulp/ipoib/ipoib_vlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ int ipoib_vlan_add(struct net_device *pdev, unsigned short pkey)

ppriv = netdev_priv(pdev);

rtnl_lock();
mutex_lock(&ppriv->vlan_mutex);

/*
Expand Down Expand Up @@ -111,7 +112,7 @@ int ipoib_vlan_add(struct net_device *pdev, unsigned short pkey)
goto device_init_failed;
}

result = register_netdev(priv->dev);
result = register_netdevice(priv->dev);
if (result) {
ipoib_warn(priv, "failed to initialize; error %i", result);
goto register_failed;
Expand All @@ -134,12 +135,13 @@ int ipoib_vlan_add(struct net_device *pdev, unsigned short pkey)
list_add_tail(&priv->list, &ppriv->child_intfs);

mutex_unlock(&ppriv->vlan_mutex);
rtnl_unlock();

return 0;

sysfs_failed:
ipoib_delete_debug_files(priv->dev);
unregister_netdev(priv->dev);
unregister_netdevice(priv->dev);

register_failed:
ipoib_dev_cleanup(priv->dev);
Expand All @@ -149,6 +151,7 @@ int ipoib_vlan_add(struct net_device *pdev, unsigned short pkey)

err:
mutex_unlock(&ppriv->vlan_mutex);
rtnl_unlock();
return result;
}

Expand All @@ -162,10 +165,11 @@ int ipoib_vlan_delete(struct net_device *pdev, unsigned short pkey)

ppriv = netdev_priv(pdev);

rtnl_lock();
mutex_lock(&ppriv->vlan_mutex);
list_for_each_entry_safe(priv, tpriv, &ppriv->child_intfs, list) {
if (priv->pkey == pkey) {
unregister_netdev(priv->dev);
unregister_netdevice(priv->dev);
ipoib_dev_cleanup(priv->dev);
list_del(&priv->list);
free_netdev(priv->dev);
Expand All @@ -175,6 +179,7 @@ int ipoib_vlan_delete(struct net_device *pdev, unsigned short pkey)
}
}
mutex_unlock(&ppriv->vlan_mutex);
rtnl_unlock();

return ret;
}

0 comments on commit d1130e5

Please sign in to comment.