Lines Matching refs:dev_lim
165 static int mthca_dev_lim(struct mthca_dev *mdev, struct mthca_dev_lim *dev_lim) in mthca_dev_lim() argument
170 err = mthca_QUERY_DEV_LIM(mdev, dev_lim); in mthca_dev_lim()
176 if (dev_lim->min_page_sz > PAGE_SIZE) { in mthca_dev_lim()
179 dev_lim->min_page_sz, PAGE_SIZE); in mthca_dev_lim()
182 if (dev_lim->num_ports > MTHCA_MAX_PORTS) { in mthca_dev_lim()
185 dev_lim->num_ports, MTHCA_MAX_PORTS); in mthca_dev_lim()
189 if (dev_lim->uar_size > pci_resource_len(mdev->pdev, 2)) { in mthca_dev_lim()
192 dev_lim->uar_size, in mthca_dev_lim()
197 mdev->limits.num_ports = dev_lim->num_ports; in mthca_dev_lim()
198 mdev->limits.vl_cap = dev_lim->max_vl; in mthca_dev_lim()
199 mdev->limits.mtu_cap = dev_lim->max_mtu; in mthca_dev_lim()
200 mdev->limits.gid_table_len = dev_lim->max_gids; in mthca_dev_lim()
201 mdev->limits.pkey_table_len = dev_lim->max_pkeys; in mthca_dev_lim()
202 mdev->limits.local_ca_ack_delay = dev_lim->local_ca_ack_delay; in mthca_dev_lim()
208 mdev->limits.max_sg = min_t(int, dev_lim->max_sg, in mthca_dev_lim()
209 (dev_lim->max_desc_sz - in mthca_dev_lim()
215 mdev->limits.max_wqes = dev_lim->max_qp_sz; in mthca_dev_lim()
216 mdev->limits.max_qp_init_rdma = dev_lim->max_requester_per_qp; in mthca_dev_lim()
217 mdev->limits.reserved_qps = dev_lim->reserved_qps; in mthca_dev_lim()
218 mdev->limits.max_srq_wqes = dev_lim->max_srq_sz; in mthca_dev_lim()
219 mdev->limits.reserved_srqs = dev_lim->reserved_srqs; in mthca_dev_lim()
220 mdev->limits.reserved_eecs = dev_lim->reserved_eecs; in mthca_dev_lim()
221 mdev->limits.max_desc_sz = dev_lim->max_desc_sz; in mthca_dev_lim()
228 mdev->limits.max_cqes = dev_lim->max_cq_sz - 1; in mthca_dev_lim()
229 mdev->limits.reserved_cqs = dev_lim->reserved_cqs; in mthca_dev_lim()
230 mdev->limits.reserved_eqs = dev_lim->reserved_eqs; in mthca_dev_lim()
231 mdev->limits.reserved_mtts = dev_lim->reserved_mtts; in mthca_dev_lim()
232 mdev->limits.reserved_mrws = dev_lim->reserved_mrws; in mthca_dev_lim()
233 mdev->limits.reserved_uars = dev_lim->reserved_uars; in mthca_dev_lim()
234 mdev->limits.reserved_pds = dev_lim->reserved_pds; in mthca_dev_lim()
235 mdev->limits.port_width_cap = dev_lim->max_port_width; in mthca_dev_lim()
236 mdev->limits.page_size_cap = ~(u32) (dev_lim->min_page_sz - 1); in mthca_dev_lim()
237 mdev->limits.flags = dev_lim->flags; in mthca_dev_lim()
244 if (dev_lim->stat_rate_support) in mthca_dev_lim()
245 mdev->limits.stat_rate_support = dev_lim->stat_rate_support; in mthca_dev_lim()
263 if (dev_lim->flags & DEV_LIM_FLAG_BAD_PKEY_CNTR) in mthca_dev_lim()
266 if (dev_lim->flags & DEV_LIM_FLAG_BAD_QKEY_CNTR) in mthca_dev_lim()
269 if (dev_lim->flags & DEV_LIM_FLAG_RAW_MULTI) in mthca_dev_lim()
272 if (dev_lim->flags & DEV_LIM_FLAG_AUTO_PATH_MIG) in mthca_dev_lim()
275 if (dev_lim->flags & DEV_LIM_FLAG_UD_AV_PORT_ENFORCE) in mthca_dev_lim()
278 if (dev_lim->flags & DEV_LIM_FLAG_SRQ) in mthca_dev_lim()
282 if (dev_lim->flags & DEV_LIM_FLAG_IPOIB_CSUM) in mthca_dev_lim()
292 struct mthca_dev_lim dev_lim; in mthca_init_tavor() local
314 err = mthca_dev_lim(mdev, &dev_lim); in mthca_init_tavor()
321 profile.num_uar = dev_lim.uar_size / PAGE_SIZE; in mthca_init_tavor()
324 profile.num_srq = dev_lim.max_srqs; in mthca_init_tavor()
326 size = mthca_make_profile(mdev, &profile, &dev_lim, &init_hca); in mthca_init_tavor()
382 struct mthca_dev_lim *dev_lim, in mthca_init_icm() argument
434 dev_lim->mpt_entry_sz, in mthca_init_icm()
445 dev_lim->qpc_entry_sz, in mthca_init_icm()
456 dev_lim->eqpc_entry_sz, in mthca_init_icm()
478 dev_lim->cqc_entry_sz, in mthca_init_icm()
491 dev_lim->srq_entry_sz, in mthca_init_icm()
577 struct mthca_dev_lim dev_lim; in mthca_init_arbel() local
604 err = mthca_dev_lim(mdev, &dev_lim); in mthca_init_arbel()
611 profile.num_uar = dev_lim.uar_size / PAGE_SIZE; in mthca_init_arbel()
614 profile.num_srq = dev_lim.max_srqs; in mthca_init_arbel()
616 icm_size = mthca_make_profile(mdev, &profile, &dev_lim, &init_hca); in mthca_init_arbel()
622 err = mthca_init_icm(mdev, &dev_lim, &init_hca, icm_size); in mthca_init_arbel()