diff options
author | Selvin Xavier <selvin.xavier@emulex.com> | 2014-06-10 18:02:24 +0400 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2014-08-02 02:07:49 +0400 |
commit | 4f1df8440d26bafe0be6ef4dbf17162a1263d3fc (patch) | |
tree | 2bdfe641b66edded7dae6678555ecf1fd3381bf5 /drivers/infiniband/hw/ocrdma/ocrdma_main.c | |
parent | 920de55d40df30131c2b32850a5417d81b0efc7e (diff) | |
download | linux-4f1df8440d26bafe0be6ef4dbf17162a1263d3fc.tar.xz |
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/hw/ocrdma/ocrdma_main.c')
-rw-r--r-- | drivers/infiniband/hw/ocrdma/ocrdma_main.c | 6 |
1 files changed, 6 insertions, 0 deletions
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) if (!dev->qp_tbl) goto alloc_err; } + + dev->stag_arr = kzalloc(sizeof(u64) * OCRDMA_MAX_STAG, GFP_KERNEL); + if (dev->stag_arr == NULL) + goto alloc_err; + spin_lock_init(&dev->av_tbl.lock); spin_lock_init(&dev->flush_q_lock); return 0; @@ -334,6 +339,7 @@ alloc_err: static void ocrdma_free_resources(struct ocrdma_dev *dev) { + kfree(dev->stag_arr); kfree(dev->qp_tbl); kfree(dev->cq_tbl); kfree(dev->sgid_tbl); |