mlx4: not using spin_lock_irq when getting vf by resource.
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>
This commit is contained in:
parent
0e03567a2c
commit
996b0541e7
@ -339,14 +339,14 @@ int mlx4_get_slave_from_resource_id(struct mlx4_dev *dev,
|
|||||||
|
|
||||||
if (type == RES_QP)
|
if (type == RES_QP)
|
||||||
id &= 0x7fffff;
|
id &= 0x7fffff;
|
||||||
spin_lock_irq(mlx4_tlock(dev));
|
spin_lock(mlx4_tlock(dev));
|
||||||
|
|
||||||
r = find_res(dev, id, type);
|
r = find_res(dev, id, type);
|
||||||
if (r) {
|
if (r) {
|
||||||
*slave = r->owner;
|
*slave = r->owner;
|
||||||
err = 0;
|
err = 0;
|
||||||
}
|
}
|
||||||
spin_unlock_irq(mlx4_tlock(dev));
|
spin_unlock(mlx4_tlock(dev));
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user