[ofa-general] [PATCH] fix some ehca limits
Anton Blanchard
anton at samba.org
Mon Oct 1 08:36:20 PDT 2007
I had trouble getting DAPL to work on eHCA, this turned out to be a
negative value in max_cqe. max_pd and max_ah are currently negative too,
fix them up at the same time.
Before:
max_cqe: -64
max_pd: -1
max_ah: -1
After:
max_cqe: 2147483647
max_pd: 2147483647
max_ah: 2147483647
Signed-off-by: Anton Blanchard <anton at samba.org>
---
diff --git a/drivers/infiniband/hw/ehca/ehca_hca.c b/drivers/infiniband/hw/ehca/ehca_hca.c
index fc19ef9..4df1e2b 100644
--- a/drivers/infiniband/hw/ehca/ehca_hca.c
+++ b/drivers/infiniband/hw/ehca/ehca_hca.c
@@ -87,11 +88,11 @@ int ehca_query_device(struct ib_device *ibdev, struct ib_device_attr *props)
props->max_sge = min_t(int, rblock->max_sge, INT_MAX);
props->max_sge_rd = min_t(int, rblock->max_sge_rd, INT_MAX);
props->max_cq = min_t(int, rblock->max_cq, INT_MAX);
- props->max_cqe = min_t(int, rblock->max_cqe, INT_MAX);
+ props->max_cqe = min_t(unsigned int, rblock->max_cqe, INT_MAX);
props->max_mr = min_t(int, rblock->max_mr, INT_MAX);
props->max_mw = min_t(int, rblock->max_mw, INT_MAX);
- props->max_pd = min_t(int, rblock->max_pd, INT_MAX);
- props->max_ah = min_t(int, rblock->max_ah, INT_MAX);
+ props->max_pd = min_t(unsigned int, rblock->max_pd, INT_MAX);
+ props->max_ah = min_t(unsigned int, rblock->max_ah, INT_MAX);
props->max_fmr = min_t(int, rblock->max_mr, INT_MAX);
props->max_srq = 0;
props->max_srq_wr = 0;
More information about the general
mailing list