|
@@ -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 mlx4_ib_dev *dev = ctx->dev;
|
|
struct ib_ah_attr ah_attr;
|
|
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]) {
|
|
if (!dev->sm_ah[ctx->port - 1]) {
|
|
/* port is not yet Active, sm_ah not ready */
|
|
/* port is not yet Active, sm_ah not ready */
|
|
- spin_unlock(&dev->sm_lock);
|
|
|
|
|
|
+ spin_unlock_irqrestore(&dev->sm_lock, flags);
|
|
return -EAGAIN;
|
|
return -EAGAIN;
|
|
}
|
|
}
|
|
mlx4_ib_query_ah(dev->sm_ah[ctx->port - 1], &ah_attr);
|
|
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),
|
|
return mlx4_ib_send_to_wire(dev, mlx4_master_func_num(dev->dev),
|
|
ctx->port, IB_QPT_GSI, 0, 1, IB_QP1_QKEY,
|
|
ctx->port, IB_QPT_GSI, 0, 1, IB_QP1_QKEY,
|
|
&ah_attr, NULL, mad);
|
|
&ah_attr, NULL, mad);
|