diff options
author | Selvin Xavier <selvin.xavier@emulex.com> | 2014-06-10 10:02:24 -0400 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2014-08-01 18:07:49 -0400 |
commit | 4f1df8440d26bafe0be6ef4dbf17162a1263d3fc (patch) | |
tree | 2bdfe641b66edded7dae6678555ecf1fd3381bf5 /drivers/infiniband | |
parent | 920de55d40df30131c2b32850a5417d81b0efc7e (diff) |
RDMA/ocrdma: Increase the size of STAG array in dev structure to 16K
HW can support 16K STAG entries. Change this max limit. Also, move
this array out of ocrdma_dev to reduce the size of this structure.
Signed-off-by: Devesh Sharma <devesh.sharma@emulex.com>
Signed-off-by: Selvin Xavier <selvin.xavier@emulex.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/ocrdma/ocrdma.h | 2 | ||||
-rw-r--r-- | drivers/infiniband/hw/ocrdma/ocrdma_main.c | 6 | ||||
-rw-r--r-- | drivers/infiniband/hw/ocrdma/ocrdma_sli.h | 2 |
3 files changed, 8 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma.h b/drivers/infiniband/hw/ocrdma/ocrdma.h index fc273782986e..57165137a7a2 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma.h +++ b/drivers/infiniband/hw/ocrdma/ocrdma.h | |||
@@ -236,7 +236,7 @@ struct ocrdma_dev { | |||
236 | struct list_head entry; | 236 | struct list_head entry; |
237 | struct rcu_head rcu; | 237 | struct rcu_head rcu; |
238 | int id; | 238 | int id; |
239 | u64 stag_arr[OCRDMA_MAX_STAG]; | 239 | u64 *stag_arr; |
240 | u8 sl; /* service level */ | 240 | u8 sl; /* service level */ |
241 | bool pfc_state; | 241 | bool pfc_state; |
242 | atomic_t update_sl; | 242 | atomic_t update_sl; |
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_main.c b/drivers/infiniband/hw/ocrdma/ocrdma_main.c index 3cb20c6b91ce..0d90c7f75a6f 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_main.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_main.c | |||
@@ -324,6 +324,11 @@ static int ocrdma_alloc_resources(struct ocrdma_dev *dev) | |||
324 | if (!dev->qp_tbl) | 324 | if (!dev->qp_tbl) |
325 | goto alloc_err; | 325 | goto alloc_err; |
326 | } | 326 | } |
327 | |||
328 | dev->stag_arr = kzalloc(sizeof(u64) * OCRDMA_MAX_STAG, GFP_KERNEL); | ||
329 | if (dev->stag_arr == NULL) | ||
330 | goto alloc_err; | ||
331 | |||
327 | spin_lock_init(&dev->av_tbl.lock); | 332 | spin_lock_init(&dev->av_tbl.lock); |
328 | spin_lock_init(&dev->flush_q_lock); | 333 | spin_lock_init(&dev->flush_q_lock); |
329 | return 0; | 334 | return 0; |
@@ -334,6 +339,7 @@ alloc_err: | |||
334 | 339 | ||
335 | static void ocrdma_free_resources(struct ocrdma_dev *dev) | 340 | static void ocrdma_free_resources(struct ocrdma_dev *dev) |
336 | { | 341 | { |
342 | kfree(dev->stag_arr); | ||
337 | kfree(dev->qp_tbl); | 343 | kfree(dev->qp_tbl); |
338 | kfree(dev->cq_tbl); | 344 | kfree(dev->cq_tbl); |
339 | kfree(dev->sgid_tbl); | 345 | kfree(dev->sgid_tbl); |
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_sli.h b/drivers/infiniband/hw/ocrdma/ocrdma_sli.h index a20d3485ed60..3d08e665be26 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_sli.h +++ b/drivers/infiniband/hw/ocrdma/ocrdma_sli.h | |||
@@ -107,7 +107,7 @@ enum { | |||
107 | 107 | ||
108 | #define OCRDMA_MAX_QP 2048 | 108 | #define OCRDMA_MAX_QP 2048 |
109 | #define OCRDMA_MAX_CQ 2048 | 109 | #define OCRDMA_MAX_CQ 2048 |
110 | #define OCRDMA_MAX_STAG 8192 | 110 | #define OCRDMA_MAX_STAG 16384 |
111 | 111 | ||
112 | enum { | 112 | enum { |
113 | OCRDMA_DB_RQ_OFFSET = 0xE0, | 113 | OCRDMA_DB_RQ_OFFSET = 0xE0, |