summaryrefslogtreecommitdiffstats
path: root/drivers/misc/cxl/vphb.c
diff options
context:
space:
mode:
authorChristophe Lombard <clombard@linux.vnet.ibm.com>2016-03-04 12:26:41 +0100
committerMichael Ellerman <mpe@ellerman.id.au>2016-03-09 23:40:00 +1100
commit0d400f77c19e8d2606f8194846bcf18ebdc9df2a (patch)
tree307436d00d93f55e2aa27d2233c91346c14e8961 /drivers/misc/cxl/vphb.c
parentd601ea918b878582e60b773f2f943d8d292b2abf (diff)
downloadop-kernel-dev-0d400f77c19e8d2606f8194846bcf18ebdc9df2a.zip
op-kernel-dev-0d400f77c19e8d2606f8194846bcf18ebdc9df2a.tar.gz
cxl: Adapter failure handling
Check the AFU state whenever an API is called. The hypervisor may issue a reset of the adapter when it detects a fault. When it happens, it launches an error recovery which will either move the AFU to a permanent failure state, or in the disabled state. If the AFU is found to be disabled, detach all existing contexts from it before issuing a AFU reset to re-enable it. Before detaching contexts, notify any kernel driver through the EEH callbacks of the AFU pci device. Co-authored-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com> Signed-off-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com> Signed-off-by: Christophe Lombard <clombard@linux.vnet.ibm.com> Reviewed-by: Manoj Kumar <manoj@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/vphb.c')
-rw-r--r--drivers/misc/cxl/vphb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/cxl/vphb.c b/drivers/misc/cxl/vphb.c
index c960a09..490b934 100644
--- a/drivers/misc/cxl/vphb.c
+++ b/drivers/misc/cxl/vphb.c
@@ -49,7 +49,7 @@ static bool cxl_pci_enable_device_hook(struct pci_dev *dev)
phb = pci_bus_to_host(dev->bus);
afu = (struct cxl_afu *)phb->private_data;
- if (!cxl_ops->link_ok(afu->adapter)) {
+ if (!cxl_ops->link_ok(afu->adapter, afu)) {
dev_warn(&dev->dev, "%s: Device link is down, refusing to enable AFU\n", __func__);
return false;
}
OpenPOWER on IntegriCloud