Skip to content

Commit

Permalink
mlx4: not using spin_lock_irq when getting vf by resource.
Browse files Browse the repository at this point in the history
The function is always called from irq context, changing the call
to spin_lock().

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Yevgeny Petrilin authored and David S. Miller committed Dec 19, 2011
1 parent 0e03567 commit 996b054
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
Original file line number Diff line number Diff line change
Expand Up @@ -339,14 +339,14 @@ int mlx4_get_slave_from_resource_id(struct mlx4_dev *dev,

if (type == RES_QP)
id &= 0x7fffff;
spin_lock_irq(mlx4_tlock(dev));
spin_lock(mlx4_tlock(dev));

r = find_res(dev, id, type);
if (r) {
*slave = r->owner;
err = 0;
}
spin_unlock_irq(mlx4_tlock(dev));
spin_unlock(mlx4_tlock(dev));

return err;
}
Expand Down

0 comments on commit 996b054

Please sign in to comment.