cxl/pci: Fix appropriate checking for _OSC while handling CXL RAS registers
authorSmita Koralahalli <Smita.KoralahalliChannabasappa@amd.com>
Wed, 23 Aug 2023 23:43:03 +0000 (23:43 +0000)
committerDan Williams <dan.j.williams@intel.com>
Mon, 11 Sep 2023 22:23:20 +0000 (15:23 -0700)
commit0339dc39a521ead3dbcf101acd8c028c61db57dc
tree17fdac4afd41ff10c81cbdac3a3662d991e41efc
parent0bb80ecc33a8fb5a682236443c1e740d5c917d1d
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: <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>
drivers/cxl/pci.c