Lines Matching refs:iov

1044 	struct bnx2x_sriov *iov = &bp->vfdb->sriov;  in bnx2x_vf_bus()  local
1046 return dev->bus->number + ((dev->devfn + iov->offset + in bnx2x_vf_bus()
1047 iov->stride * vfid) >> 8); in bnx2x_vf_bus()
1053 struct bnx2x_sriov *iov = &bp->vfdb->sriov; in bnx2x_vf_devfn() local
1055 return (dev->devfn + iov->offset + iov->stride * vfid) & 0xff; in bnx2x_vf_devfn()
1062 struct bnx2x_sriov *iov = &bp->vfdb->sriov; in bnx2x_vf_set_bars() local
1068 size /= iov->total; in bnx2x_vf_set_bars()
1117 static int bnx2x_sriov_pci_cfg_info(struct bnx2x *bp, struct bnx2x_sriov *iov) in bnx2x_sriov_pci_cfg_info() argument
1128 iov->pos = pos; in bnx2x_sriov_pci_cfg_info()
1130 pci_read_config_word(dev, pos + PCI_SRIOV_CTRL, &iov->ctrl); in bnx2x_sriov_pci_cfg_info()
1131 pci_read_config_word(dev, pos + PCI_SRIOV_TOTAL_VF, &iov->total); in bnx2x_sriov_pci_cfg_info()
1132 pci_read_config_word(dev, pos + PCI_SRIOV_INITIAL_VF, &iov->initial); in bnx2x_sriov_pci_cfg_info()
1133 pci_read_config_word(dev, pos + PCI_SRIOV_VF_OFFSET, &iov->offset); in bnx2x_sriov_pci_cfg_info()
1134 pci_read_config_word(dev, pos + PCI_SRIOV_VF_STRIDE, &iov->stride); in bnx2x_sriov_pci_cfg_info()
1135 pci_read_config_dword(dev, pos + PCI_SRIOV_SUP_PGSIZE, &iov->pgsz); in bnx2x_sriov_pci_cfg_info()
1136 pci_read_config_dword(dev, pos + PCI_SRIOV_CAP, &iov->cap); in bnx2x_sriov_pci_cfg_info()
1137 pci_read_config_byte(dev, pos + PCI_SRIOV_FUNC_LINK, &iov->link); in bnx2x_sriov_pci_cfg_info()
1142 static int bnx2x_sriov_info(struct bnx2x *bp, struct bnx2x_sriov *iov) in bnx2x_sriov_info() argument
1150 if (bnx2x_sriov_pci_cfg_info(bp, iov)) in bnx2x_sriov_info()
1154 iov->nres = 0; in bnx2x_sriov_info()
1158 iov->first_vf_in_pf = ((val & GRC_CR_PF_INIT_VF_PF_FIRST_VF_NUM_MASK) in bnx2x_sriov_info()
1164 iov->first_vf_in_pf, iov->nres, iov->cap, iov->ctrl, iov->total, in bnx2x_sriov_info()
1165 iov->initial, iov->nr_virtfn, iov->offset, iov->stride, iov->pgsz); in bnx2x_sriov_info()
1175 struct bnx2x_sriov *iov; in bnx2x_iov_init_one() local
1236 iov = &(bp->vfdb->sriov); in bnx2x_iov_init_one()
1237 err = bnx2x_sriov_info(bp, iov); in bnx2x_iov_init_one()
1242 if (iov->total == 0) in bnx2x_iov_init_one()
1245 iov->nr_virtfn = min_t(u16, iov->total, num_vfs_param); in bnx2x_iov_init_one()
1248 num_vfs_param, iov->nr_virtfn); in bnx2x_iov_init_one()
1262 bnx2x_vf(bp, i, abs_vfid) = iov->first_vf_in_pf + i; in bnx2x_iov_init_one()