Lines Matching refs:bus
39 unsigned char bus; member
114 .seg = pci_domain_nr(dev->bus), in pcistub_device_release()
115 .bus = dev->bus->number, in pcistub_device_release()
152 static struct pcistub_device *pcistub_device_find(int domain, int bus, in pcistub_device_find() argument
162 && domain == pci_domain_nr(psdev->dev->bus) in pcistub_device_find()
163 && bus == psdev->dev->bus->number in pcistub_device_find()
201 int domain, int bus, in pcistub_get_pci_dev_by_slot() argument
212 && domain == pci_domain_nr(psdev->dev->bus) in pcistub_get_pci_dev_by_slot()
213 && bus == psdev->dev->bus->number in pcistub_get_pci_dev_by_slot()
320 for (; dev != NULL; dev = dev->bus->self) { in pcistub_match_one()
321 if (pci_domain_nr(dev->bus) == pdev_id->domain in pcistub_match_one()
322 && dev->bus->number == pdev_id->bus in pcistub_match_one()
327 if (dev == dev->bus->self) in pcistub_match_one()
399 .seg = pci_domain_nr(dev->bus), in pcistub_init_device()
400 .bus = dev->bus->number, in pcistub_init_device()
657 &aer_op->domain, &aer_op->bus, &aer_op->devfn); in common_process()
667 aer_cmd, aer_op->domain, aer_op->bus, aer_op->devfn); in common_process()
725 dev->bus->number, dev->devfn); in xen_pcibk_slot_reset()
728 psdev = pcistub_device_find(pci_domain_nr(dev->bus), in xen_pcibk_slot_reset()
729 dev->bus->number, in xen_pcibk_slot_reset()
783 dev->bus->number, dev->devfn); in xen_pcibk_mmio_enabled()
786 psdev = pcistub_device_find(pci_domain_nr(dev->bus), in xen_pcibk_mmio_enabled()
787 dev->bus->number, in xen_pcibk_mmio_enabled()
841 dev->bus->number, dev->devfn); in xen_pcibk_error_detected()
844 psdev = pcistub_device_find(pci_domain_nr(dev->bus), in xen_pcibk_error_detected()
845 dev->bus->number, in xen_pcibk_error_detected()
895 dev->bus->number, dev->devfn); in xen_pcibk_error_resume()
898 psdev = pcistub_device_find(pci_domain_nr(dev->bus), in xen_pcibk_error_resume()
899 dev->bus->number, in xen_pcibk_error_resume()
955 static inline int str_to_slot(const char *buf, int *domain, int *bus, in str_to_slot() argument
960 switch (sscanf(buf, " %x:%x:%x.%x %n", domain, bus, slot, func, in str_to_slot()
964 sscanf(buf, " %x:%x:%x.* %n", domain, bus, slot, &parsed); in str_to_slot()
968 sscanf(buf, " %x:%x:*.* %n", domain, bus, &parsed); in str_to_slot()
976 switch (sscanf(buf, " %x:%x.%x %n", bus, slot, func, &parsed)) { in str_to_slot()
979 sscanf(buf, " %x:%x.* %n", bus, slot, &parsed); in str_to_slot()
983 sscanf(buf, " %x:*.* %n", bus, &parsed); in str_to_slot()
992 static inline int str_to_quirk(const char *buf, int *domain, int *bus, int in str_to_quirk() argument
997 sscanf(buf, " %x:%x:%x.%x-%x:%x:%x %n", domain, bus, slot, func, in str_to_quirk()
1004 sscanf(buf, " %x:%x.%x-%x:%x:%x %n", bus, slot, func, reg, size, in str_to_quirk()
1012 static int pcistub_device_id_add(int domain, int bus, int slot, int func) in pcistub_device_id_add() argument
1020 rc = pcistub_device_id_add(domain, bus, slot, func); in pcistub_device_id_add()
1026 rc = pcistub_device_id_add(domain, bus, slot, func); in pcistub_device_id_add()
1036 || bus < 0 || bus > 0xff in pcistub_device_id_add()
1046 pci_dev_id->bus = bus; in pcistub_device_id_add()
1050 domain, bus, slot, func); in pcistub_device_id_add()
1059 static int pcistub_device_id_remove(int domain, int bus, int slot, int func) in pcistub_device_id_remove() argument
1068 if (pci_dev_id->domain == domain && pci_dev_id->bus == bus in pcistub_device_id_remove()
1080 domain, bus, slot, func); in pcistub_device_id_remove()
1088 static int pcistub_reg_add(int domain, int bus, int slot, int func, in pcistub_reg_add() argument
1100 psdev = pcistub_device_find(domain, bus, slot, func); in pcistub_reg_add()
1133 int domain, bus, slot, func; in pcistub_slot_add() local
1136 err = str_to_slot(buf, &domain, &bus, &slot, &func); in pcistub_slot_add()
1140 err = pcistub_device_id_add(domain, bus, slot, func); in pcistub_slot_add()
1152 int domain, bus, slot, func; in pcistub_slot_remove() local
1155 err = str_to_slot(buf, &domain, &bus, &slot, &func); in pcistub_slot_remove()
1159 err = pcistub_device_id_remove(domain, bus, slot, func); in pcistub_slot_remove()
1181 pci_dev_id->domain, pci_dev_id->bus, in pcistub_slot_show()
1226 int domain, bus, slot, func; in pcistub_irq_handler_switch() local
1229 err = str_to_slot(buf, &domain, &bus, &slot, &func); in pcistub_irq_handler_switch()
1233 psdev = pcistub_device_find(domain, bus, slot, func); in pcistub_irq_handler_switch()
1265 int domain, bus, slot, func, reg, size, mask; in pcistub_quirk_add() local
1268 err = str_to_quirk(buf, &domain, &bus, &slot, &func, ®, &size, in pcistub_quirk_add()
1273 err = pcistub_reg_add(domain, bus, slot, func, reg, size, mask); in pcistub_quirk_add()
1297 quirk->pdev->bus->number, in pcistub_quirk_show()
1330 int domain, bus, slot, func; in permissive_add() local
1335 err = str_to_slot(buf, &domain, &bus, &slot, &func); in permissive_add()
1339 psdev = pcistub_device_find(domain, bus, slot, func); in permissive_add()
1412 int domain, bus, slot, func; in pcistub_init() local
1421 &domain, &bus, &slot, &func, &parsed); in pcistub_init()
1427 &domain, &bus, &slot, &parsed); in pcistub_init()
1433 &domain, &bus, &parsed); in pcistub_init()
1441 &bus, &slot, &func, &parsed); in pcistub_init()
1447 &bus, &slot, &parsed); in pcistub_init()
1453 &bus, &parsed); in pcistub_init()
1461 err = pcistub_device_id_add(domain, bus, slot, func); in pcistub_init()