diff options
author | Mahesh Rajashekhara <mahesh.rajashekhara@microsemi.com> | 2017-04-05 13:44:16 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2017-04-27 01:28:06 +0300 |
commit | f481973d5efdb63b7c6ca6b0ecd2b8462556a461 (patch) | |
tree | bb254fe9f09a156d6b2768fd006bfc76d2cdb49f /drivers/scsi/aacraid/aachba.c | |
parent | 6cf161150d815da0ee8cff158b185bc33dca3a34 (diff) | |
download | linux-f481973d5efdb63b7c6ca6b0ecd2b8462556a461.tar.xz |
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/aachba.c')
-rw-r--r-- | drivers/scsi/aacraid/aachba.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c index e3e93def722b..43d88389e899 100644 --- a/drivers/scsi/aacraid/aachba.c +++ b/drivers/scsi/aacraid/aachba.c @@ -1678,8 +1678,8 @@ int aac_issue_bmic_identify(struct aac_dev *dev, u32 bus, u32 target) sizeof(struct sgentry) + sizeof(struct sgentry64); datasize = sizeof(struct aac_ciss_identify_pd); - identify_resp = pci_alloc_consistent(dev->pdev, datasize, &addr); - + identify_resp = dma_alloc_coherent(&dev->pdev->dev, datasize, &addr, + GFP_KERNEL); if (!identify_resp) goto fib_free_ptr; @@ -1720,7 +1720,7 @@ int aac_issue_bmic_identify(struct aac_dev *dev, u32 bus, u32 target) dev->hba_map[bus][target].qd_limit = identify_resp->current_queue_depth_limit; - pci_free_consistent(dev->pdev, datasize, (void *)identify_resp, addr); + dma_free_coherent(&dev->pdev->dev, datasize, identify_resp, addr); aac_fib_complete(fibptr); @@ -1814,9 +1814,8 @@ int aac_report_phys_luns(struct aac_dev *dev, struct fib *fibptr, int rescan) datasize = sizeof(struct aac_ciss_phys_luns_resp) + (AAC_MAX_TARGETS - 1) * sizeof(struct _ciss_lun); - phys_luns = (struct aac_ciss_phys_luns_resp *) pci_alloc_consistent( - dev->pdev, datasize, &addr); - + phys_luns = dma_alloc_coherent(&dev->pdev->dev, datasize, &addr, + GFP_KERNEL); if (phys_luns == NULL) { rcode = -ENOMEM; goto err_out; @@ -1861,7 +1860,7 @@ int aac_report_phys_luns(struct aac_dev *dev, struct fib *fibptr, int rescan) aac_update_hba_map(dev, phys_luns, rescan); } - pci_free_consistent(dev->pdev, datasize, (void *) phys_luns, addr); + dma_free_coherent(&dev->pdev->dev, datasize, phys_luns, addr); err_out: return rcode; } |