diff options
author | Christoph Hellwig <hch@lst.de> | 2018-10-10 18:34:51 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-10-17 21:58:52 -0400 |
commit | c22b332d811b90448e090c7fb487448afb039fcc (patch) | |
tree | c348faaec6f3e497149902ee0c6a5f410e320181 /drivers/scsi/csiostor/csio_scsi.c | |
parent | 26a4c991af99f1f6632c0cf253a332a29edd2681 (diff) |
scsi: csiostor: 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>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/csiostor/csio_scsi.c')
-rw-r--r-- | drivers/scsi/csiostor/csio_scsi.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/scsi/csiostor/csio_scsi.c b/drivers/scsi/csiostor/csio_scsi.c index dab0d3f9bee1..8c15b7acb4b7 100644 --- a/drivers/scsi/csiostor/csio_scsi.c +++ b/drivers/scsi/csiostor/csio_scsi.c @@ -2349,8 +2349,8 @@ csio_scsi_alloc_ddp_bufs(struct csio_scsim *scm, struct csio_hw *hw, } /* Allocate Dma buffers for DDP */ - ddp_desc->vaddr = pci_alloc_consistent(hw->pdev, unit_size, - &ddp_desc->paddr); + ddp_desc->vaddr = dma_alloc_coherent(&hw->pdev->dev, unit_size, + &ddp_desc->paddr, GFP_KERNEL); if (!ddp_desc->vaddr) { csio_err(hw, "SCSI response DMA buffer (ddp) allocation" @@ -2372,8 +2372,8 @@ no_mem: list_for_each(tmp, &scm->ddp_freelist) { ddp_desc = (struct csio_dma_buf *) tmp; tmp = csio_list_prev(tmp); - pci_free_consistent(hw->pdev, ddp_desc->len, ddp_desc->vaddr, - ddp_desc->paddr); + dma_free_coherent(&hw->pdev->dev, ddp_desc->len, + ddp_desc->vaddr, ddp_desc->paddr); list_del_init(&ddp_desc->list); kfree(ddp_desc); } @@ -2399,8 +2399,8 @@ csio_scsi_free_ddp_bufs(struct csio_scsim *scm, struct csio_hw *hw) list_for_each(tmp, &scm->ddp_freelist) { ddp_desc = (struct csio_dma_buf *) tmp; tmp = csio_list_prev(tmp); - pci_free_consistent(hw->pdev, ddp_desc->len, ddp_desc->vaddr, - ddp_desc->paddr); + dma_free_coherent(&hw->pdev->dev, ddp_desc->len, + ddp_desc->vaddr, ddp_desc->paddr); list_del_init(&ddp_desc->list); kfree(ddp_desc); } |