cxl: Add checksum verification to CDAT from CXL
authorDave Jiang <dave.jiang@intel.com>
Thu, 12 Oct 2023 18:53:42 +0000 (11:53 -0700)
committerDan Williams <dan.j.williams@intel.com>
Sat, 28 Oct 2023 03:48:02 +0000 (20:48 -0700)
commit670e4e88f3b1a88a5a089be329b95c51592973ee
treeb6aebfb86086daa125bb37bc37899ebdd73d138e
parent529c0a44045e59c3c067f1f2c5887759644c50ae
cxl: Add checksum verification to CDAT from CXL

A CDAT table is available from a CXL device. The table is read by the
driver and cached in software. With the CXL subsystem needing to parse the
CDAT table, the checksum should be verified. Add checksum verification
after the CDAT table is read from device.

Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Davidlohr Bueso <dave@stgolabs.net>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/169713682277.2205276.2687265961314933628.stgit@djiang5-mobl3
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/cxl/core/pci.c