summaryrefslogtreecommitdiffstats
path: root/drivers/misc/cxl/pci.c
diff options
context:
space:
mode:
authorRyan Grimm <grimm@linux.vnet.ibm.com>2015-01-19 18:52:50 +0100
committerMichael Ellerman <mpe@ellerman.id.au>2015-01-22 07:31:52 +0100
commit1212aa1c8c9ca34642f7737e1edaa96c9ce3d7dd (patch)
treebd2838b54d66c203e4e55db01299880aeb7e26a5 /drivers/misc/cxl/pci.c
parentcxl: Add image control to sysfs (diff)
downloadlinux-1212aa1c8c9ca34642f7737e1edaa96c9ce3d7dd.tar.xz
linux-1212aa1c8c9ca34642f7737e1edaa96c9ce3d7dd.zip
cxl: Enable CAPP recovery
Turning snoops on is the last step in CAPP recovery. Sapphire is expected to have reinitialized the PHB and done the previous recovery steps. Add mode argument to opal call to do this. Driver can turn snoops off although it does not currently. Signed-off-by: Ryan Grimm <grimm@linux.vnet.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.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/misc/cxl/pci.c b/drivers/misc/cxl/pci.c
index 014f4c928e4c..a4a4e0217eed 100644
--- a/drivers/misc/cxl/pci.c
+++ b/drivers/misc/cxl/pci.c
@@ -926,9 +926,15 @@ static struct cxl *cxl_init_adapter(struct pci_dev *dev)
if ((rc = init_implementation_adapter_regs(adapter, dev)))
goto err3;
- if ((rc = pnv_phb_to_cxl(dev)))
+ if ((rc = pnv_phb_to_cxl_mode(dev, OPAL_PHB_CAPI_MODE_CAPI)))
goto err3;
+ /* If recovery happened, the last step is to turn on snooping.
+ * In the non-recovery case this has no effect */
+ if ((rc = pnv_phb_to_cxl_mode(dev, OPAL_PHB_CAPI_MODE_SNOOP_ON))) {
+ goto err3;
+ }
+
if ((rc = cxl_register_psl_err_irq(adapter)))
goto err3;