summaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
authorRyan Grimm <grimm@linux.vnet.ibm.com>2015-01-19 12:52:50 -0500
committerMichael Ellerman <mpe@ellerman.id.au>2015-01-22 01:31:52 -0500
commit1212aa1c8c9ca34642f7737e1edaa96c9ce3d7dd (patch)
treebd2838b54d66c203e4e55db01299880aeb7e26a5 /drivers/misc
parent95bc11bcd1428afdb48400ec84dc6d5a83926138 (diff)
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')
-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)
926 if ((rc = init_implementation_adapter_regs(adapter, dev))) 926 if ((rc = init_implementation_adapter_regs(adapter, dev)))
927 goto err3; 927 goto err3;
928 928
929 if ((rc = pnv_phb_to_cxl(dev))) 929 if ((rc = pnv_phb_to_cxl_mode(dev, OPAL_PHB_CAPI_MODE_CAPI)))
930 goto err3; 930 goto err3;
931 931
932 /* If recovery happened, the last step is to turn on snooping.
933 * In the non-recovery case this has no effect */
934 if ((rc = pnv_phb_to_cxl_mode(dev, OPAL_PHB_CAPI_MODE_SNOOP_ON))) {
935 goto err3;
936 }
937
932 if ((rc = cxl_register_psl_err_irq(adapter))) 938 if ((rc = cxl_register_psl_err_irq(adapter)))
933 goto err3; 939 goto err3;
934 940