Lines Matching refs:sriov
24 return dev->bus->number + ((dev->devfn + dev->sriov->offset + in virtfn_bus()
25 dev->sriov->stride * id) >> 8); in virtfn_bus()
30 return (dev->devfn + dev->sriov->offset + in virtfn_devfn()
31 dev->sriov->stride * id) & 0xff; in virtfn_devfn()
68 struct pci_sriov *iov = dev->sriov; in virtfn_add()
71 mutex_lock(&iov->dev->sriov->lock); in virtfn_add()
107 mutex_unlock(&iov->dev->sriov->lock); in virtfn_add()
127 mutex_lock(&iov->dev->sriov->lock); in virtfn_add()
132 mutex_unlock(&iov->dev->sriov->lock); in virtfn_add()
141 struct pci_sriov *iov = dev->sriov; in virtfn_remove()
164 mutex_lock(&iov->dev->sriov->lock); in virtfn_remove()
167 mutex_unlock(&iov->dev->sriov->lock); in virtfn_remove()
182 struct pci_sriov *iov = dev->sriov; in sriov_enable()
289 struct pci_sriov *iov = dev->sriov; in sriov_disable()
402 dev->sriov = iov; in sriov_init()
418 BUG_ON(dev->sriov->num_VFs); in sriov_release()
420 if (dev != dev->sriov->dev) in sriov_release()
421 pci_dev_put(dev->sriov->dev); in sriov_release()
423 mutex_destroy(&dev->sriov->lock); in sriov_release()
425 kfree(dev->sriov); in sriov_release()
426 dev->sriov = NULL; in sriov_release()
433 struct pci_sriov *iov = dev->sriov; in sriov_restore_state()
497 return dev->sriov->pos + PCI_SRIOV_BAR + in pci_iov_resource_bar()
550 busnr = virtfn_bus(dev, dev->sriov->total_VFs - 1); in pci_iov_bus_range()
602 return dev->sriov->num_VFs; in pci_num_vf()
627 pci_read_config_word(dev, dev->sriov->pos + PCI_SRIOV_VF_DID, &dev_id); in pci_vfs_assigned()
664 if (numvfs > dev->sriov->total_VFs) in pci_sriov_set_totalvfs()
668 if (dev->sriov->ctrl & PCI_SRIOV_CTRL_VFE) in pci_sriov_set_totalvfs()
671 dev->sriov->driver_max_VFs = numvfs; in pci_sriov_set_totalvfs()
690 if (dev->sriov->driver_max_VFs) in pci_sriov_get_totalvfs()
691 return dev->sriov->driver_max_VFs; in pci_sriov_get_totalvfs()
693 return dev->sriov->total_VFs; in pci_sriov_get_totalvfs()