aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cxl
diff options
context:
space:
mode:
authorTerry Bowman <terry.bowman@amd.com>2023-11-02 10:52:32 -0500
committerDan Williams <dan.j.williams@intel.com>2023-11-02 14:09:01 -0700
commitb3741ac86c8e648709506102f7ab51905d50df43 (patch)
treed6ce6c2ac9cfd014901b0e9ee2e81912bb7815c8 /drivers/cxl
parent5d09c63f11f083707b60c8ea0bb420651c47740f (diff)
downloadlinux-b3741ac86c8e648709506102f7ab51905d50df43.tar.gz
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>
Diffstat (limited to 'drivers/cxl')
-rw-r--r--drivers/cxl/core/pci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/cxl/core/pci.c b/drivers/cxl/core/pci.c
index 8c26e9fefa46c..eff20e83d0a64 100644
--- a/drivers/cxl/core/pci.c
+++ b/drivers/cxl/core/pci.c
@@ -810,7 +810,7 @@ static void cxl_disable_rch_root_ints(struct cxl_dport *dport)
* the root cmd register's interrupts is required. But, PCI spec
* shows these are disabled by default on reset.
*/
- if (bridge->native_cxl_error) {
+ if (bridge->native_aer) {
aer_cmd_mask = (PCI_ERR_ROOT_CMD_COR_EN |
PCI_ERR_ROOT_CMD_NONFATAL_EN |
PCI_ERR_ROOT_CMD_FATAL_EN);
@@ -826,7 +826,7 @@ void cxl_setup_parent_dport(struct device *host, struct cxl_dport *dport)
struct pci_host_bridge *host_bridge;
host_bridge = to_pci_host_bridge(dport_dev);
- if (host_bridge->native_cxl_error)
+ if (host_bridge->native_aer)
dport->rcrb.aer_cap = cxl_rcrb_to_aer(dport_dev, dport->rcrb.base);
dport->reg_map.host = host;