diff options
author | Smita Koralahalli <[email protected]> | 2023-08-23 23:43:03 +0000 |
---|---|---|
committer | Dan Williams <[email protected]> | 2023-09-11 15:23:20 -0700 |
commit | 0339dc39a521ead3dbcf101acd8c028c61db57dc (patch) | |
tree | 17fdac4afd41ff10c81cbdac3a3662d991e41efc | |
parent | 0bb80ecc33a8fb5a682236443c1e740d5c917d1d (diff) |
cxl/pci: Fix appropriate checking for _OSC while handling CXL RAS registers
cxl_pci fails to unmask CXL protocol errors when CXL memory error reporting
is not granted native control. Given that CXL memory error reporting uses
the event interface and protocol errors use AER, unmask protocol errors
based only on the native AER setting. Without this change end user
deployments will fail to report protocol errors in the case where native
memory error handling is not granted to Linux.
Also, return zero instead of an error code to not block the communication
with the cxl device when in native memory error reporting mode.
Fixes: 248529edc86f ("cxl: add RAS status unmasking for CXL")
Cc: <[email protected]>
Signed-off-by: Smita Koralahalli <[email protected]>
Reviewed-by: Robert Richter <[email protected]>
Reviewed-by: Jonathan Cameron <[email protected]>
Reviewed-by: Dave Jiang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dan Williams <[email protected]>
-rw-r--r-- | drivers/cxl/pci.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/cxl/pci.c b/drivers/cxl/pci.c index 1cb1494c28fe..2323169b6e5f 100644 --- a/drivers/cxl/pci.c +++ b/drivers/cxl/pci.c @@ -541,9 +541,9 @@ static int cxl_pci_ras_unmask(struct pci_dev *pdev) return 0; } - /* BIOS has CXL error control */ - if (!host_bridge->native_cxl_error) - return -ENXIO; + /* BIOS has PCIe AER error control */ + if (!host_bridge->native_aer) + return 0; rc = pcie_capability_read_word(pdev, PCI_EXP_DEVCTL, &cap); if (rc) |