• Hidetoshi Seto's avatar
    PCI: pcie, aer: refer mask state in mask register properly · 0d90c3ac
    Hidetoshi Seto authored
    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: default avatarHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
    Reviewed-by: default avatarAndrew Patterson <andrew.patterson@hp.com>
    Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
    0d90c3ac
aerdrv_errprint.c 5.48 KB