Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 109892
b: refs/heads/master
c: c925743
h: refs/heads/master
v: v3
  • Loading branch information
Vladimir Sokolovsky authored and Roland Dreier committed Sep 2, 2008
1 parent 9961c5d commit ea777ee
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 27 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: e8224e4b804b4fd26723191c1891101a5959bb8a
refs/heads/master: c9257433f2eaf8803a1f3d3be5d984232db41ffe
2 changes: 0 additions & 2 deletions trunk/drivers/infiniband/ulp/ipoib/ipoib.h
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,6 @@ struct ipoib_dev_priv {

struct delayed_work pkey_poll_task;
struct delayed_work mcast_task;
struct work_struct carrier_on_task;
struct work_struct flush_light;
struct work_struct flush_normal;
struct work_struct flush_heavy;
Expand Down Expand Up @@ -465,7 +464,6 @@ int ipoib_dev_init(struct net_device *dev, struct ib_device *ca, int port);
void ipoib_dev_cleanup(struct net_device *dev);

void ipoib_mcast_join_task(struct work_struct *work);
void ipoib_mcast_carrier_on_task(struct work_struct *work);
void ipoib_mcast_send(struct net_device *dev, void *mgid, struct sk_buff *skb);

void ipoib_mcast_restart_task(struct work_struct *work);
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/infiniband/ulp/ipoib/ipoib_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1075,7 +1075,6 @@ static void ipoib_setup(struct net_device *dev)

INIT_DELAYED_WORK(&priv->pkey_poll_task, ipoib_pkey_poll);
INIT_DELAYED_WORK(&priv->mcast_task, ipoib_mcast_join_task);
INIT_WORK(&priv->carrier_on_task, ipoib_mcast_carrier_on_task);
INIT_WORK(&priv->flush_light, ipoib_ib_dev_flush_light);
INIT_WORK(&priv->flush_normal, ipoib_ib_dev_flush_normal);
INIT_WORK(&priv->flush_heavy, ipoib_ib_dev_flush_heavy);
Expand Down
31 changes: 10 additions & 21 deletions trunk/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
Original file line number Diff line number Diff line change
Expand Up @@ -366,21 +366,6 @@ static int ipoib_mcast_sendonly_join(struct ipoib_mcast *mcast)
return ret;
}

void ipoib_mcast_carrier_on_task(struct work_struct *work)
{
struct ipoib_dev_priv *priv = container_of(work, struct ipoib_dev_priv,
carrier_on_task);

/*
* Take rtnl_lock to avoid racing with ipoib_stop() and
* turning the carrier back on while a device is being
* removed.
*/
rtnl_lock();
netif_carrier_on(priv->dev);
rtnl_unlock();
}

static int ipoib_mcast_join_complete(int status,
struct ib_sa_multicast *multicast)
{
Expand All @@ -407,12 +392,16 @@ static int ipoib_mcast_join_complete(int status,
&priv->mcast_task, 0);
mutex_unlock(&mcast_mutex);

/*
* Defer carrier on work to ipoib_workqueue to avoid a
* deadlock on rtnl_lock here.
*/
if (mcast == priv->broadcast)
queue_work(ipoib_workqueue, &priv->carrier_on_task);
if (mcast == priv->broadcast) {
/*
* Take RTNL lock here to avoid racing with
* ipoib_stop() and turning the carrier back
* on while a device is being removed.
*/
rtnl_lock();
netif_carrier_on(dev);
rtnl_unlock();
}

return 0;
}
Expand Down
8 changes: 6 additions & 2 deletions trunk/drivers/net/mlx4/mr.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ struct mlx4_mpt_entry {
#define MLX4_MPT_FLAG_PHYSICAL (1 << 9)
#define MLX4_MPT_FLAG_REGION (1 << 8)

#define MLX4_MPT_PD_FLAG_FAST_REG (1 << 26)
#define MLX4_MPT_PD_FLAG_FAST_REG (1 << 27)
#define MLX4_MPT_PD_FLAG_RAE (1 << 28)
#define MLX4_MPT_PD_FLAG_EN_INV (3 << 24)

#define MLX4_MTT_FLAG_PRESENT 1
Expand Down Expand Up @@ -348,7 +349,10 @@ int mlx4_mr_enable(struct mlx4_dev *dev, struct mlx4_mr *mr)
if (mr->mtt.order >= 0 && mr->mtt.page_shift == 0) {
/* fast register MR in free state */
mpt_entry->flags |= cpu_to_be32(MLX4_MPT_FLAG_FREE);
mpt_entry->pd_flags |= cpu_to_be32(MLX4_MPT_PD_FLAG_FAST_REG);
mpt_entry->pd_flags |= cpu_to_be32(MLX4_MPT_PD_FLAG_FAST_REG |
MLX4_MPT_PD_FLAG_RAE);
mpt_entry->mtt_sz = cpu_to_be32((1 << mr->mtt.order) *
MLX4_MTT_ENTRY_PER_SEG);
} else {
mpt_entry->flags |= cpu_to_be32(MLX4_MPT_FLAG_SW_OWNS);
}
Expand Down

0 comments on commit ea777ee

Please sign in to comment.