diff options
author | Mustafa Ismail <mustafa.ismail@intel.com> | 2017-12-08 23:34:29 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2017-12-12 02:19:44 +0300 |
commit | 24b9abab15896c30f7e4a8f752245cfd45ce7fbf (patch) | |
tree | 489b7ebd4e0789fe606dc6e3d0119d175b1d4929 /drivers/infiniband/hw/i40iw/i40iw_main.c | |
parent | 807e005ab8b3e1be5739e8df7d8c79913ed0ac83 (diff) | |
download | linux-24b9abab15896c30f7e4a8f752245cfd45ce7fbf.tar.xz |
i40iw: Reinitialize add_sd_cnt
add_sd_cnt in info structure passed to i40iw_create_hmc_obj_type
must be 0 and since it is modified during the call, it must be
reset in the loop. This avoids unnecessarily reprogramming the
SDs multiple times with the same values.
Signed-off-by: Mustafa Ismail <mustafa.ismail@intel.com>
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/i40iw/i40iw_main.c')
-rw-r--r-- | drivers/infiniband/hw/i40iw/i40iw_main.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/i40iw/i40iw_main.c b/drivers/infiniband/hw/i40iw/i40iw_main.c index 1f9d9c77d8ce..3aecf4cbb128 100644 --- a/drivers/infiniband/hw/i40iw/i40iw_main.c +++ b/drivers/infiniband/hw/i40iw/i40iw_main.c @@ -483,6 +483,7 @@ static enum i40iw_status_code i40iw_create_hmc_objs(struct i40iw_device *iwdev, for (i = 0; i < IW_HMC_OBJ_TYPE_NUM; i++) { info.rsrc_type = iw_hmc_obj_types[i]; info.count = dev->hmc_info->hmc_obj[info.rsrc_type].cnt; + info.add_sd_cnt = 0; status = i40iw_create_hmc_obj_type(dev, &info); if (status) { i40iw_pr_err("create obj type %d status = %d\n", |