diff options
author | Steve Wise <swise@opengridcomputing.com> | 2010-06-23 15:46:55 +0000 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2010-08-07 23:08:47 -0700 |
commit | 93fb72e443b9fcbef598faa05478883952edca77 (patch) | |
tree | a9d58122bf50b6a988c40bc7a487363f8023492e /drivers/infiniband/hw/cxgb4/resource.c | |
parent | 2d53056973079e6c2ffc0d7ae3afbdd3d4f18ae3 (diff) | |
download | op-kernel-dev-93fb72e443b9fcbef598faa05478883952edca77.zip op-kernel-dev-93fb72e443b9fcbef598faa05478883952edca77.tar.gz |
RDMA/cxgb4: Obtain RDMA QID ranges from LLD/FW
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/cxgb4/resource.c')
-rw-r--r-- | drivers/infiniband/hw/cxgb4/resource.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/cxgb4/resource.c b/drivers/infiniband/hw/cxgb4/resource.c index fb195d1..83b23df 100644 --- a/drivers/infiniband/hw/cxgb4/resource.c +++ b/drivers/infiniband/hw/cxgb4/resource.c @@ -110,11 +110,12 @@ static int c4iw_init_qid_fifo(struct c4iw_rdev *rdev) spin_lock_init(&rdev->resource.qid_fifo_lock); - if (kfifo_alloc(&rdev->resource.qid_fifo, T4_MAX_QIDS * sizeof(u32), - GFP_KERNEL)) + if (kfifo_alloc(&rdev->resource.qid_fifo, rdev->lldi.vr->qp.size * + sizeof(u32), GFP_KERNEL)) return -ENOMEM; - for (i = T4_QID_BASE; i < T4_QID_BASE + T4_MAX_QIDS; i++) + for (i = rdev->lldi.vr->qp.start; + i < rdev->lldi.vr->qp.start + rdev->lldi.vr->qp.size; i++) if (!(i & rdev->qpmask)) kfifo_in(&rdev->resource.qid_fifo, (unsigned char *) &i, sizeof(u32)); |