diff options
author | Frederic Barrat <fbarrat@linux.vnet.ibm.com> | 2016-10-03 22:36:02 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2016-10-04 08:16:42 +0300 |
commit | aaa2245ed836824f21f8e42e0ab63b1637d1cb20 (patch) | |
tree | 8c330d717ea072f8ec77d35b2304d7d0ea196663 /drivers/misc/cxl/pci.c | |
parent | e2ad477cb26360532da7ee9ffc9631d6c0006a1d (diff) | |
download | linux-aaa2245ed836824f21f8e42e0ab63b1637d1cb20.tar.xz |
cxl: Flush PSL cache before resetting the adapter
If the capi link is going down while the PSL owns a dirty cache line,
any access from the host for that data could lead to an Uncorrectable
Error.
So when resetting the capi adapter through sysfs, make sure the PSL
cache is flushed. It won't help if there are any active Process
Elements on the card, as the cache would likely get new dirty cache
lines immediately, but if resetting an idle adapter, it should avoid
any bad surprises from data left over from terminated Process Elements.
Signed-off-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Acked-by: Ian Munsie <imunsie@au1.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'drivers/misc/cxl/pci.c')
-rw-r--r-- | drivers/misc/cxl/pci.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/misc/cxl/pci.c b/drivers/misc/cxl/pci.c index cd922a80bf97..7afad8477ad5 100644 --- a/drivers/misc/cxl/pci.c +++ b/drivers/misc/cxl/pci.c @@ -1239,6 +1239,9 @@ int cxl_pci_reset(struct cxl *adapter) dev_info(&dev->dev, "CXL reset\n"); + /* the adapter is about to be reset, so ignore errors */ + cxl_data_cache_flush(adapter); + /* pcie_warm_reset requests a fundamental pci reset which includes a * PERST assert/deassert. PERST triggers a loading of the image * if "user" or "factory" is selected in sysfs */ |