diff options
author | Christoph Hellwig <hch@lst.de> | 2018-10-10 18:22:24 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-10-18 03:58:52 +0200 |
commit | 26a4c991af99f1f6632c0cf253a332a29edd2681 (patch) | |
tree | 702aa8b679830036d84b551fbef3ad73848eef72 /drivers/scsi/be2iscsi/be_cmds.c | |
parent | scsi: atp870u: switch to generic DMA API (diff) | |
download | linux-26a4c991af99f1f6632c0cf253a332a29edd2681.tar.xz linux-26a4c991af99f1f6632c0cf253a332a29edd2681.zip |
scsi: be2iscsi: 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/be2iscsi/be_cmds.c')
-rw-r--r-- | drivers/scsi/be2iscsi/be_cmds.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/scsi/be2iscsi/be_cmds.c b/drivers/scsi/be2iscsi/be_cmds.c index c10aac4dbc5e..0a6972ee94d7 100644 --- a/drivers/scsi/be2iscsi/be_cmds.c +++ b/drivers/scsi/be2iscsi/be_cmds.c @@ -520,7 +520,7 @@ int beiscsi_process_mcc_compl(struct be_ctrl_info *ctrl, **/ tag_mem = &ctrl->ptag_state[tag].tag_mem_state; if (tag_mem->size) { - pci_free_consistent(ctrl->pdev, tag_mem->size, + dma_free_coherent(&ctrl->pdev->dev, tag_mem->size, tag_mem->va, tag_mem->dma); tag_mem->size = 0; } @@ -1269,12 +1269,12 @@ int beiscsi_check_supported_fw(struct be_ctrl_info *ctrl, struct be_sge *sge = nonembedded_sgl(wrb); int status = 0; - nonemb_cmd.va = pci_alloc_consistent(ctrl->pdev, + nonemb_cmd.va = dma_alloc_coherent(&ctrl->pdev->dev, sizeof(struct be_mgmt_controller_attributes), - &nonemb_cmd.dma); + &nonemb_cmd.dma, GFP_KERNEL); if (nonemb_cmd.va == NULL) { beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT, - "BG_%d : pci_alloc_consistent failed in %s\n", + "BG_%d : dma_alloc_coherent failed in %s\n", __func__); return -ENOMEM; } @@ -1314,7 +1314,7 @@ int beiscsi_check_supported_fw(struct be_ctrl_info *ctrl, "BG_%d : Failed in beiscsi_check_supported_fw\n"); mutex_unlock(&ctrl->mbox_lock); if (nonemb_cmd.va) - pci_free_consistent(ctrl->pdev, nonemb_cmd.size, + dma_free_coherent(&ctrl->pdev->dev, nonemb_cmd.size, nonemb_cmd.va, nonemb_cmd.dma); return status; |