fix ccat startup stall. In case the dma memory was allocated above 4 GB limit, CCAT is unable to access it. stable-1.5
authorPatrick Bruenn <p.bruenn@beckhoff.com>
Mon, 26 Oct 2015 08:28:10 +0100
branchstable-1.5
changeset 2637 1d9be5716dee
parent 2636 0613017547fe
child 2638 5995331a55fe
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
--- a/devices/ccat/module.c	Tue Oct 13 12:24:16 2015 +0200
+++ b/devices/ccat/module.c	Mon Oct 26 08:28:10 2015 +0100
@@ -288,9 +288,8 @@
 		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);