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>
This commit is contained in:

committed by
Martin K. Petersen

parent
26a4c991af
commit
c22b332d81
@@ -1845,8 +1845,8 @@ csio_ln_fdmi_init(struct csio_lnode *ln)
|
||||
/* Allocate Dma buffers for FDMI response Payload */
|
||||
dma_buf = &ln->mgmt_req->dma_buf;
|
||||
dma_buf->len = 2048;
|
||||
dma_buf->vaddr = pci_alloc_consistent(hw->pdev, dma_buf->len,
|
||||
&dma_buf->paddr);
|
||||
dma_buf->vaddr = dma_alloc_coherent(&hw->pdev->dev, dma_buf->len,
|
||||
&dma_buf->paddr, GFP_KERNEL);
|
||||
if (!dma_buf->vaddr) {
|
||||
csio_err(hw, "Failed to alloc DMA buffer for FDMI!\n");
|
||||
kfree(ln->mgmt_req);
|
||||
@@ -1873,7 +1873,7 @@ csio_ln_fdmi_exit(struct csio_lnode *ln)
|
||||
|
||||
dma_buf = &ln->mgmt_req->dma_buf;
|
||||
if (dma_buf->vaddr)
|
||||
pci_free_consistent(hw->pdev, dma_buf->len, dma_buf->vaddr,
|
||||
dma_free_coherent(&hw->pdev->dev, dma_buf->len, dma_buf->vaddr,
|
||||
dma_buf->paddr);
|
||||
|
||||
kfree(ln->mgmt_req);
|
||||
|
Reference in New Issue
Block a user