Commit d7dc3ccb authored by Roland Dreier's avatar Roland Dreier

IB/mlx4: Fix up SRQ limit_watermark endianness

mlx4_srq_query() returns a big-endian 16-bit value through an int *,
which screws up sparse checking.  Fix this so that a CPU-endian value
is returned.
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent ca6de177
...@@ -251,7 +251,7 @@ int mlx4_ib_query_srq(struct ib_srq *ibsrq, struct ib_srq_attr *srq_attr) ...@@ -251,7 +251,7 @@ int mlx4_ib_query_srq(struct ib_srq *ibsrq, struct ib_srq_attr *srq_attr)
if (ret) if (ret)
return ret; return ret;
srq_attr->srq_limit = be16_to_cpu(limit_watermark); srq_attr->srq_limit = limit_watermark;
srq_attr->max_wr = srq->msrq.max - 1; srq_attr->max_wr = srq->msrq.max - 1;
srq_attr->max_sge = srq->msrq.max_gs; srq_attr->max_sge = srq->msrq.max_gs;
......
...@@ -227,7 +227,7 @@ int mlx4_srq_query(struct mlx4_dev *dev, struct mlx4_srq *srq, int *limit_waterm ...@@ -227,7 +227,7 @@ int mlx4_srq_query(struct mlx4_dev *dev, struct mlx4_srq *srq, int *limit_waterm
err = mlx4_QUERY_SRQ(dev, mailbox, srq->srqn); err = mlx4_QUERY_SRQ(dev, mailbox, srq->srqn);
if (err) if (err)
goto err_out; goto err_out;
*limit_watermark = srq_context->limit_watermark; *limit_watermark = be16_to_cpu(srq_context->limit_watermark);
err_out: err_out:
mlx4_free_cmd_mailbox(dev, mailbox); mlx4_free_cmd_mailbox(dev, mailbox);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment