PCI/DPC: Fix print AER status in DPC event handling
authorDongdong Liu <liudongdong3@huawei.com>
Mon, 11 Feb 2019 07:02:59 +0000 (15:02 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Mar 2019 19:10:02 +0000 (20:10 +0100)
commit13a9d14fbf1b9b562cc08b3e8f966e145ed1b6bf
tree46cbdde7b5dd6b73a3609d100416d364dc367d69
parentc733cf4abfba34e54e83bcb4ac4733203647e339
PCI/DPC: Fix print AER status in DPC event handling

commit 9f08a5d896ce43380314c34ed3f264c8e6075b80 upstream.

Previously dpc_handler() called aer_get_device_error_info() without
initializing info->severity, so aer_get_device_error_info() relied on
uninitialized data.

Add dpc_get_aer_uncorrect_severity() to read the port's AER status, mask,
and severity registers and set info->severity.

Also, clear the port's AER fatal error status bits.

Fixes: 8aefa9b0d910 ("PCI/DPC: Print AER status in DPC event handling")
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
[bhelgaas: changelog]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Keith Busch <keith.busch@intel.com>
Cc: stable@vger.kernel.org # v4.19+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/pci/pcie/dpc.c