linux/drivers/pci
Vijay Mohan Pandarathil 918b405318 PCI/AER: Report success only when every device has AER-aware driver
When an error is detected on a PCIe device which does not have an
AER-aware driver, prevent AER infrastructure from reporting
successful error recovery.

This is because the report_error_detected() function that gets
called in the first phase of recovery process allows forward
progress even when the driver for the device does not have AER
capabilities. It seems that all callbacks (in pci_error_handlers
structure) registered by drivers that gets called during error
recovery are not mandatory. So the intention of the infrastructure
design seems to be to allow forward progress even when a specific
callback has not been registered by a driver. However, if error
handler structure itself has not been registered, it doesn't make
sense to allow forward progress.

As a result of the current design, in the case of a single device
having an AER-unaware driver or in the case of any function in a
multi-function card having an AER-unaware driver, a successful
recovery is reported.

Typical scenario this happens is when a PCI device is detached
from a KVM host and the pci-stub driver on the host claims the
device. The pci-stub driver does not have error handling capabilities
but the AER infrastructure still reports that the device recovered
successfully.

The changes proposed here leaves the device(s)in an unrecovered state
if the driver for the device or for any device in the subtree
does not have error handler structure registered. This reflects
the true state of the device and prevents any partial recovery (or no
recovery at all) reported as successful.

[bhelgaas: changelog]
Signed-off-by: Vijay Mohan Pandarathil <vijaymohan.pandarathil@hp.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Linas Vepstas <linasvepstas@gmail.com>
Reviewed-by: Myron Stowe <myron.stowe@redhat.com>
2012-11-26 14:46:28 -07:00
..
hotplug Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2012-10-06 03:16:12 +09:00
pcie PCI/AER: Report success only when every device has AER-aware driver 2012-11-26 14:46:28 -07:00
access.c PCI: Add accessors for PCI Express Capability 2012-08-23 09:41:20 -06:00
ats.c Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci 2012-01-11 18:50:26 -08:00
bus.c PCI: Use correct type when freeing bus resource list 2012-09-18 16:50:33 -06:00
host-bridge.c PCI: add host bridge release support 2012-04-30 14:52:43 -06:00
hotplug-pci.c PCI: hotplug: remove pci_do_scan_bus() 2012-06-13 15:42:27 -06:00
hotplug.c
htirq.c pci: Fix files needing export.h for EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:31:22 -04:00
ioapic.c PCI: Add GPL license for drivers/pci/ioapic module 2012-11-13 11:27:17 -07:00
iov.c Revert "PCI: Use hotplug-safe pci_get_domain_bus_and_slot()" 2012-09-20 17:10:54 -06:00
irq.c PCI: Convert dev_printk(KERN_<LEVEL> to dev_<level>( 2012-11-07 15:24:18 -07:00
Kconfig PCI: Drop bogus default from ARCH_SUPPORTS_MSI 2012-09-10 16:49:52 -06:00
Makefile PCI: build resource code for M68K architecture 2012-07-13 09:40:37 -06:00
msi.c x86/PCI: Expand the x86_msi_ops to have a restore MSIs. 2012-01-06 14:02:26 -08:00
msi.h PCI: MSI: Move MSI-X entry definition to pci_regs.h 2010-12-23 12:53:07 -08:00
of.c PCI: OF: Don't crash when bridge parent is NULL. 2011-08-19 08:51:37 -07:00
pci-acpi.c PCI / PM: Fix D3/D3cold/D4 messages printed by acpi_pci_set_power_state() 2012-08-15 11:46:18 -06:00
pci-driver.c PCI: Don't touch card regs after runtime suspend D3 2012-11-07 15:24:18 -07:00
pci-label.c switch ->is_visible() to returning umode_t 2012-01-03 22:54:55 -05:00
pci-stub.c PCI: Convert dev_printk(KERN_<LEVEL> to dev_<level>( 2012-11-07 15:24:18 -07:00
pci-sysfs.c PCI/PM: Fix config reg access for D3cold and bridge suspending 2012-08-21 17:34:24 -06:00
pci.c PCI/PM: Add comments for PME poll support for PCIe 2012-11-07 15:24:19 -07:00
pci.h Merge branch 'pci/rafael-pci_set_power_state-rebase' into next 2012-07-05 16:29:52 -06:00
probe.c Merge branch 'pci/yinghai-misc' into next 2012-09-24 17:24:11 -06:00
proc.c PCI: Remove unused, commented-out, code 2012-08-22 11:31:53 -06:00
quirks.c PCI: Add PLX PCI 9050 workaround for some Meilhaus DAQ cards 2012-11-07 15:24:19 -07:00
remove.c PCI: Stop all children first, before removing all children 2012-09-20 17:37:23 -06:00
rom.c PCI: Remove unused, commented-out, code 2012-08-22 11:31:53 -06:00
search.c Merge branch 'pci/feng-avoid-kmalloc' into next 2012-09-10 16:31:08 -06:00
setup-bus.c PCI: Refactor pbus_size_mem() 2012-09-11 16:59:46 -06:00
setup-irq.c PCI: Provide a default pcibios_update_irq() 2012-09-18 17:28:21 -06:00
setup-res.c Merge branch 'pci/nikhil-big-bar-fixes' into next 2012-07-18 14:06:20 -06:00
slot.c pci: add module.h to files implicitly relying on its presence. 2011-10-31 19:31:23 -04:00
syscall.c headers: smp_lock.h redux 2009-07-12 12:22:34 -07:00
vpd.c pci: Fix files needing export.h for EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:31:22 -04:00
xen-pcifront.c Features: 2012-10-02 22:09:10 -07:00