aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/i40iw/i40iw_hw.c
diff options
context:
space:
mode:
authorHenry Orosco <henry.orosco@intel.com>2016-11-09 21:30:28 -0600
committerDoug Ledford <dledford@redhat.com>2016-12-05 16:09:35 -0500
commit85a87c90ee90217da1b05a77bbb47ebe31a2f124 (patch)
treebae620dd58d1f85d924cd4c64cca04e0d3188453 /drivers/infiniband/hw/i40iw/i40iw_hw.c
parenti40iw: Optimize inline data copy (diff)
downloadlinux-dev-85a87c90ee90217da1b05a77bbb47ebe31a2f124.tar.xz
linux-dev-85a87c90ee90217da1b05a77bbb47ebe31a2f124.zip
i40iw: Query device accounts for internal rsrc
Some resources are consumed internally and not available to the user. After hw is initialized, figure out how many resources are consumed and subtract those numbers from the initial max device capability in i40iw_query_device(). Signed-off-by: Henry Orosco <henry.orosco@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/i40iw/i40iw_hw.c')
-rw-r--r--drivers/infiniband/hw/i40iw/i40iw_hw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/i40iw/i40iw_hw.c b/drivers/infiniband/hw/i40iw/i40iw_hw.c
index b94727ffc862..5e2c16c725e3 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_hw.c
+++ b/drivers/infiniband/hw/i40iw/i40iw_hw.c
@@ -62,7 +62,7 @@ u32 i40iw_initialize_hw_resources(struct i40iw_device *iwdev)
max_mr = iwdev->sc_dev.hmc_info->hmc_obj[I40IW_HMC_IW_MR].cnt;
arp_table_size = iwdev->sc_dev.hmc_info->hmc_obj[I40IW_HMC_IW_ARP].cnt;
iwdev->max_cqe = 0xFFFFF;
- num_pds = max_qp * 4;
+ num_pds = I40IW_MAX_PDS;
resources_size = sizeof(struct i40iw_arp_entry) * arp_table_size;
resources_size += sizeof(unsigned long) * BITS_TO_LONGS(max_qp);
resources_size += sizeof(unsigned long) * BITS_TO_LONGS(max_mr);