Skip to content

Commit b3741ac

Browse files
ktbowman-amddjbw
authored andcommitted
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: f05fd10 ("cxl/pci: Add RCH downstream port AER register discovery") Signed-off-by: Terry Bowman <[email protected]> Reviewed-by: Smita Koralahalli <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dan Williams <[email protected]>
1 parent 5d09c63 commit b3741ac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/cxl/core/pci.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,7 @@ static void cxl_disable_rch_root_ints(struct cxl_dport *dport)
810810
* the root cmd register's interrupts is required. But, PCI spec
811811
* shows these are disabled by default on reset.
812812
*/
813-
if (bridge->native_cxl_error) {
813+
if (bridge->native_aer) {
814814
aer_cmd_mask = (PCI_ERR_ROOT_CMD_COR_EN |
815815
PCI_ERR_ROOT_CMD_NONFATAL_EN |
816816
PCI_ERR_ROOT_CMD_FATAL_EN);
@@ -826,7 +826,7 @@ void cxl_setup_parent_dport(struct device *host, struct cxl_dport *dport)
826826
struct pci_host_bridge *host_bridge;
827827

828828
host_bridge = to_pci_host_bridge(dport_dev);
829-
if (host_bridge->native_cxl_error)
829+
if (host_bridge->native_aer)
830830
dport->rcrb.aer_cap = cxl_rcrb_to_aer(dport_dev, dport->rcrb.base);
831831

832832
dport->reg_map.host = host;

0 commit comments

Comments
 (0)