From a2cda5eecfddbab8a947f2e22eb3e83a3e4995fb Mon Sep 17 00:00:00 2001 From: Vipul Pandya Date: Mon, 10 Dec 2012 22:35:50 -0800 Subject: [PATCH] RDMA/cxgb4: Remove the limitation on maximum number of STAGs This patch fixes bug 2381 in OFED bugzilla. Signed-off-by: Vipul Pandya --- ...gb4-Remove-the-limitation-on-maximum.patch | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 linux-next-pending/0031-RDMA-cxgb4-Remove-the-limitation-on-maximum.patch 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 index 0000000..a64bc8b --- /dev/null +++ b/linux-next-pending/0031-RDMA-cxgb4-Remove-the-limitation-on-maximum.patch @@ -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 -- 2.46.0