]> git.openfabrics.org - ~tnikolova/compat-rdma/.git/commitdiff
RDMA/cxgb4: Remove the limitation on maximum number of STAGs
authorVipul Pandya <vipul@chelsio.com>
Tue, 11 Dec 2012 06:35:50 +0000 (22:35 -0800)
committerVipul Pandya <vipul@chelsio.com>
Tue, 11 Dec 2012 06:35:50 +0000 (22:35 -0800)
This patch fixes bug 2381 in OFED bugzilla.

Signed-off-by: Vipul Pandya <vipul@chelsio.com>
linux-next-pending/0031-RDMA-cxgb4-Remove-the-limitation-on-maximum.patch [new file with mode: 0644]

diff --git a/linux-next-pending/0031-RDMA-cxgb4-Remove-the-limitation-on-maximum.patch b/linux-next-pending/0031-RDMA-cxgb4-Remove-the-limitation-on-maximum.patch
new file mode 100644 (file)
index 0000000..a64bc8b
--- /dev/null
@@ -0,0 +1,28 @@
+RDMA/cxgb4: Remove the limitation on maximum number of STAGs
+
+With high capacity RDMA configuration file we can allocate STAGs more than
+T4_MAX_NUM_STAG. Hence remove that limitation and use whatever LLD provides.
+
+diff --git a/drivers/infiniband/hw/cxgb4/iw_cxgb4.h b/drivers/infiniband/hw/cxgb4/iw_cxgb4.h
+--- a/drivers/infiniband/hw/cxgb4/iw_cxgb4.h   2012-12-10 18:06:39.057722023 +0530
++++ b/drivers/infiniband/hw/cxgb4/iw_cxgb4.h   2012-12-10 18:00:55.151704577 +0530
+@@ -159,7 +159,7 @@ static inline int c4iw_fatal_error(struc
+ static inline int c4iw_num_stags(struct c4iw_rdev *rdev)
+ {
+-      return min((int)T4_MAX_NUM_STAG, (int)(rdev->lldi.vr->stag.size >> 5));
++      return (int)(rdev->lldi.vr->stag.size >> 5);
+ }
+ #define C4IW_WR_TO (10*HZ)
+diff --git a/drivers/infiniband/hw/cxgb4/t4.h b/drivers/infiniband/hw/cxgb4/t4.h
+--- a/drivers/infiniband/hw/cxgb4/t4.h 2012-12-10 18:06:39.057722023 +0530
++++ b/drivers/infiniband/hw/cxgb4/t4.h 2012-12-10 18:00:55.151704577 +0530
+@@ -46,7 +46,6 @@
+ #define T4_MAX_SQ_SIZE (T4_MAX_EQ_SIZE - 1)
+ #define T4_MAX_QP_DEPTH (T4_MAX_RQ_SIZE - 1)
+ #define T4_MAX_CQ_DEPTH (T4_MAX_IQ_SIZE - 1)
+-#define T4_MAX_NUM_STAG (1<<15)
+ #define T4_MAX_MR_SIZE (~0ULL - 1)
+ #define T4_PAGESIZE_MASK 0xffff000  /* 4KB-128MB */
+ #define T4_STAG_UNSET 0xffffffff