Lines Matching refs:iov
1094 struct bnx2x_sriov *iov = &bp->vfdb->sriov; in bnx2x_vf_bus() local
1096 return dev->bus->number + ((dev->devfn + iov->offset + in bnx2x_vf_bus()
1097 iov->stride * vfid) >> 8); in bnx2x_vf_bus()
1103 struct bnx2x_sriov *iov = &bp->vfdb->sriov; in bnx2x_vf_devfn() local
1105 return (dev->devfn + iov->offset + iov->stride * vfid) & 0xff; in bnx2x_vf_devfn()
1112 struct bnx2x_sriov *iov = &bp->vfdb->sriov; in bnx2x_vf_set_bars() local
1118 size /= iov->total; in bnx2x_vf_set_bars()
1167 static int bnx2x_sriov_pci_cfg_info(struct bnx2x *bp, struct bnx2x_sriov *iov) in bnx2x_sriov_pci_cfg_info() argument
1178 iov->pos = pos; in bnx2x_sriov_pci_cfg_info()
1180 pci_read_config_word(dev, pos + PCI_SRIOV_CTRL, &iov->ctrl); in bnx2x_sriov_pci_cfg_info()
1181 pci_read_config_word(dev, pos + PCI_SRIOV_TOTAL_VF, &iov->total); in bnx2x_sriov_pci_cfg_info()
1182 pci_read_config_word(dev, pos + PCI_SRIOV_INITIAL_VF, &iov->initial); in bnx2x_sriov_pci_cfg_info()
1183 pci_read_config_word(dev, pos + PCI_SRIOV_VF_OFFSET, &iov->offset); in bnx2x_sriov_pci_cfg_info()
1184 pci_read_config_word(dev, pos + PCI_SRIOV_VF_STRIDE, &iov->stride); in bnx2x_sriov_pci_cfg_info()
1185 pci_read_config_dword(dev, pos + PCI_SRIOV_SUP_PGSIZE, &iov->pgsz); in bnx2x_sriov_pci_cfg_info()
1186 pci_read_config_dword(dev, pos + PCI_SRIOV_CAP, &iov->cap); in bnx2x_sriov_pci_cfg_info()
1187 pci_read_config_byte(dev, pos + PCI_SRIOV_FUNC_LINK, &iov->link); in bnx2x_sriov_pci_cfg_info()
1192 static int bnx2x_sriov_info(struct bnx2x *bp, struct bnx2x_sriov *iov) in bnx2x_sriov_info() argument
1200 if (bnx2x_sriov_pci_cfg_info(bp, iov)) in bnx2x_sriov_info()
1204 iov->nres = 0; in bnx2x_sriov_info()
1208 iov->first_vf_in_pf = ((val & GRC_CR_PF_INIT_VF_PF_FIRST_VF_NUM_MASK) in bnx2x_sriov_info()
1214 iov->first_vf_in_pf, iov->nres, iov->cap, iov->ctrl, iov->total, in bnx2x_sriov_info()
1215 iov->initial, iov->nr_virtfn, iov->offset, iov->stride, iov->pgsz); in bnx2x_sriov_info()
1225 struct bnx2x_sriov *iov; in bnx2x_iov_init_one() local
1286 iov = &(bp->vfdb->sriov); in bnx2x_iov_init_one()
1287 err = bnx2x_sriov_info(bp, iov); in bnx2x_iov_init_one()
1292 if (iov->total == 0) in bnx2x_iov_init_one()
1295 iov->nr_virtfn = min_t(u16, iov->total, num_vfs_param); in bnx2x_iov_init_one()
1298 num_vfs_param, iov->nr_virtfn); in bnx2x_iov_init_one()
1312 bnx2x_vf(bp, i, abs_vfid) = iov->first_vf_in_pf + i; in bnx2x_iov_init_one()