mlx4: not using spin_lock_irq when getting vf by resource.
authorYevgeny Petrilin <yevgenyp@mellanox.co.il>
Mon, 19 Dec 2011 04:03:05 +0000 (04:03 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 19 Dec 2011 19:57:07 +0000 (14:57 -0500)
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>
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c

index bdd61c35d044b3326433acd5c83701f0d618592e..b41762db560217efbb0baf277f0b1622e38b100b 100644 (file)
@@ -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;
 }