diff options
Diffstat (limited to 'drivers/scsi/snic/snic_main.c')
-rw-r--r-- | drivers/scsi/snic/snic_main.c | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/drivers/scsi/snic/snic_main.c b/drivers/scsi/snic/snic_main.c index 7cf70aaec0ba..5295277d6325 100644 --- a/drivers/scsi/snic/snic_main.c +++ b/drivers/scsi/snic/snic_main.c @@ -435,37 +435,17 @@ snic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) * limitation for the device. Try 43-bit first, and * fail to 32-bit. */ - ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(43)); + ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(43)); if (ret) { - ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)); + ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); if (ret) { SNIC_HOST_ERR(shost, "No Usable DMA Configuration, aborting %d\n", ret); - - goto err_rel_regions; - } - - ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)); - if (ret) { - SNIC_HOST_ERR(shost, - "Unable to obtain 32-bit DMA for consistent allocations, aborting: %d\n", - ret); - - goto err_rel_regions; - } - } else { - ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(43)); - if (ret) { - SNIC_HOST_ERR(shost, - "Unable to obtain 43-bit DMA for consistent allocations. aborting: %d\n", - ret); - goto err_rel_regions; } } - /* Map vNIC resources from BAR0 */ if (!(pci_resource_flags(pdev, 0) & IORESOURCE_MEM)) { SNIC_HOST_ERR(shost, "BAR0 not memory mappable aborting.\n"); |