From 20aba4ed2e91e696c998ae8dfbebb370ed66811d Mon Sep 17 00:00:00 2001
From: Patrick Bruenn
Date: Mon, 26 Oct 2015 08:28:10 +0100
Subject: [PATCH] fix ccat startup stall. In case the dma memory was allocated
above 4 GB limit, CCAT is unable to access it. -> limit the dma_mask to
32-bit to omit this situation
---
devices/ccat/module.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/devices/ccat/module.c b/devices/ccat/module.c
index 78c68e8d..552dc860 100644
--- a/devices/ccat/module.c
+++ b/devices/ccat/module.c
@@ -288,9 +288,8 @@ static int ccat_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
goto cleanup_pci_device;
}
- if (!dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64))) {
- pr_debug("64 bit DMA supported, pci rev: %u\n", revision);
- } else if (!dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32))) {
+ /* CCAT is unable to access memory above 4 GB */
+ if (!dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32))) {
pr_debug("32 bit DMA supported, pci rev: %u\n", revision);
} else {
pr_warn("No suitable DMA available, pci rev: %u\n", revision);