Skip to content

Commit 0339dc3

Browse files
skoralahdjbw
authored andcommitted
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: 248529e ("cxl: add RAS status unmasking for CXL") Cc: <stable@vger.kernel.org> Signed-off-by: Smita Koralahalli <Smita.KoralahalliChannabasappa@amd.com> Reviewed-by: Robert Richter <rrichter@amd.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Dave Jiang <dave.jiang@intel.com> Link: https://lore.kernel.org/r/20230823234305.27333-2-Smita.KoralahalliChannabasappa@amd.com Signed-off-by: Dan Williams <dan.j.williams@intel.com>
1 parent 0bb80ec commit 0339dc3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/cxl/pci.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -541,9 +541,9 @@ static int cxl_pci_ras_unmask(struct pci_dev *pdev)
541541
return 0;
542542
}
543543

544-
/* BIOS has CXL error control */
545-
if (!host_bridge->native_cxl_error)
546-
return -ENXIO;
544+
/* BIOS has PCIe AER error control */
545+
if (!host_bridge->native_aer)
546+
return 0;
547547

548548
rc = pcie_capability_read_word(pdev, PCI_EXP_DEVCTL, &cap);
549549
if (rc)

0 commit comments

Comments
 (0)