Lines Matching refs:sriov
24 return dev->bus->number + ((dev->devfn + dev->sriov->offset + in pci_iov_virtfn_bus()
25 dev->sriov->stride * vf_id) >> 8); in pci_iov_virtfn_bus()
32 return (dev->devfn + dev->sriov->offset + in pci_iov_virtfn_devfn()
33 dev->sriov->stride * vf_id) & 0xff; in pci_iov_virtfn_devfn()
44 struct pci_sriov *iov = dev->sriov; in pci_iov_set_numvfs()
60 struct pci_sriov *iov = dev->sriov; in compute_max_vf_buses()
111 return dev->sriov->barsz[resno - PCI_IOV_RESOURCES]; in pci_iov_resource_size()
128 &physfn->sriov->class); in pci_read_vf_config_common()
130 &physfn->sriov->hdr_type); in pci_read_vf_config_common()
132 &physfn->sriov->subsystem_vendor); in pci_read_vf_config_common()
134 &physfn->sriov->subsystem_device); in pci_read_vf_config_common()
145 struct pci_sriov *iov = dev->sriov; in pci_iov_add_virtfn()
258 return sprintf(buf, "%u\n", pdev->sriov->num_VFs); in sriov_numvfs_show()
285 if (num_vfs == pdev->sriov->num_VFs) in sriov_numvfs_store()
302 if (pdev->sriov->num_VFs) { in sriov_numvfs_store()
304 pdev->sriov->num_VFs, num_vfs); in sriov_numvfs_store()
332 return sprintf(buf, "%u\n", pdev->sriov->offset); in sriov_offset_show()
341 return sprintf(buf, "%u\n", pdev->sriov->stride); in sriov_stride_show()
350 return sprintf(buf, "%x\n", pdev->sriov->vf_device); in sriov_vf_device_show()
359 return sprintf(buf, "%u\n", pdev->sriov->drivers_autoprobe); in sriov_drivers_autoprobe_show()
372 pdev->sriov->drivers_autoprobe = drivers_autoprobe; in sriov_drivers_autoprobe_store()
449 struct pci_sriov *iov = dev->sriov; in sriov_enable()
553 struct pci_sriov *iov = dev->sriov; in sriov_del_vfs()
565 struct pci_sriov *iov = dev->sriov; in sriov_disable()
677 dev->sriov = iov; in sriov_init()
686 dev->sriov = NULL; in sriov_init()
700 BUG_ON(dev->sriov->num_VFs); in sriov_release()
702 if (dev != dev->sriov->dev) in sriov_release()
703 pci_dev_put(dev->sriov->dev); in sriov_release()
705 kfree(dev->sriov); in sriov_release()
706 dev->sriov = NULL; in sriov_release()
713 struct pci_sriov *iov = dev->sriov; in sriov_restore_state()
773 struct pci_sriov *iov = dev->sriov; in pci_iov_remove()
792 struct pci_sriov *iov = dev->is_physfn ? dev->sriov : NULL; in pci_iov_update_resource()
880 dev->sriov->drivers_autoprobe = auto_probe; in pci_vf_drivers_autoprobe()
898 if (dev->sriov->max_VF_buses > max) in pci_iov_bus_range()
899 max = dev->sriov->max_VF_buses; in pci_iov_bus_range()
949 return dev->sriov->num_VFs; in pci_num_vf()
974 dev_id = dev->sriov->vf_device; in pci_vfs_assigned()
1012 if (numvfs > dev->sriov->total_VFs) in pci_sriov_set_totalvfs()
1016 if (dev->sriov->ctrl & PCI_SRIOV_CTRL_VFE) in pci_sriov_set_totalvfs()
1019 dev->sriov->driver_max_VFs = numvfs; in pci_sriov_set_totalvfs()
1037 return dev->sriov->driver_max_VFs; in pci_sriov_get_totalvfs()