diff options
author | Christoph Hellwig <hch@lst.de> | 2018-10-10 18:40:56 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-10-17 21:58:52 -0400 |
commit | 7f9b0f774fdf26a5d76363d889ba587e242a497b (patch) | |
tree | 7510a230c48daa0bfe2e4d72dba2f13b5f6f8ec8 /drivers/scsi/fnic/fnic_main.c | |
parent | c22b332d811b90448e090c7fb487448afb039fcc (diff) | |
download | linux-rt-7f9b0f774fdf26a5d76363d889ba587e242a497b.tar.gz |
scsi: fnic: 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/fnic/fnic_main.c')
-rw-r--r-- | drivers/scsi/fnic/fnic_main.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/drivers/scsi/fnic/fnic_main.c b/drivers/scsi/fnic/fnic_main.c index e52599f44170..cc461fd7bef1 100644 --- a/drivers/scsi/fnic/fnic_main.c +++ b/drivers/scsi/fnic/fnic_main.c @@ -611,30 +611,15 @@ static int fnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) * limitation for the device. Try 64-bit first, and * fail to 32-bit. */ - err = pci_set_dma_mask(pdev, DMA_BIT_MASK(64)); + err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64)); if (err) { - err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)); + err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); if (err) { shost_printk(KERN_ERR, fnic->lport->host, "No usable DMA configuration " "aborting\n"); goto err_out_release_regions; } - err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)); - if (err) { - shost_printk(KERN_ERR, fnic->lport->host, - "Unable to obtain 32-bit DMA " - "for consistent allocations, aborting.\n"); - goto err_out_release_regions; - } - } else { - err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)); - if (err) { - shost_printk(KERN_ERR, fnic->lport->host, - "Unable to obtain 64-bit DMA " - "for consistent allocations, aborting.\n"); - goto err_out_release_regions; - } } /* Map vNIC resources from BAR0 */ |