From 40589e74f7ba855f3a887c9d4abe9d100c5b039c Mon Sep 17 00:00:00 2001 From: Andy Grover Date: Tue, 12 Jan 2010 10:50:48 -0800 Subject: RDS: Base init_depth and responder_resources on hw values Instead of using a constant for initiator_depth and responder_resources, read the per-QP values when the device is enumerated, and then use these values when creating the connection. Signed-off-by: Andy Grover --- net/rds/ib.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'net/rds/ib.c') diff --git a/net/rds/ib.c b/net/rds/ib.c index f0d29656baff..72a5116c11de 100644 --- a/net/rds/ib.c +++ b/net/rds/ib.c @@ -91,6 +91,9 @@ void rds_ib_add_one(struct ib_device *device) min_t(unsigned int, dev_attr->max_fmr, fmr_pool_size) : fmr_pool_size; + rds_ibdev->max_initiator_depth = dev_attr->max_qp_init_rd_atom; + rds_ibdev->max_responder_resources = dev_attr->max_qp_rd_atom; + rds_ibdev->dev = device; rds_ibdev->pd = ib_alloc_pd(device); if (IS_ERR(rds_ibdev->pd)) -- cgit v1.2.3