diff options
author | Christoph Hellwig <hch@lst.de> | 2018-10-10 20:59:50 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-10-18 04:58:52 +0300 |
commit | f73bdebdf020a31ad43ce4de590ec7a09e383abd (patch) | |
tree | e208c83cd5d4dad081fcf5694c73c3111bfb7546 /drivers/scsi/pm8001/pm8001_sas.c | |
parent | 03676e1d31fa0e156df0caecbacf20b488f7bd3a (diff) | |
download | linux-f73bdebdf020a31ad43ce4de590ec7a09e383abd.tar.xz |
scsi: pm8001: switch to generic DMA API
Switch from the legacy PCI DMA API to the generic DMA API.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Jack Wang <jinpu.wang@profitbricks.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/pm8001/pm8001_sas.c')
-rw-r--r-- | drivers/scsi/pm8001/pm8001_sas.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/scsi/pm8001/pm8001_sas.c b/drivers/scsi/pm8001/pm8001_sas.c index 84092e4e1aa9..b3be49d41375 100644 --- a/drivers/scsi/pm8001/pm8001_sas.c +++ b/drivers/scsi/pm8001/pm8001_sas.c @@ -116,8 +116,8 @@ int pm8001_mem_alloc(struct pci_dev *pdev, void **virt_addr, u64 align_offset = 0; if (align) align_offset = (dma_addr_t)align - 1; - mem_virt_alloc = pci_zalloc_consistent(pdev, mem_size + align, - &mem_dma_handle); + mem_virt_alloc = dma_zalloc_coherent(&pdev->dev, mem_size + align, + &mem_dma_handle, GFP_KERNEL); if (!mem_virt_alloc) { pm8001_printk("memory allocation error\n"); return -1; @@ -533,9 +533,9 @@ void pm8001_ccb_task_free(struct pm8001_hba_info *pm8001_ha, switch (task->task_proto) { case SAS_PROTOCOL_SMP: dma_unmap_sg(pm8001_ha->dev, &task->smp_task.smp_resp, 1, - PCI_DMA_FROMDEVICE); + DMA_FROM_DEVICE); dma_unmap_sg(pm8001_ha->dev, &task->smp_task.smp_req, 1, - PCI_DMA_TODEVICE); + DMA_TO_DEVICE); break; case SAS_PROTOCOL_SATA: |