| /linux/drivers/gpu/drm/xe/ |
| A D | xe_pci_sriov.c | 20 for (n = 1; n <= num_vfs; n++) in pf_needs_provisioning() 72 xe_assert(xe, num_vfs > 0); in pf_enable_vfs() 74 xe_sriov_dbg(xe, "enabling %u VF%s\n", num_vfs, str_plural(num_vfs)); in pf_enable_vfs() 97 return num_vfs; in pf_enable_vfs() 104 num_vfs, str_plural(num_vfs), ERR_PTR(err)); in pf_enable_vfs() 115 xe_sriov_dbg(xe, "disabling %u VF%s\n", num_vfs, str_plural(num_vfs)); in pf_disable_vfs() 117 if (!num_vfs) in pf_disable_vfs() 122 pf_reset_vfs(xe, num_vfs); in pf_disable_vfs() 129 xe_sriov_info(xe, "Disabled %u VF%s\n", num_vfs, str_plural(num_vfs)); in pf_disable_vfs() 153 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, 52 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 | 545 xe_gt_assert(gt, num_vfs); in pf_config_bulk_set_u64_done() 548 if (num_vfs == 1) in pf_config_bulk_set_u64_done() 588 if (!num_vfs) in xe_gt_sriov_pf_config_bulk_set_ggtt() 651 unsigned int num_vfs) in xe_gt_sriov_pf_config_set_fair_ggtt() argument 656 xe_gt_assert(gt, num_vfs); in xe_gt_sriov_pf_config_set_fair_ggtt() 867 if (num_vfs == 1) in pf_config_bulk_set_u32_done() 905 if (!num_vfs) in xe_gt_sriov_pf_config_bulk_set_ctxs() 951 unsigned int num_vfs) in xe_gt_sriov_pf_config_set_fair_ctxs() argument 1149 if (!num_vfs) in xe_gt_sriov_pf_config_bulk_set_dbs() 1496 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
|
| /linux/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 …]
|
| A D | nitrox_isr.h | 13 int nitrox_sriov_configure(struct pci_dev *pdev, int num_vfs); 15 static inline int nitrox_sriov_configure(struct pci_dev *pdev, int num_vfs) in nitrox_sriov_configure() argument
|
| /linux/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() 650 if (!num_vfs) in cptpf_sriov_disable() [all …]
|
| /linux/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() 1371 if (num_vfs < 0) in mlx5_eswitch_update_num_of_vfs() 1375 esw->esw_funcs.num_vfs = num_vfs; in mlx5_eswitch_update_num_of_vfs() 1386 esw->esw_funcs.num_ec_vfs = num_vfs; in mlx5_eswitch_update_num_of_vfs() 1479 mlx5_eswitch_update_num_of_vfs(esw, num_vfs); in mlx5_eswitch_enable_locked() 1536 ret = mlx5_eswitch_enable_locked(esw, num_vfs); in mlx5_eswitch_enable() 1549 esw->esw_funcs.num_vfs = num_vfs; in mlx5_eswitch_enable() 1553 esw->esw_funcs.num_ec_vfs = num_vfs; in mlx5_eswitch_enable() [all …]
|
| /linux/arch/powerpc/platforms/powernv/ |
| A D | pci-sriov.c | 454 for (j = 0; j < num_vfs; j++) { in pnv_pci_vf_assign_m64() 471 pnv_pci_vf_release_m64(pdev, num_vfs); in pnv_pci_vf_assign_m64() 508 u16 num_vfs; in pnv_pci_vf_resource_shift() local 523 num_vfs = iov->num_vfs; in pnv_pci_vf_resource_shift() 544 i, &res2, res, num_vfs, offset); in pnv_pci_vf_resource_shift() 570 num_vfs, offset); in pnv_pci_vf_resource_shift() 600 num_vfs = iov->num_vfs; in pnv_pci_sriov_disable() 611 pnv_pci_vf_release_m64(pdev, num_vfs); in pnv_pci_sriov_disable() 710 iov->num_vfs = num_vfs; in pnv_pci_sriov_enable() 731 pnv_ioda_setup_vf_PE(pdev, num_vfs); in pnv_pci_sriov_enable() [all …]
|
| /linux/drivers/net/ethernet/broadcom/bnxt/ |
| A D | bnxt_sriov.c | 581 vf_vnics = (vf_vnics - pf->max_vfs + num_vfs) / num_vfs; in bnxt_hwrm_func_vf_resc_cfg() 667 num_vfs; in bnxt_hwrm_func_cfg() 754 *num_vfs = 0; in bnxt_cfg_hw_sriov() 759 *num_vfs = rc; in bnxt_cfg_hw_sriov() 873 if (!num_vfs) in bnxt_sriov_disable() 884 num_vfs); in bnxt_sriov_disable() 921 num_vfs = 0; in bnxt_sriov_configure() 926 if (num_vfs && num_vfs == bp->pf.active_vfs) in bnxt_sriov_configure() 931 if (!num_vfs) in bnxt_sriov_configure() 940 return num_vfs; in bnxt_sriov_configure() [all …]
|
| A D | bnxt_vfr.c | 266 u16 num_vfs, i; in bnxt_vf_reps_close() local 271 num_vfs = pci_num_vf(bp->pdev); in bnxt_vf_reps_close() 272 for (i = 0; i < num_vfs; i++) { in bnxt_vf_reps_close() 315 u16 num_vfs = pci_num_vf(bp->pdev); in __bnxt_vf_reps_destroy() local 319 for (i = 0; i < num_vfs; i++) { in __bnxt_vf_reps_destroy() 383 u16 num_vfs = pci_num_vf(bp->pdev); in bnxt_vf_reps_free() local 389 for (i = 0; i < num_vfs; i++) in bnxt_vf_reps_free() 433 for (i = 0; i < num_vfs; i++) { in bnxt_vf_reps_alloc() 493 u16 *cfa_code_map = NULL, num_vfs = pci_num_vf(bp->pdev); in bnxt_vf_reps_create() local 501 bp->vf_reps = kcalloc(num_vfs, sizeof(vf_rep), GFP_KERNEL); in bnxt_vf_reps_create() [all …]
|
| /linux/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 …]
|
| /linux/arch/powerpc/platforms/pseries/ |
| A D | pci.c | 30 static int pseries_send_map_pe(struct pci_dev *pdev, u16 num_vfs, in pseries_send_map_pe() argument 50 num_vfs * sizeof(struct pe_map_bar_entry)); in pseries_send_map_pe() 76 static int pseries_associate_pes(struct pci_dev *pdev, u16 num_vfs) in pseries_associate_pes() argument 90 for (vf_index = 0; vf_index < num_vfs; vf_index++) { in pseries_associate_pes() 109 rc = pseries_send_map_pe(pdev, num_vfs, vf_pe_array); in pseries_associate_pes() 112 for (vf_index = 0; vf_index < num_vfs; vf_index++) in pseries_associate_pes() 135 if (max_config_vfs < num_vfs && num_vfs > MAX_VFS_FOR_MAP_PE) { in pseries_pci_sriov_enable() 138 num_vfs, (num_vfs > MAX_VFS_FOR_MAP_PE) ? in pseries_pci_sriov_enable() 144 pdn->pe_num_map = kmalloc_array(num_vfs, in pseries_pci_sriov_enable() 150 rc = pseries_associate_pes(pdev, num_vfs); in pseries_pci_sriov_enable() [all …]
|
| /linux/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()
|
| /linux/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()
|
| /linux/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 …]
|
| /linux/drivers/net/ethernet/intel/ixgbe/ |
| A D | ixgbe_sriov.c | 25 unsigned int num_vfs) in ixgbe_alloc_vf_macvlans() argument 52 unsigned int num_vfs) in __ixgbe_enable_sriov() argument 72 adapter->num_vfs = num_vfs; in __ixgbe_enable_sriov() 85 } else if (num_vfs < 32) { in __ixgbe_enable_sriov() 144 if (vf >= adapter->num_vfs) in ixgbe_get_vfs() 158 unsigned int num_vfs; in ixgbe_enable_sriov() local 208 unsigned int num_vfs = adapter->num_vfs, vf; in ixgbe_disable_sriov() local 214 adapter->num_vfs = 0; in ixgbe_disable_sriov() 282 return num_vfs; in ixgbe_pci_sriov_enable() 328 return num_vfs; in ixgbe_pci_sriov_enable() [all …]
|
| /linux/drivers/net/ethernet/intel/ice/ |
| A D | ice_sriov.c | 439 if (!num_vfs) in ice_set_per_vf_res() 457 num_vfs); in ice_set_per_vf_res() 479 ICE_MIN_QS_PER_VF, num_vfs); in ice_set_per_vf_res() 486 num_vfs, err); in ice_set_per_vf_res() 883 num_vfs, ret); in ice_ena_vfs() 890 num_vfs); in ice_ena_vfs() 936 if (!num_vfs) { in ice_pci_sriov_ena() 943 num_vfs, pf->vfs.num_supported); in ice_pci_sriov_ena() 948 err = ice_ena_vfs(pf, num_vfs); in ice_pci_sriov_ena() 1187 if (!num_vfs) { in ice_sriov_configure() [all …]
|
| /linux/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 …]
|
| /linux/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 …]
|
| /linux/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)"); 502 static int cpt_sriov_init(struct cpt_device *cpt, int num_vfs) in cpt_sriov_init() argument 515 cpt->num_vf_en = num_vfs; /* User requested VFs */ in cpt_sriov_init() 548 if (num_vfs > 16 || num_vfs < 4) { in cpt_probe() 550 num_vfs); in cpt_probe() 551 num_vfs = 4; in cpt_probe() 600 err = cpt_sriov_init(cpt, num_vfs); in cpt_probe()
|
| /linux/drivers/pci/ |
| A D | iov.c | 398 u16 num_vfs; in sriov_numvfs_show() local 402 num_vfs = pdev->sriov->num_VFs; in sriov_numvfs_show() 405 return sysfs_emit(buf, "%u\n", num_vfs); in sriov_numvfs_show() 421 u16 num_vfs; in sriov_numvfs_store() local 423 if (kstrtou16(buf, 0, &num_vfs) < 0) in sriov_numvfs_store() 431 if (num_vfs == pdev->sriov->num_VFs) in sriov_numvfs_store() 448 if (num_vfs == 0) { in sriov_numvfs_store() 457 pdev->sriov->num_VFs, num_vfs); in sriov_numvfs_store() 466 if (ret != num_vfs) in sriov_numvfs_store() 468 num_vfs, ret); in sriov_numvfs_store() [all …]
|
| /linux/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 …]
|