Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 287975
b: refs/heads/master
c: 730c41d
h: refs/heads/master
i:
  287973: 7bdfc47
  287971: d264e54
  287967: 3162639
v: v3
  • Loading branch information
Yevgeny Petrilin authored and David S. Miller committed Feb 21, 2012
1 parent c65bd58 commit 5b1d055
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 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: 15103aa7a033d7d671c75cc3a71d772dbcbae61e
refs/heads/master: 730c41d5ba583a9608300fc4e6cf236957cfe02a
8 changes: 4 additions & 4 deletions trunk/drivers/net/ethernet/mellanox/mlx4/eq.c
Original file line number Diff line number Diff line change
Expand Up @@ -1036,7 +1036,7 @@ int mlx4_assign_eq(struct mlx4_dev *dev, char* name, int * vector)
struct mlx4_priv *priv = mlx4_priv(dev);
int vec = 0, err = 0, i;

spin_lock(&priv->msix_ctl.pool_lock);
mutex_lock(&priv->msix_ctl.pool_lock);
for (i = 0; !vec && i < dev->caps.comp_pool; i++) {
if (~priv->msix_ctl.pool_bm & 1ULL << i) {
priv->msix_ctl.pool_bm |= 1ULL << i;
Expand All @@ -1058,7 +1058,7 @@ int mlx4_assign_eq(struct mlx4_dev *dev, char* name, int * vector)
eq_set_ci(&priv->eq_table.eq[vec], 1);
}
}
spin_unlock(&priv->msix_ctl.pool_lock);
mutex_unlock(&priv->msix_ctl.pool_lock);

if (vec) {
*vector = vec;
Expand All @@ -1079,13 +1079,13 @@ void mlx4_release_eq(struct mlx4_dev *dev, int vec)
if (likely(i >= 0)) {
/*sanity check , making sure were not trying to free irq's
Belonging to a legacy EQ*/
spin_lock(&priv->msix_ctl.pool_lock);
mutex_lock(&priv->msix_ctl.pool_lock);
if (priv->msix_ctl.pool_bm & 1ULL << i) {
free_irq(priv->eq_table.eq[vec].irq,
&priv->eq_table.eq[vec]);
priv->msix_ctl.pool_bm &= ~(1ULL << i);
}
spin_unlock(&priv->msix_ctl.pool_lock);
mutex_unlock(&priv->msix_ctl.pool_lock);
}

}
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/ethernet/mellanox/mlx4/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1828,7 +1828,7 @@ static int __mlx4_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
goto err_master_mfunc;

priv->msix_ctl.pool_bm = 0;
spin_lock_init(&priv->msix_ctl.pool_lock);
mutex_init(&priv->msix_ctl.pool_lock);

mlx4_enable_msi_x(dev);
if ((mlx4_is_mfunc(dev)) &&
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/ethernet/mellanox/mlx4/mlx4.h
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ struct mlx4_sense {

struct mlx4_msix_ctl {
u64 pool_bm;
spinlock_t pool_lock;
struct mutex pool_lock;
};

struct mlx4_steer {
Expand Down

0 comments on commit 5b1d055

Please sign in to comment.