diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2015-10-08 08:28:26 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2015-10-08 08:28:26 -0300 |
commit | f19866e5cb04f8f007cb422132ea4611cdacc8e3 (patch) | |
tree | ee8d9b12a8ec6335ed76b3c58ba0f3e1fea7616e /drivers/infiniband/hw/mlx4/mcg.c | |
parent | a700f2d8e79ff80041078f160fe1edccf89b0c66 (diff) |
Linux-libre 4.2.3-gnupck-4.2.3-gnu
Diffstat (limited to 'drivers/infiniband/hw/mlx4/mcg.c')
-rw-r--r-- | drivers/infiniband/hw/mlx4/mcg.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/mlx4/mcg.c b/drivers/infiniband/hw/mlx4/mcg.c index ed327e6c8..a0559a8af 100644 --- a/drivers/infiniband/hw/mlx4/mcg.c +++ b/drivers/infiniband/hw/mlx4/mcg.c @@ -206,15 +206,16 @@ static int send_mad_to_wire(struct mlx4_ib_demux_ctx *ctx, struct ib_mad *mad) { struct mlx4_ib_dev *dev = ctx->dev; struct ib_ah_attr ah_attr; + unsigned long flags; - spin_lock(&dev->sm_lock); + spin_lock_irqsave(&dev->sm_lock, flags); if (!dev->sm_ah[ctx->port - 1]) { /* port is not yet Active, sm_ah not ready */ - spin_unlock(&dev->sm_lock); + spin_unlock_irqrestore(&dev->sm_lock, flags); return -EAGAIN; } mlx4_ib_query_ah(dev->sm_ah[ctx->port - 1], &ah_attr); - spin_unlock(&dev->sm_lock); + spin_unlock_irqrestore(&dev->sm_lock, flags); return mlx4_ib_send_to_wire(dev, mlx4_master_func_num(dev->dev), ctx->port, IB_QPT_GSI, 0, 1, IB_QP1_QKEY, &ah_attr, NULL, mad); |