aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2007-10-09 22:59:06 -0400
committerRoland Dreier <rolandd@cisco.com>2007-10-09 22:59:06 -0400
commitd7dc3ccbe4dd1d37950da0138079e61d5be06ca9 (patch)
tree6391db1b61ae23c34c351b617803d31dc9255804
parentca6de177acef8f2c7c3901ea583a263364ca7bbb (diff)
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: Roland Dreier <rolandd@cisco.com>
-rw-r--r--drivers/infiniband/hw/mlx4/srq.c2
-rw-r--r--drivers/net/mlx4/srq.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/mlx4/srq.c b/drivers/infiniband/hw/mlx4/srq.c
index 408748fb5285..e7e9a3d0dac3 100644
--- a/drivers/infiniband/hw/mlx4/srq.c
+++ b/drivers/infiniband/hw/mlx4/srq.c
@@ -251,7 +251,7 @@ int mlx4_ib_query_srq(struct ib_srq *ibsrq, struct ib_srq_attr *srq_attr)
251 if (ret) 251 if (ret)
252 return ret; 252 return ret;
253 253
254 srq_attr->srq_limit = be16_to_cpu(limit_watermark); 254 srq_attr->srq_limit = limit_watermark;
255 srq_attr->max_wr = srq->msrq.max - 1; 255 srq_attr->max_wr = srq->msrq.max - 1;
256 srq_attr->max_sge = srq->msrq.max_gs; 256 srq_attr->max_sge = srq->msrq.max_gs;
257 257
diff --git a/drivers/net/mlx4/srq.c b/drivers/net/mlx4/srq.c
index b061c86d6839..31b255a32915 100644
--- a/drivers/net/mlx4/srq.c
+++ b/drivers/net/mlx4/srq.c
@@ -227,7 +227,7 @@ int mlx4_srq_query(struct mlx4_dev *dev, struct mlx4_srq *srq, int *limit_waterm
227 err = mlx4_QUERY_SRQ(dev, mailbox, srq->srqn); 227 err = mlx4_QUERY_SRQ(dev, mailbox, srq->srqn);
228 if (err) 228 if (err)
229 goto err_out; 229 goto err_out;
230 *limit_watermark = srq_context->limit_watermark; 230 *limit_watermark = be16_to_cpu(srq_context->limit_watermark);
231 231
232err_out: 232err_out:
233 mlx4_free_cmd_mailbox(dev, mailbox); 233 mlx4_free_cmd_mailbox(dev, mailbox);