aboutsummaryrefslogtreecommitdiff
path: root/drivers/pci/pcie/aer_inject.c
AgeCommit message (Collapse)AuthorFilesLines
2019-05-09PCI/AER: Log messages with pci_dev, not pcie_deviceFrederick Lawler1-10/+10
Log messages with pci_dev, not pcie_device. Factor out common message prefixes with dev_fmt(). Example output change: - aer 0000:00:00.0:pci002: AER enabled with IRQ ... + pcieport 0000:00:00.0: AER: enabled with IRQ ... Link: https://lore.kernel.org/lkml/[email protected] Signed-off-by: Frederick Lawler <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: Keith Busch <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]>
2018-10-18PCI/AER: Refactor error injection fallbacksKeith Busch1-28/+38
Move the bus ops fallback into separate functions. No functional change here. Signed-off-by: Keith Busch <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
2018-10-18PCI/AER: Abstract AER interrupt handlingKeith Busch1-1/+4
The aer_inject module was directly calling aer_irq(). This required the AER driver export its private IRQ handler for no other reason than to support error injection. A driver should not have to expose its private interfaces, so use the IRQ subsystem to route injection to the AER driver, and make aer_irq() a private interface. This provides additional benefits: First, directly calling the IRQ handler bypassed the IRQ subsytem so the injection wasn't really synthesizing what happens if a shared AER interrupt occurs. The error injection had to provide the callback data directly, which may be racing with a removal that is freeing that structure. The IRQ subsystem can handle that race. Finally, using the IRQ subsystem automatically reacts to threaded IRQs, keeping the error injection abstracted from that implementation detail. Signed-off-by: Keith Busch <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
2018-10-18PCI/AER: Reuse existing pcie_port_find_device() interfaceKeith Busch1-21/+4
The port services driver already provides a method to find the pcie_device for a service. Export that function, use it from the aer_inject module, and remove the duplicate functionality. Signed-off-by: Keith Busch <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
2018-06-11PCI/AER: Hoist aerdrv.c, aer_inject.c up to drivers/pci/pcie/Bjorn Helgaas1-0/+551
Hoist aerdrv.c, aer_inject.c up to drivers/pci/pcie/ so they're next to other PCIe service drivers. No functional change intended. Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: Keith Busch <[email protected]>