diff options
author | Mahesh Rajashekhara <mahesh.rajashekhara@microsemi.com> | 2017-04-05 16:14:16 +0530 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2017-04-26 18:28:06 -0400 |
commit | f481973d5efdb63b7c6ca6b0ecd2b8462556a461 (patch) | |
tree | bb254fe9f09a156d6b2768fd006bfc76d2cdb49f /drivers/scsi/aacraid/commctrl.c | |
parent | 6cf161150d815da0ee8cff158b185bc33dca3a34 (diff) |
scsi: aacraid: pci_alloc_consistent() failures on ARM64
There were pci_alloc_consistent() failures on ARM64 platform. Use
dma_alloc_coherent() with GFP_KERNEL flag DMA memory allocations.
Signed-off-by: Mahesh Rajashekhara <mahesh.rajashekhara@microsemi.com>
[hch: tweaked indentation, removed memsets]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Dave Carroll <david.carroll@microsemi.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/aacraid/commctrl.c')
-rw-r--r-- | drivers/scsi/aacraid/commctrl.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/scsi/aacraid/commctrl.c b/drivers/scsi/aacraid/commctrl.c index f6afd50579c0..d2f8d5954840 100644 --- a/drivers/scsi/aacraid/commctrl.c +++ b/drivers/scsi/aacraid/commctrl.c @@ -100,7 +100,8 @@ static int ioctl_send_fib(struct aac_dev * dev, void __user *arg) goto cleanup; } - kfib = pci_alloc_consistent(dev->pdev, size, &daddr); + kfib = dma_alloc_coherent(&dev->pdev->dev, size, &daddr, + GFP_KERNEL); if (!kfib) { retval = -ENOMEM; goto cleanup; @@ -160,7 +161,8 @@ static int ioctl_send_fib(struct aac_dev * dev, void __user *arg) retval = -EFAULT; cleanup: if (hw_fib) { - pci_free_consistent(dev->pdev, size, kfib, fibptr->hw_fib_pa); + dma_free_coherent(&dev->pdev->dev, size, kfib, + fibptr->hw_fib_pa); fibptr->hw_fib_pa = hw_fib_pa; fibptr->hw_fib_va = hw_fib; } |