init.c (cbecf716ca618fd44feda6bd9a64a8179d031fc5) | init.c (0c5afef7bf1fbda7e7883dc4b93f64f90003706f) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Intel I/OAT DMA Linux driver 4 * Copyright(c) 2004 - 2015 Intel Corporation. 5 */ 6 7#include <linux/init.h> 8#include <linux/module.h> --- 1349 unchanged lines hidden (view full) --- 1358 1359 err = pcim_iomap_regions(pdev, 1 << IOAT_MMIO_BAR, DRV_NAME); 1360 if (err) 1361 return err; 1362 iomap = pcim_iomap_table(pdev); 1363 if (!iomap) 1364 return -ENOMEM; 1365 | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Intel I/OAT DMA Linux driver 4 * Copyright(c) 2004 - 2015 Intel Corporation. 5 */ 6 7#include <linux/init.h> 8#include <linux/module.h> --- 1349 unchanged lines hidden (view full) --- 1358 1359 err = pcim_iomap_regions(pdev, 1 << IOAT_MMIO_BAR, DRV_NAME); 1360 if (err) 1361 return err; 1362 iomap = pcim_iomap_table(pdev); 1363 if (!iomap) 1364 return -ENOMEM; 1365 |
1366 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(64)); | 1366 err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64)); |
1367 if (err) | 1367 if (err) |
1368 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)); | 1368 err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); |
1369 if (err) 1370 return err; 1371 | 1369 if (err) 1370 return err; 1371 |
1372 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)); 1373 if (err) 1374 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)); 1375 if (err) 1376 return err; 1377 | |
1378 device = alloc_ioatdma(pdev, iomap[IOAT_MMIO_BAR]); 1379 if (!device) 1380 return -ENOMEM; 1381 pci_set_master(pdev); 1382 pci_set_drvdata(pdev, device); 1383 1384 device->version = readb(device->reg_base + IOAT_VER_OFFSET); 1385 if (device->version >= IOAT_VER_3_4) --- 78 unchanged lines hidden --- | 1372 device = alloc_ioatdma(pdev, iomap[IOAT_MMIO_BAR]); 1373 if (!device) 1374 return -ENOMEM; 1375 pci_set_master(pdev); 1376 pci_set_drvdata(pdev, device); 1377 1378 device->version = readb(device->reg_base + IOAT_VER_OFFSET); 1379 if (device->version >= IOAT_VER_3_4) --- 78 unchanged lines hidden --- |