PCI: unconditionally clear AER uncorr status register during cleanup
authorAndrew Patterson <andrew.patterson@hp.com>
Thu, 3 Dec 2009 17:28:20 +0000 (10:28 -0700)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Sat, 5 Dec 2009 00:03:11 +0000 (16:03 -0800)
commit6cdfd995a65a52e05b99e3a72a9b979abe73b312
tree37b4f67ea9c156710976ad47ec79431c1320551b
parent575939cf548951dde8df0786899ea5a91bb669b2
PCI: unconditionally clear AER uncorr status register during cleanup

The current implementation of pci_cleanup_aer_uncorrect_error_status
only clears either fatal or non-fatal error status bits depending
on the state of the I/O channel. This implementation will then often
leave some bits set after PCI error recovery completes.  The uncleared bit
settings will then be falsely reported the next time an AER interrupt is
generated for that hierarchy. An easy way to illustrate this issue is to
use the aer-inject module to simultaneously inject both an uncorrectable
non-fatal and uncorrectable fatal error.  One of the errors will not be
cleared.

This patch resolves this issue by unconditionally clearing all bits in
the AER uncorrectable status register. All settings and corrective action
strategies are saved and determined before
pci_cleanup_aer_uncorrect_error_status is called, so this change should not
affect errory handling functionality.

Signed-off-by: Andrew Patterson <andrew.patterson@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
drivers/pci/pcie/aer/aerdrv_core.c