cxl/pci: Change CXL AER support check to use native AER
authorTerry Bowman <terry.bowman@amd.com>
Thu, 2 Nov 2023 15:52:32 +0000 (10:52 -0500)
committerDan Williams <dan.j.williams@intel.com>
Thu, 2 Nov 2023 21:09:01 +0000 (14:09 -0700)
commitb3741ac86c8e648709506102f7ab51905d50df43
treed6ce6c2ac9cfd014901b0e9ee2e81912bb7815c8
parent5d09c63f11f083707b60c8ea0bb420651c47740f
cxl/pci: Change CXL AER support check to use native AER

Native CXL protocol errors are delivered to the OS through AER
reporting. The owner of AER owns CXL Protocol error management with
respect to _OSC negotiation.[1] CXL device errors are handled by a
separate interrupt with native control gated by _OSC control field
'CXL Memory Error Reporting Control'.

The CXL driver incorrectly checks for 'CXL Memory Error Reporting
Control' before accessing AER registers and caching RCH downport
AER registers. Replace the current check in these 2 cases with
native AER checks.

[1] CXL 3.0 - 9.17.2 CXL _OSC, Table-9-26, Interpretation of CXL
_OSC Support Fields, p.641

Fixes: f05fd10d138d ("cxl/pci: Add RCH downstream port AER register discovery")
Signed-off-by: Terry Bowman <terry.bowman@amd.com>
Reviewed-by: Smita Koralahalli <Smita.KoralahalliChannabasappa@amd.com>
Link: https://lore.kernel.org/r/20231102155232.1421261-1-terry.bowman@amd.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/cxl/core/pci.c