aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/cxl/pci.c
diff options
context:
space:
mode:
authorIan Munsie <imunsie@au1.ibm.com>2016-07-13 17:17:11 -0400
committerMichael Ellerman <mpe@ellerman.id.au>2016-07-14 06:28:07 -0400
commitf67a6722d650b864b020b19b3926e7152b55f1ff (patch)
tree8eabc5afd89218cfe78abbe624bea5bdcf48a927 /drivers/misc/cxl/pci.c
parenta2f67d5ee8d950caaa7a6144cf0bfb256500b73e (diff)
cxl: Workaround PE=0 hardware limitation in Mellanox CX4
The CX4 card cannot cope with a context with PE=0 due to a hardware limitation, resulting in: [ 34.166577] command failed, status limits exceeded(0x8), syndrome 0x5a7939 [ 34.166580] mlx5_core 0000:01:00.1: Failed allocating uar, aborting Since the kernel API allocates a default context very early during device init that will almost certainly get Process Element ID 0 there is no easy way for us to extend the API to allow the Mellanox to inform us of this limitation ahead of time. Instead, work around the issue by extending the XSL structure to include a minimum PE to allocate. Although the bug is not in the XSL, it is the easiest place to work around this limitation given that the CX4 is currently the only card that uses an XSL. Signed-off-by: Ian Munsie <imunsie@au1.ibm.com> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Reviewed-by: Frederic Barrat <fbarrat@linux.vnet.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.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/misc/cxl/pci.c b/drivers/misc/cxl/pci.c
index cb5d172fec1b..efe202f9cf72 100644
--- a/drivers/misc/cxl/pci.c
+++ b/drivers/misc/cxl/pci.c
@@ -1321,6 +1321,7 @@ static const struct cxl_service_layer_ops xsl_ops = {
1321 .write_timebase_ctrl = write_timebase_ctrl_xsl, 1321 .write_timebase_ctrl = write_timebase_ctrl_xsl,
1322 .timebase_read = timebase_read_xsl, 1322 .timebase_read = timebase_read_xsl,
1323 .capi_mode = OPAL_PHB_CAPI_MODE_DMA, 1323 .capi_mode = OPAL_PHB_CAPI_MODE_DMA,
1324 .min_pe = 1, /* Workaround for Mellanox CX4 HW bug */
1324}; 1325};
1325 1326
1326static void set_sl_ops(struct cxl *adapter, struct pci_dev *dev) 1327static void set_sl_ops(struct cxl *adapter, struct pci_dev *dev)