Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 129905
b: refs/heads/master
c: d3b924d
h: refs/heads/master
i:
  129903: d1130e5
v: v3
  • Loading branch information
Andrew Morton authored and Roland Dreier committed Jan 16, 2009
1 parent f35b58e commit 1c2a5b0
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 28 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: 3c20962086b0ceb5498ba840e5a91bf4a692aae9
refs/heads/master: d3b924d960a808105180d229b4667061123cc4ef
27 changes: 12 additions & 15 deletions trunk/drivers/infiniband/ulp/ipoib/ipoib_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,17 +106,23 @@ int ipoib_open(struct net_device *dev)

ipoib_dbg(priv, "bringing up interface\n");

if (!test_and_set_bit(IPOIB_FLAG_ADMIN_UP, &priv->flags))
napi_enable(&priv->napi);
set_bit(IPOIB_FLAG_ADMIN_UP, &priv->flags);

if (ipoib_pkey_dev_delay_open(dev))
return 0;

if (ipoib_ib_dev_open(dev))
goto err_disable;
napi_enable(&priv->napi);

if (ipoib_ib_dev_up(dev))
goto err_stop;
if (ipoib_ib_dev_open(dev)) {
napi_disable(&priv->napi);
return -EINVAL;
}

if (ipoib_ib_dev_up(dev)) {
ipoib_ib_dev_stop(dev, 1);
napi_disable(&priv->napi);
return -EINVAL;
}

if (!test_bit(IPOIB_FLAG_SUBINTERFACE, &priv->flags)) {
struct ipoib_dev_priv *cpriv;
Expand All @@ -138,15 +144,6 @@ int ipoib_open(struct net_device *dev)
netif_start_queue(dev);

return 0;

err_stop:
ipoib_ib_dev_stop(dev, 1);

err_disable:
napi_disable(&priv->napi);
clear_bit(IPOIB_FLAG_ADMIN_UP, &priv->flags);

return -EINVAL;
}

static int ipoib_stop(struct net_device *dev)
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ static int ipoib_mcast_join_complete(int status,
}

if (mcast->logcount++ < 20) {
if (status == -ETIMEDOUT || status == -EAGAIN) {
if (status == -ETIMEDOUT) {
ipoib_dbg_mcast(priv, "multicast join failed for %pI6, status %d\n",
mcast->mcmember.mgid.raw, status);
} else {
Expand Down
11 changes: 3 additions & 8 deletions trunk/drivers/infiniband/ulp/ipoib/ipoib_vlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ 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 @@ -112,7 +111,7 @@ int ipoib_vlan_add(struct net_device *pdev, unsigned short pkey)
goto device_init_failed;
}

result = register_netdevice(priv->dev);
result = register_netdev(priv->dev);
if (result) {
ipoib_warn(priv, "failed to initialize; error %i", result);
goto register_failed;
Expand All @@ -135,13 +134,12 @@ 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_netdevice(priv->dev);
unregister_netdev(priv->dev);

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

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

Expand All @@ -165,11 +162,10 @@ 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_netdevice(priv->dev);
unregister_netdev(priv->dev);
ipoib_dev_cleanup(priv->dev);
list_del(&priv->list);
free_netdev(priv->dev);
Expand All @@ -179,7 +175,6 @@ int ipoib_vlan_delete(struct net_device *pdev, unsigned short pkey)
}
}
mutex_unlock(&ppriv->vlan_mutex);
rtnl_unlock();

return ret;
}
6 changes: 3 additions & 3 deletions trunk/drivers/net/mlx4/profile.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ u64 mlx4_make_profile(struct mlx4_dev *dev,
profile[MLX4_RES_AUXC].num = request->num_qp;
profile[MLX4_RES_SRQ].num = request->num_srq;
profile[MLX4_RES_CQ].num = request->num_cq;
profile[MLX4_RES_EQ].num = min(dev_cap->max_eqs,
dev_cap->reserved_eqs +
num_possible_cpus() + 1);
profile[MLX4_RES_EQ].num = min_t(unsigned, dev_cap->max_eqs,
dev_cap->reserved_eqs +
num_possible_cpus() + 1);
profile[MLX4_RES_DMPT].num = request->num_mpt;
profile[MLX4_RES_CMPT].num = MLX4_NUM_CMPTS;
profile[MLX4_RES_MTT].num = request->num_mtt;
Expand Down

0 comments on commit 1c2a5b0

Please sign in to comment.