summaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2013-12-17 15:56:57 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-12-18 16:39:54 -0800
commit3ecfb168a51ddf0226abe245065516bc2ebfdef5 (patch)
tree2bd2229b70fedddf1f36ac4835b6afd3e96f4a05 /drivers/misc
parent479327fc42737234a1f76f20010334c99110d256 (diff)
downloadop-kernel-dev-3ecfb168a51ddf0226abe245065516bc2ebfdef5.zip
op-kernel-dev-3ecfb168a51ddf0226abe245065516bc2ebfdef5.tar.gz
mei: me: set dma mask using DMA mapping API
ME device is 64bit DMA capable We assume both coherent and consistent memory to match Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/mei/pci-me.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/misc/mei/pci-me.c b/drivers/misc/mei/pci-me.c
index 7dfaa32..8b1deea 100644
--- a/drivers/misc/mei/pci-me.c
+++ b/drivers/misc/mei/pci-me.c
@@ -144,6 +144,21 @@ static int mei_me_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
dev_err(&pdev->dev, "failed to get pci regions.\n");
goto disable_device;
}
+
+ if (dma_set_mask(&pdev->dev, DMA_BIT_MASK(64)) ||
+ dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(64))) {
+
+ err = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32));
+ if (err)
+ err = dma_set_coherent_mask(&pdev->dev,
+ DMA_BIT_MASK(32));
+ }
+ if (err) {
+ dev_err(&pdev->dev, "No usable DMA configuration, aborting\n");
+ goto release_regions;
+ }
+
+
/* allocates and initializes the mei dev structure */
dev = mei_me_dev_init(pdev);
if (!dev) {
OpenPOWER on IntegriCloud