summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Munsie <imunsie@au1.ibm.com>2016-07-13 17:17:02 -0400
committerMichael Ellerman <mpe@ellerman.id.au>2016-07-14 06:26:35 -0400
commit48b3adf33459c1c42766d9c2068a592216fe7812 (patch)
tree315d6af3ce690bcace65d8ad10a84868f888e1f9
parent4e56f858bdde5cbfb70f61baddfaa56a8ed851bf (diff)
cxl: Enable bus mastering for devices using CAPP DMA mode
Devices that use CAPP DMA mode (such as the Mellanox CX4) require bus master to be enabled in order for the CAPI traffic to flow. This should be harmless to enable for other cxl devices, so unconditionally enable it in the adapter init flow. 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>
-rw-r--r--drivers/misc/cxl/pci.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/misc/cxl/pci.c b/drivers/misc/cxl/pci.c
index 6ac6b05f41a4..deef9c75e73a 100644
--- a/drivers/misc/cxl/pci.c
+++ b/drivers/misc/cxl/pci.c
@@ -1264,6 +1264,9 @@ static int cxl_configure_adapter(struct cxl *adapter, struct pci_dev *dev)
1264 if ((rc = adapter->native->sl_ops->adapter_regs_init(adapter, dev))) 1264 if ((rc = adapter->native->sl_ops->adapter_regs_init(adapter, dev)))
1265 goto err; 1265 goto err;
1266 1266
1267 /* Required for devices using CAPP DMA mode, harmless for others */
1268 pci_set_master(dev);
1269
1267 if ((rc = pnv_phb_to_cxl_mode(dev, adapter->native->sl_ops->capi_mode))) 1270 if ((rc = pnv_phb_to_cxl_mode(dev, adapter->native->sl_ops->capi_mode)))
1268 goto err; 1271 goto err;
1269 1272