| /drivers/gpu/drm/xe/ |
| A D | xe_pci_sriov.c | 27 for (n = 1; n <= num_vfs; n++) in pf_needs_provisioning() 156 xe_sriov_dbg(xe, "enabling %u VF%s\n", num_vfs, str_plural(num_vfs)); in pf_enable_vfs() 187 pf_link_vfs(xe, num_vfs); in pf_enable_vfs() 194 return num_vfs; in pf_enable_vfs() 201 num_vfs, str_plural(num_vfs), ERR_PTR(err)); in pf_enable_vfs() 212 xe_sriov_dbg(xe, "disabling %u VF%s\n", num_vfs, str_plural(num_vfs)); in pf_disable_vfs() 214 if (!num_vfs) in pf_disable_vfs() 221 pf_reset_vfs(xe, num_vfs); in pf_disable_vfs() 228 xe_sriov_info(xe, "Disabled %u VF%s\n", num_vfs, str_plural(num_vfs)); in pf_disable_vfs() 252 if (num_vfs < 0) in xe_pci_sriov_configure() [all …]
|
| A D | xe_gt_sriov_pf_config.h | 18 unsigned int vfid, unsigned int num_vfs); 20 unsigned int vfid, unsigned int num_vfs, u64 size); 24 int xe_gt_sriov_pf_config_set_fair_ctxs(struct xe_gt *gt, unsigned int vfid, unsigned int num_vfs); 25 int xe_gt_sriov_pf_config_bulk_set_ctxs(struct xe_gt *gt, unsigned int vfid, unsigned int num_vfs, 30 int xe_gt_sriov_pf_config_set_fair_dbs(struct xe_gt *gt, unsigned int vfid, unsigned int num_vfs); 31 int xe_gt_sriov_pf_config_bulk_set_dbs(struct xe_gt *gt, unsigned int vfid, unsigned int num_vfs, 36 int xe_gt_sriov_pf_config_set_fair_lmem(struct xe_gt *gt, unsigned int vfid, unsigned int num_vfs); 37 int xe_gt_sriov_pf_config_bulk_set_lmem(struct xe_gt *gt, unsigned int vfid, unsigned int num_vfs, 55 int xe_gt_sriov_pf_config_set_fair(struct xe_gt *gt, unsigned int vfid, unsigned int num_vfs);
|
| A D | xe_gt_sriov_pf_config.c | 604 xe_gt_assert(gt, num_vfs); in pf_config_bulk_set_u64_done() 607 if (num_vfs == 1) in pf_config_bulk_set_u64_done() 647 if (!num_vfs) in xe_gt_sriov_pf_config_bulk_set_ggtt() 710 unsigned int num_vfs) in xe_gt_sriov_pf_config_set_fair_ggtt() argument 715 xe_gt_assert(gt, num_vfs); in xe_gt_sriov_pf_config_set_fair_ggtt() 930 if (num_vfs == 1) in pf_config_bulk_set_u32_done() 968 if (!num_vfs) in xe_gt_sriov_pf_config_bulk_set_ctxs() 1014 unsigned int num_vfs) in xe_gt_sriov_pf_config_set_fair_ctxs() argument 1216 if (!num_vfs) in xe_gt_sriov_pf_config_bulk_set_dbs() 1587 if (!num_vfs) in xe_gt_sriov_pf_config_bulk_set_lmem() [all …]
|
| A D | xe_pci_sriov.h | 12 int xe_pci_sriov_configure(struct pci_dev *pdev, int num_vfs); 14 static inline int xe_pci_sriov_configure(struct pci_dev *pdev, int num_vfs) in xe_pci_sriov_configure() argument
|
| /drivers/crypto/cavium/nitrox/ |
| A D | nitrox_sriov.c | 15 static inline bool num_vfs_valid(int num_vfs) in num_vfs_valid() argument 19 switch (num_vfs) { in num_vfs_valid() 35 switch (num_vfs) { in num_vfs_to_mode() 158 if (!num_vfs_valid(num_vfs)) { in nitrox_sriov_enable() 163 if (pci_num_vf(pdev) == num_vfs) in nitrox_sriov_enable() 164 return num_vfs; in nitrox_sriov_enable() 174 ndev->iov.num_vfs = num_vfs; in nitrox_sriov_enable() 188 return num_vfs; in nitrox_sriov_enable() 194 ndev->iov.num_vfs = 0; in nitrox_sriov_enable() 216 ndev->iov.num_vfs = 0; in nitrox_sriov_disable() [all …]
|
| /drivers/crypto/marvell/octeontx2/ |
| A D | otx2_cptpf_main.c | 21 int num_vfs) in cptpf_enable_vfpf_mbox_intr() argument 37 if (num_vfs > 64) { in cptpf_enable_vfpf_mbox_intr() 47 int num_vfs) in cptpf_disable_vfpf_mbox_intr() argument 63 if (num_vfs > 64) { in cptpf_disable_vfpf_mbox_intr() 72 int num_vfs) in cptpf_enable_vf_flr_me_intrs() argument 88 if (num_vfs <= 64) in cptpf_enable_vf_flr_me_intrs() 119 if (num_vfs <= 64) in cptpf_disable_vf_flr_me_intrs() 274 if (num_vfs > 64) { in cptpf_register_vfpf_intr() 390 num_vfs); in cptpf_vfpf_mbox_init() 656 if (!num_vfs) in cptpf_sriov_disable() [all …]
|
| /drivers/net/ethernet/broadcom/bnxt/ |
| A D | bnxt_sriov.c | 631 vf_vnics = (vf_vnics - pf->max_vfs + num_vfs) / num_vfs; in bnxt_hwrm_func_vf_resc_cfg() 717 num_vfs; in bnxt_hwrm_func_cfg() 804 *num_vfs = 0; in bnxt_cfg_hw_sriov() 809 *num_vfs = rc; in bnxt_cfg_hw_sriov() 926 if (!num_vfs) in bnxt_sriov_disable() 937 num_vfs); in bnxt_sriov_disable() 980 num_vfs = 0; in bnxt_sriov_configure() 985 if (num_vfs && num_vfs == bp->pf.active_vfs) in bnxt_sriov_configure() 990 if (!num_vfs) in bnxt_sriov_configure() 999 return num_vfs; in bnxt_sriov_configure() [all …]
|
| A D | bnxt_vfr.c | 265 u16 num_vfs, i; in bnxt_vf_reps_close() local 270 num_vfs = pci_num_vf(bp->pdev); in bnxt_vf_reps_close() 271 for (i = 0; i < num_vfs; i++) { in bnxt_vf_reps_close() 313 u16 num_vfs = pci_num_vf(bp->pdev); in __bnxt_vf_reps_destroy() local 317 for (i = 0; i < num_vfs; i++) { in __bnxt_vf_reps_destroy() 381 u16 num_vfs = pci_num_vf(bp->pdev); in bnxt_vf_reps_free() local 387 for (i = 0; i < num_vfs; i++) in bnxt_vf_reps_free() 431 for (i = 0; i < num_vfs; i++) { in bnxt_vf_reps_alloc() 491 u16 *cfa_code_map = NULL, num_vfs = pci_num_vf(bp->pdev); in bnxt_vf_reps_create() local 499 bp->vf_reps = kcalloc(num_vfs, sizeof(vf_rep), GFP_KERNEL); in bnxt_vf_reps_create() [all …]
|
| /drivers/net/ethernet/mellanox/mlx5/core/ |
| A D | sriov.c | 86 for (vf = 0; vf < num_vfs; vf++) { in mlx5_device_enable_sriov() 134 for (vf = num_vfs - 1; vf >= 0; vf--) { in mlx5_device_disable_sriov() 186 err = mlx5_device_enable_sriov(dev, num_vfs); in mlx5_sriov_enable() 193 err = pci_enable_sriov(pdev, num_vfs); in mlx5_sriov_enable() 205 int num_vfs = pci_num_vf(dev->pdev); in mlx5_sriov_disable() local 221 if (num_vfs) in mlx5_core_sriov_configure() 222 err = mlx5_sriov_enable(pdev, num_vfs); in mlx5_core_sriov_configure() 227 sriov->num_vfs = num_vfs; in mlx5_core_sriov_configure() 228 return err ? err : num_vfs; in mlx5_core_sriov_configure() 306 sriov->num_vfs = pci_num_vf(pdev); in mlx5_sriov_init() [all …]
|
| A D | eswitch.c | 1187 mlx5_esw_for_each_vf_vport(esw, i, vport, num_vfs) { in mlx5_eswitch_unload_vf_vports() 1214 mlx5_esw_for_each_vf_vport(esw, i, vport, num_vfs) { in mlx5_eswitch_load_vf_vports() 1223 mlx5_eswitch_unload_vf_vports(esw, num_vfs); in mlx5_eswitch_load_vf_vports() 1376 if (num_vfs < 0) in mlx5_eswitch_update_num_of_vfs() 1380 esw->esw_funcs.num_vfs = num_vfs; in mlx5_eswitch_update_num_of_vfs() 1391 esw->esw_funcs.num_ec_vfs = num_vfs; in mlx5_eswitch_update_num_of_vfs() 1484 mlx5_eswitch_update_num_of_vfs(esw, num_vfs); in mlx5_eswitch_enable_locked() 1544 ret = mlx5_eswitch_enable_locked(esw, num_vfs); in mlx5_eswitch_enable() 1557 esw->esw_funcs.num_vfs = num_vfs; in mlx5_eswitch_enable() 1561 esw->esw_funcs.num_ec_vfs = num_vfs; in mlx5_eswitch_enable() [all …]
|
| /drivers/net/ethernet/intel/fm10k/ |
| A D | fm10k_iov.c | 179 i = iov_data->num_vfs; in fm10k_iov_event() 287 int num_vfs, i; in fm10k_iov_suspend() local 290 num_vfs = iov_data ? iov_data->num_vfs : 0; in fm10k_iov_suspend() 332 int num_vfs, i; in fm10k_iov_resume() local 335 num_vfs = iov_data ? iov_data->num_vfs : 0; in fm10k_iov_resume() 348 hw->iov.ops.assign_resources(hw, num_vfs, num_vfs); in fm10k_iov_resume() 440 if (!num_vfs) in fm10k_iov_alloc_data() 450 iov_data->num_vfs = num_vfs; in fm10k_iov_alloc_data() 499 num_vfs = current_vfs; in fm10k_iov_configure() 511 if (num_vfs && num_vfs != current_vfs) { in fm10k_iov_configure() [all …]
|
| A D | fm10k_pf.c | 444 if (!hw->iov.num_vfs) in fm10k_update_int_moderator_pf() 586 u16 num_vfs = hw->iov.num_vfs; in fm10k_vf_queue_index() local 632 if ((num_vfs > num_pools) || (num_vfs > hw->iov.total_vfs)) in fm10k_iov_assign_resources_pf() 636 hw->iov.num_vfs = num_vfs; in fm10k_iov_assign_resources_pf() 649 for (i = 0; i < num_vfs; i++) { in fm10k_iov_assign_resources_pf() 687 for (i = 0; i < num_vfs; i++) { in fm10k_iov_assign_resources_pf() 742 if (vf_idx >= hw->iov.num_vfs) in fm10k_iov_configure_tc_pf() 800 if (vf_idx >= hw->iov.num_vfs) in fm10k_iov_assign_int_moderator_pf() 814 if (vf_idx == (hw->iov.num_vfs - 1)) in fm10k_iov_assign_int_moderator_pf() 953 if (vf_idx >= hw->iov.num_vfs) in fm10k_iov_reset_resources_pf() [all …]
|
| /drivers/net/ethernet/sfc/ |
| A D | ef100_sriov.c | 16 static int efx_ef100_pci_sriov_enable(struct efx_nic *efx, int num_vfs) in efx_ef100_pci_sriov_enable() argument 23 efx->vf_count = num_vfs; in efx_ef100_pci_sriov_enable() 24 rc = pci_enable_sriov(dev, num_vfs); in efx_ef100_pci_sriov_enable() 31 for (i = 0; i < num_vfs; i++) { in efx_ef100_pci_sriov_enable() 66 int efx_ef100_sriov_configure(struct efx_nic *efx, int num_vfs) in efx_ef100_sriov_configure() argument 68 if (num_vfs == 0) in efx_ef100_sriov_configure() 71 return efx_ef100_pci_sriov_enable(efx, num_vfs); in efx_ef100_sriov_configure()
|
| /drivers/crypto/intel/qat/qat_common/ |
| A D | adf_pfvf_pf_msg.c | 17 int i, num_vfs = pci_num_vf(accel_to_pci_dev(accel_dev)); in adf_pf2vf_notify_restarting() local 20 for (i = 0, vf = accel_dev->pf.vf_info; i < num_vfs; i++, vf++) { in adf_pf2vf_notify_restarting() 37 int num_vfs = pci_num_vf(accel_to_pci_dev(accel_dev)); in adf_pf2vf_wait_for_restarting_complete() local 45 for (i = 0, vf = accel_dev->pf.vf_info; i < num_vfs; i++, vf++) in adf_pf2vf_wait_for_restarting_complete() 60 int i, num_vfs = pci_num_vf(accel_to_pci_dev(accel_dev)); in adf_pf2vf_notify_restarted() local 64 for (i = 0, vf = accel_dev->pf.vf_info; i < num_vfs; i++, vf++) { in adf_pf2vf_notify_restarted() 75 int i, num_vfs = pci_num_vf(accel_to_pci_dev(accel_dev)); in adf_pf2vf_notify_fatal_error() local 79 for (i = 0, vf = accel_dev->pf.vf_info; i < num_vfs; i++, vf++) { in adf_pf2vf_notify_fatal_error()
|
| /drivers/net/ethernet/intel/ixgbe/ |
| A D | ixgbe_sriov.c | 26 unsigned int num_vfs) in ixgbe_alloc_vf_macvlans() argument 53 unsigned int num_vfs) in __ixgbe_enable_sriov() argument 73 adapter->num_vfs = num_vfs; in __ixgbe_enable_sriov() 86 } else if (num_vfs < 32) { in __ixgbe_enable_sriov() 145 if (vf >= adapter->num_vfs) in ixgbe_get_vfs() 159 unsigned int num_vfs; in ixgbe_enable_sriov() local 209 unsigned int num_vfs = adapter->num_vfs, vf; in ixgbe_disable_sriov() local 216 adapter->num_vfs = 0; in ixgbe_disable_sriov() 287 return num_vfs; in ixgbe_pci_sriov_enable() 333 return num_vfs; in ixgbe_pci_sriov_enable() [all …]
|
| /drivers/net/ethernet/pensando/ionic/ |
| A D | ionic_bus_pci.c | 134 ionic->num_vfs = 0; in ionic_vf_dealloc_locked() 159 for (i = 0; i < num_vfs; i++) { in ionic_vf_alloc() 169 ionic->num_vfs++; in ionic_vf_alloc() 193 if (num_vfs > 0) { in ionic_sriov_configure() 194 ret = pci_enable_sriov(pdev, num_vfs); in ionic_sriov_configure() 200 ret = ionic_vf_alloc(ionic, num_vfs); in ionic_sriov_configure() 207 ret = num_vfs; in ionic_sriov_configure() 309 int num_vfs; in ionic_probe() local 358 num_vfs = pci_num_vf(pdev); in ionic_probe() 359 if (num_vfs) { in ionic_probe() [all …]
|
| /drivers/net/ethernet/wangxun/libwx/ |
| A D | wx_sriov.c | 31 (WX_MAX_PF_MACVLANS + 1 + num_vfs); in wx_alloc_vf_macvlans() 53 wx->num_vfs = 0; in wx_sriov_clear_data() 103 for (i = 0; i < num_vfs; i++) { in __wx_enable_sriov() 116 if (num_vfs < 32) in __wx_enable_sriov() 148 int num_vfs) in wx_pci_sriov_enable() argument 157 wx->num_vfs = num_vfs; in wx_pci_sriov_enable() 158 for (i = 0; i < wx->num_vfs; i++) in wx_pci_sriov_enable() 170 return num_vfs; in wx_pci_sriov_enable() 189 if (!num_vfs) { in wx_pci_sriov_configure() 203 return num_vfs; in wx_pci_sriov_configure() [all …]
|
| /drivers/net/ethernet/intel/ice/ |
| A D | ice_sriov.c | 379 if (!num_vfs) in ice_set_per_vf_res() 396 num_vfs); in ice_set_per_vf_res() 418 ICE_MIN_QS_PER_VF, num_vfs); in ice_set_per_vf_res() 763 num_vfs, ret); in ice_ena_vfs() 770 num_vfs); in ice_ena_vfs() 815 if (!num_vfs) { in ice_pci_sriov_ena() 822 num_vfs, pf->vfs.num_supported); in ice_pci_sriov_ena() 827 err = ice_ena_vfs(pf, num_vfs); in ice_pci_sriov_ena() 1049 if (!num_vfs) { in ice_sriov_configure() 1059 err = ice_pci_sriov_ena(pf, num_vfs); in ice_sriov_configure() [all …]
|
| /drivers/net/ethernet/qlogic/qlcnic/ |
| A D | qlcnic_sriov_pf.c | 75 u32 num_vfs, max, temp; in qlcnic_sriov_pf_cal_res_limit() local 81 num_vfs = sriov->num_vfs; in qlcnic_sriov_pf_cal_res_limit() 82 max = num_vfs + 1; in qlcnic_sriov_pf_cal_res_limit() 581 int num_vfs) in __qlcnic_pci_sriov_enable() argument 647 return num_vfs; in qlcnic_pci_sriov_enable() 675 if (num_vfs == 0) in qlcnic_pci_sriov_configure() 1767 u16 num_vfs = sriov->num_vfs; in qlcnic_sriov_pf_reset() local 1806 int i, num_vfs; in qlcnic_sriov_set_vf_mac() local 1813 num_vfs = sriov->num_vfs; in qlcnic_sriov_set_vf_mac() 1862 if (vf >= sriov->num_vfs) in qlcnic_sriov_set_vf_tx_rate() [all …]
|
| /drivers/net/ethernet/netronome/nfp/ |
| A D | nfp_main.c | 249 if (num_vfs > pf->limit_vfs) { in nfp_pcie_sriov_enable() 255 err = pci_enable_sriov(pdev, num_vfs); in nfp_pcie_sriov_enable() 264 err = nfp_app_sriov_enable(pf->app, num_vfs); in nfp_pcie_sriov_enable() 272 pf->num_vfs = num_vfs; in nfp_pcie_sriov_enable() 277 return num_vfs; in nfp_pcie_sriov_enable() 308 pf->num_vfs = 0; in nfp_pcie_sriov_disable() 323 if (num_vfs == 0) in nfp_pcie_sriov_configure() 326 return nfp_pcie_sriov_enable(pdev, num_vfs); in nfp_pcie_sriov_configure() 847 pf->num_vfs = pci_num_vf(pdev); in nfp_pci_probe() 848 if (pf->num_vfs > pf->limit_vfs) { in nfp_pci_probe() [all …]
|
| /drivers/pci/ |
| A D | iov.c | 446 u16 num_vfs; in sriov_numvfs_show() local 450 num_vfs = pdev->sriov->num_VFs; in sriov_numvfs_show() 469 u16 num_vfs; in sriov_numvfs_store() local 471 if (kstrtou16(buf, 0, &num_vfs) < 0) in sriov_numvfs_store() 496 if (num_vfs == 0) { in sriov_numvfs_store() 505 pdev->sriov->num_VFs, num_vfs); in sriov_numvfs_store() 514 if (ret != num_vfs) in sriov_numvfs_store() 516 num_vfs, ret); in sriov_numvfs_store() 632 for (i = 0; i < num_vfs; i++) { in sriov_add_vfs() 1380 if (!num_vfs) in pci_iov_vf_bar_get_sizes() [all …]
|
| /drivers/net/ethernet/huawei/hinic/ |
| A D | hinic_sriov.c | 604 if (vf >= sriov_info->num_vfs) in hinic_ndo_get_vf_config() 837 if (vf >= sriov_info->num_vfs) in hinic_ndo_set_vf_trust() 870 nic_dev->sriov_info.num_vfs); in hinic_ndo_set_vf_bw() 956 if (vf >= sriov_info->num_vfs) in hinic_ndo_set_vf_spoofchk() 1020 if (vf_id >= sriov_info->num_vfs) { in hinic_ndo_set_vf_link_state() 1302 tmp_vfs = (u16)sriov_info->num_vfs; in hinic_pci_sriov_disable() 1303 sriov_info->num_vfs = 0; in hinic_pci_sriov_disable() 1322 num_vfs); in hinic_pci_sriov_enable() 1345 sriov_info->num_vfs = num_vfs; in hinic_pci_sriov_enable() 1348 return num_vfs; in hinic_pci_sriov_enable() [all …]
|
| /drivers/crypto/cavium/cpt/ |
| A D | cptpf_main.c | 19 static u32 num_vfs = 4; /* Default 4 VF enabled */ variable 20 module_param(num_vfs, uint, 0444); 21 MODULE_PARM_DESC(num_vfs, "Number of VFs to enable(1-16)"); 504 static int cpt_sriov_init(struct cpt_device *cpt, int num_vfs) in cpt_sriov_init() argument 517 cpt->num_vf_en = num_vfs; /* User requested VFs */ in cpt_sriov_init() 550 if (num_vfs > 16 || num_vfs < 4) { in cpt_probe() 552 num_vfs); in cpt_probe() 553 num_vfs = 4; in cpt_probe() 602 err = cpt_sriov_init(cpt, num_vfs); in cpt_probe()
|
| /drivers/net/ethernet/cavium/liquidio/ |
| A D | lio_vf_rep.c | 493 int i, num_vfs; in lio_vf_rep_create() local 501 num_vfs = oct->sriov_info.num_vfs_alloced; in lio_vf_rep_create() 503 oct->vf_rep_list.num_vfs = 0; in lio_vf_rep_create() 504 for (i = 0; i < num_vfs; i++) { in lio_vf_rep_create() 542 oct->vf_rep_list.num_vfs++; in lio_vf_rep_create() 557 for (i = 0; i < oct->vf_rep_list.num_vfs; i++) { in lio_vf_rep_create() 569 oct->vf_rep_list.num_vfs = 0; in lio_vf_rep_create() 587 for (i = 0; i < oct->vf_rep_list.num_vfs; i++) { in lio_vf_rep_destroy() 602 oct->vf_rep_list.num_vfs = 0; in lio_vf_rep_destroy()
|
| /drivers/net/ethernet/amd/pds_core/ |
| A D | main.c | 142 static int pdsc_sriov_configure(struct pci_dev *pdev, int num_vfs) in pdsc_sriov_configure() argument 148 if (num_vfs > 0) { in pdsc_sriov_configure() 149 pdsc->vfs = kcalloc(num_vfs, sizeof(struct pdsc_vf), in pdsc_sriov_configure() 153 pdsc->num_vfs = num_vfs; in pdsc_sriov_configure() 155 ret = pci_enable_sriov(pdev, num_vfs); in pdsc_sriov_configure() 162 return num_vfs; in pdsc_sriov_configure() 170 pdsc->num_vfs = 0; in pdsc_sriov_configure()
|