From e7a0d92b19f438011ad76c41755b56ec2ef05f64 Mon Sep 17 00:00:00 2001 From: Hidetoshi Seto Date: Mon, 7 Sep 2009 17:13:42 +0900 Subject: PCI: pcie, aer: report multiple/first error on a device Multiple bits might be set in the Uncorrectable Error Status register. But aer_print_error_source() only report a error of the lowest bit set in the error status register. So print strings for all bits unmasked and set. And check First Error Pointer to mark the error occured first. This FEP is not valid when the corresponing bit of the Uncorrectable Error Status register is not set, or unimplemented or undefined. Signed-off-by: Hidetoshi Seto Signed-off-by: Jesse Barnes --- drivers/pci/pcie/aer/aerdrv_errprint.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers/pci/pcie/aer/aerdrv_errprint.c') diff --git a/drivers/pci/pcie/aer/aerdrv_errprint.c b/drivers/pci/pcie/aer/aerdrv_errprint.c index 41bd1c753ac..0bb91e28d5f 100644 --- a/drivers/pci/pcie/aer/aerdrv_errprint.c +++ b/drivers/pci/pcie/aer/aerdrv_errprint.c @@ -169,11 +169,11 @@ static void aer_print_error_source(struct aer_err_info *info) errmsg = aer_uncorrectable_error_string[i]; if (errmsg) - AER_PR(info, "%s\t:\n", errmsg); + AER_PR(info, "%s\t: %s\n", errmsg, + info->first == i ? "First" : ""); else - AER_PR(info, "Unknown Error Bit %2d \t:\n", i); - - break; + AER_PR(info, "Unknown Error Bit %2d \t: %s\n", + i, info->first == i ? "First" : ""); } } -- cgit v1.2.3-70-g09d2