Lines Matching refs:pos
48 pci_write_config_word(dev, iov->pos + PCI_SRIOV_NUM_VF, nr_virtfn); in pci_iov_set_numvfs()
49 pci_read_config_word(dev, iov->pos + PCI_SRIOV_VF_OFFSET, &iov->offset); in pci_iov_set_numvfs()
50 pci_read_config_word(dev, iov->pos + PCI_SRIOV_VF_STRIDE, &iov->stride); in pci_iov_set_numvfs()
138 pci_read_config_word(dev, iov->pos + PCI_SRIOV_VF_DID, &virtfn->device); in virtfn_add()
256 pci_read_config_word(dev, iov->pos + PCI_SRIOV_INITIAL_VF, &initial); in sriov_enable()
309 pci_write_config_word(dev, iov->pos + PCI_SRIOV_CTRL, iov->ctrl); in sriov_enable()
342 pci_write_config_word(dev, iov->pos + PCI_SRIOV_CTRL, iov->ctrl); in sriov_enable()
368 pci_write_config_word(dev, iov->pos + PCI_SRIOV_CTRL, iov->ctrl); in sriov_disable()
379 static int sriov_init(struct pci_dev *dev, int pos) in sriov_init() argument
394 pci_read_config_word(dev, pos + PCI_SRIOV_CTRL, &ctrl); in sriov_init()
396 pci_write_config_word(dev, pos + PCI_SRIOV_CTRL, 0); in sriov_init()
410 pci_write_config_word(dev, pos + PCI_SRIOV_CTRL, ctrl); in sriov_init()
412 pci_read_config_word(dev, pos + PCI_SRIOV_TOTAL_VF, &total); in sriov_init()
416 pci_read_config_dword(dev, pos + PCI_SRIOV_SUP_PGSIZE, &pgsz); in sriov_init()
423 pci_write_config_dword(dev, pos + PCI_SRIOV_SYS_PGSIZE, pgsz); in sriov_init()
440 pos + PCI_SRIOV_BAR + i * 4); in sriov_init()
455 iov->pos = pos; in sriov_init()
461 pci_read_config_dword(dev, pos + PCI_SRIOV_CAP, &iov->cap); in sriov_init()
462 pci_read_config_byte(dev, pos + PCI_SRIOV_FUNC_LINK, &iov->link); in sriov_init()
513 pci_read_config_word(dev, iov->pos + PCI_SRIOV_CTRL, &ctrl); in sriov_restore_state()
520 pci_write_config_dword(dev, iov->pos + PCI_SRIOV_SYS_PGSIZE, iov->pgsz); in sriov_restore_state()
522 pci_write_config_word(dev, iov->pos + PCI_SRIOV_CTRL, iov->ctrl); in sriov_restore_state()
535 int pos; in pci_iov_init() local
540 pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_SRIOV); in pci_iov_init()
541 if (pos) in pci_iov_init()
542 return sriov_init(dev, pos); in pci_iov_init()
571 return dev->sriov->pos + PCI_SRIOV_BAR + in pci_iov_resource_bar()
697 pci_read_config_word(dev, dev->sriov->pos + PCI_SRIOV_VF_DID, &dev_id); in pci_vfs_assigned()