diff options
author | Henry Orosco <henry.orosco@intel.com> | 2016-11-10 06:30:28 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-12-06 00:09:35 +0300 |
commit | 85a87c90ee90217da1b05a77bbb47ebe31a2f124 (patch) | |
tree | bae620dd58d1f85d924cd4c64cca04e0d3188453 /drivers/infiniband/hw/i40iw/i40iw_hw.c | |
parent | e7f9774af591d346990f1d6dfca0ee9caeb52756 (diff) | |
download | linux-85a87c90ee90217da1b05a77bbb47ebe31a2f124.tar.xz |
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.c | 2 |
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); |