Merge branch 'misc.namei' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[linux-2.6-microblaze.git] / drivers / ntb / hw / idt / ntb_hw_idt.c
index e7a4c2a..7335572 100644 (file)
@@ -2640,26 +2640,15 @@ static int idt_init_pci(struct idt_ntb_dev *ndev)
        int ret;
 
        /* Initialize the bit mask of PCI/NTB DMA */
-       ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
+       ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
        if (ret != 0) {
-               ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
+               ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
                if (ret != 0) {
                        dev_err(&pdev->dev, "Failed to set DMA bit mask\n");
                        return ret;
                }
                dev_warn(&pdev->dev, "Cannot set DMA highmem bit mask\n");
        }
-       ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
-       if (ret != 0) {
-               ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
-               if (ret != 0) {
-                       dev_err(&pdev->dev,
-                               "Failed to set consistent DMA bit mask\n");
-                       return ret;
-               }
-               dev_warn(&pdev->dev,
-                       "Cannot set consistent DMA highmem bit mask\n");
-       }
 
        /*
         * Enable the device advanced error reporting. It's not critical to