diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c index 769af4ca9ca97e675c48e6a15750132b1969cf56..959b3ae8a99e1eee2df81d3098d9c5762107fc80 100644 --- a/drivers/scsi/aacraid/aachba.c +++ b/drivers/scsi/aacraid/aachba.c @@ -2229,10 +2229,10 @@ int aac_get_adapter_info(struct aac_dev* dev) } if (dev->dac_support) { - if (!pci_set_dma_mask(dev->pdev, DMA_BIT_MASK(64))) { + if (!dma_set_mask(&dev->pdev->dev, DMA_BIT_MASK(64))) { if (!dev->in_reset) dev_info(&dev->pdev->dev, "64 Bit DAC enabled\n"); - } else if (!pci_set_dma_mask(dev->pdev, DMA_BIT_MASK(32))) { + } else if (!dma_set_mask(&dev->pdev->dev, DMA_BIT_MASK(32))) { dev_info(&dev->pdev->dev, "DMA mask set failed, 64 Bit DAC disabled\n"); dev->dac_support = 0; } else { diff --git a/drivers/scsi/aacraid/commctrl.c b/drivers/scsi/aacraid/commctrl.c index 59e82a832042f038718ea00b4d4438b9e66b3755..e3e157a7498808837ed762c63e9de335d1608c97 100644 --- a/drivers/scsi/aacraid/commctrl.c +++ b/drivers/scsi/aacraid/commctrl.c @@ -670,8 +670,8 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg) goto cleanup; } } - addr = pci_map_single(dev->pdev, p, sg_count[i], - data_dir); + addr = dma_map_single(&dev->pdev->dev, p, sg_count[i], + data_dir); hbacmd->sge[i].addr_hi = cpu_to_le32((u32)(addr>>32)); hbacmd->sge[i].addr_lo = cpu_to_le32( (u32)(addr & 0xffffffff)); @@ -732,8 +732,8 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg) goto cleanup; } } - addr = pci_map_single(dev->pdev, p, - sg_count[i], data_dir); + addr = dma_map_single(&dev->pdev->dev, p, + sg_count[i], data_dir); psg->sg[i].addr[0] = cpu_to_le32(addr & 0xffffffff); psg->sg[i].addr[1] = cpu_to_le32(addr>>32); @@ -788,8 +788,8 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg) goto cleanup; } } - addr = pci_map_single(dev->pdev, p, - sg_count[i], data_dir); + addr = dma_map_single(&dev->pdev->dev, p, + sg_count[i], data_dir); psg->sg[i].addr[0] = cpu_to_le32(addr & 0xffffffff); psg->sg[i].addr[1] = cpu_to_le32(addr>>32); @@ -844,7 +844,9 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg) goto cleanup; } } - addr = pci_map_single(dev->pdev, p, usg->sg[i].count, data_dir); + addr = dma_map_single(&dev->pdev->dev, p, + usg->sg[i].count, + data_dir); psg->sg[i].addr = cpu_to_le32(addr & 0xffffffff); byte_count += usg->sg[i].count; @@ -883,8 +885,8 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg) goto cleanup; } } - addr = pci_map_single(dev->pdev, p, - sg_count[i], data_dir); + addr = dma_map_single(&dev->pdev->dev, p, + sg_count[i], data_dir); psg->sg[i].addr = cpu_to_le32(addr); byte_count += sg_count[i]; diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c index adbdc3b7c7a706e0151c698f84c73251157a05e8..7c0710417d37d153d62c7002276b80da598f926b 100644 --- a/drivers/scsi/aacraid/commsup.c +++ b/drivers/scsi/aacraid/commsup.c @@ -1561,15 +1561,15 @@ static int _aac_reset_adapter(struct aac_dev *aac, int forced, u8 reset_type) dmamask = DMA_BIT_MASK(32); quirks = aac_get_driver_ident(index)->quirks; if (quirks & AAC_QUIRK_31BIT) - retval = pci_set_dma_mask(aac->pdev, dmamask); + retval = dma_set_mask(&aac->pdev->dev, dmamask); else if (!(quirks & AAC_QUIRK_SRC)) - retval = pci_set_dma_mask(aac->pdev, dmamask); + retval = dma_set_mask(&aac->pdev->dev, dmamask); else - retval = pci_set_consistent_dma_mask(aac->pdev, dmamask); + retval = dma_set_coherent_mask(&aac->pdev->dev, dmamask); if (quirks & AAC_QUIRK_31BIT && !retval) { dmamask = DMA_BIT_MASK(31); - retval = pci_set_consistent_dma_mask(aac->pdev, dmamask); + retval = dma_set_coherent_mask(&aac->pdev->dev, dmamask); } if (retval) diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index 8588da0a065551a6db065257c87a61f4ef9360a7..7d99f7155a13b26aa39e9434763829bee7bc05ca 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c @@ -1659,7 +1659,7 @@ static int aac_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) goto out; if (!(aac_drivers[index].quirks & AAC_QUIRK_SRC)) { - error = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)); + error = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32)); if (error) { dev_err(&pdev->dev, "PCI 32 BIT dma mask set failed"); goto out_disable_pdev; @@ -1678,7 +1678,7 @@ static int aac_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) mask_bits = 32; } - error = pci_set_consistent_dma_mask(pdev, dmamask); + error = dma_set_coherent_mask(&pdev->dev, dmamask); if (error) { dev_err(&pdev->dev, "PCI %d B consistent dma mask set failed\n" , mask_bits);