mlx4: Fix wrong endianess access with QP context flags
[linux-2.6-block.git] / drivers / infiniband / hw / mlx4 / qp.c
index efb9eff8906c34845053ba04ced5dea9bfe8cbe4..836503927deae9dc14507331ac8b80d5a500fdbe 100644 (file)
@@ -1682,7 +1682,7 @@ static int __mlx4_ib_modify_qp(struct ib_qp *ibqp,
                                        MLX4_IB_LINK_TYPE_ETH;
                if (dev->dev->caps.tunnel_offload_mode ==  MLX4_TUNNEL_OFFLOAD_MODE_VXLAN) {
                        /* set QP to receive both tunneled & non-tunneled packets */
-                       if (!(context->flags & (1 << MLX4_RSS_QPC_FLAG_OFFSET)))
+                       if (!(context->flags & cpu_to_be32(1 << MLX4_RSS_QPC_FLAG_OFFSET)))
                                context->srqn = cpu_to_be32(7 << 28);
                }
        }