Lines Matching refs:bus

35 	u8 bus;  member
50 unsigned int bus; member
66 struct pci_bus *bus; member
78 unsigned int bus, unsigned int devfn, in aer_error_init() argument
83 err->bus = bus; in aer_error_init()
89 static struct aer_error *__find_aer_error(u16 domain, unsigned int bus, in __find_aer_error() argument
96 bus == err->bus && in __find_aer_error()
106 int domain = pci_domain_nr(dev->bus); in __find_aer_error_by_dev()
109 return __find_aer_error((u16)domain, dev->bus->number, dev->devfn); in __find_aer_error_by_dev()
113 static struct pci_ops *__find_pci_bus_ops(struct pci_bus *bus) in __find_pci_bus_ops() argument
118 if (bus_ops->bus == bus) in __find_pci_bus_ops()
184 static int pci_read_aer(struct pci_bus *bus, unsigned int devfn, int where, in pci_read_aer() argument
196 domain = pci_domain_nr(bus); in pci_read_aer()
199 err = __find_aer_error((u16)domain, bus->number, devfn); in pci_read_aer()
210 ops = __find_pci_bus_ops(bus); in pci_read_aer()
212 return ops->read(bus, devfn, where, size, val); in pci_read_aer()
215 static int pci_write_aer(struct pci_bus *bus, unsigned int devfn, int where, in pci_write_aer() argument
228 domain = pci_domain_nr(bus); in pci_write_aer()
231 err = __find_aer_error((u16)domain, bus->number, devfn); in pci_write_aer()
245 ops = __find_pci_bus_ops(bus); in pci_write_aer()
247 return ops->write(bus, devfn, where, size, val); in pci_write_aer()
256 struct pci_bus *bus, in pci_bus_ops_init() argument
260 bus_ops->bus = bus; in pci_bus_ops_init()
264 static int pci_bus_set_aer_ops(struct pci_bus *bus) in pci_bus_set_aer_ops() argument
273 ops = pci_bus_set_ops(bus, &pci_ops_aer); in pci_bus_set_aer_ops()
277 pci_bus_ops_init(bus_ops, bus, ops); in pci_bus_set_aer_ops()
293 if (!dev->bus->self) in pcie_find_root_port()
295 dev = dev->bus->self; in pcie_find_root_port()
305 if (device->bus == &pcie_port_bus_type) { in find_aer_device_iter()
332 dev = pci_get_domain_bus_and_slot((int)einj->domain, einj->bus, devfn); in aer_inject()
386 aer_error_init(err, einj->domain, einj->bus, devfn, in aer_inject()
416 aer_error_init(rperr, pci_domain_nr(rpdev->bus), in aer_inject()
417 rpdev->bus->number, rpdev->devfn, in aer_inject()
427 rperr->source_id |= (einj->bus << 8) | devfn; in aer_inject()
440 rperr->source_id |= ((einj->bus << 8) | devfn) << 16; in aer_inject()
451 ret = pci_bus_set_aer_ops(dev->bus); in aer_inject()
454 ret = pci_bus_set_aer_ops(rpdev->bus); in aer_inject()
520 pci_bus_set_ops(bus_ops->bus, bus_ops->ops); in aer_inject_exit()