diff options
author | Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> | 2009-09-07 17:12:25 +0900 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-09-09 13:49:07 -0700 |
commit | 0d90c3ac0bb89acfbf481c8b06749b00eade6545 (patch) | |
tree | 1f8bb597f08231c1f715fa6d6c72fa21089c1fef /drivers/pci/pcie/aer/aerdrv_errprint.c | |
parent | 24dbb7beb2a207f423006c46830dfaacca5a1139 (diff) |
PCI: pcie, aer: refer mask state in mask register properly
ERR_{,UN}CORRECTABLE_ERROR_MASK are set of error bits which linux know,
set of PCI_ERR_COR_* and PCI_ERR_UNC_* defined in linux/pci_regs.h.
This masks make aerdrv not to report errors of unknown bit, while aerdrv
have ability to report such undefined errors as "Unknown Error Bit %2d".
OTOH aerdrv_errprint does not have any check of setting in mask register.
So it could report masked wrong error by finding bit in status without
knowing that the bit is masked in the mask register.
This patch changes aerdrv to use mask state in mask register propely
instead of defined/hardcoded ERR_{,UN}CORRECTABLE_ERROR_MASK.
This change prevents aerdrv from reporting masked error, and also enable
reporting unknown errors.
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Reviewed-by: Andrew Patterson <andrew.patterson@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/pcie/aer/aerdrv_errprint.c')
-rw-r--r-- | drivers/pci/pcie/aer/aerdrv_errprint.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/pci/pcie/aer/aerdrv_errprint.c b/drivers/pci/pcie/aer/aerdrv_errprint.c index 95c3f1ca8076..41bd1c753ace 100644 --- a/drivers/pci/pcie/aer/aerdrv_errprint.c +++ b/drivers/pci/pcie/aer/aerdrv_errprint.c @@ -154,11 +154,13 @@ static char *aer_agent_string[] = { static void aer_print_error_source(struct aer_err_info *info) { - int i; + int i, status; char *errmsg = NULL; + status = (info->status & ~info->mask); + for (i = 0; i < 32; i++) { - if (!(info->status & (1 << i))) + if (!(status & (1 << i))) continue; if (info->severity == AER_CORRECTABLE) |