From: James Bottomley Date: Fri, 28 Oct 2005 16:21:10 +0000 (-0500) Subject: [SCSI] aacraid: Use DMA mask defines X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=71e0f32fbc7841d9c34949655039dcf4635540f0;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [SCSI] aacraid: Use DMA mask defines From: Mark Haverkamp Received from Mark Salyzyn. This patch changes the driver over to utilizing the DMA_64BIT_MASK and DMA_32BIT_MASK manifests. Applies to the scsi-rc-fixes-2.6 git tree. Signed-off-by: Mark Haverkamp Rejects fixed up and Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c index a8e3dfcd0dc7..b864d3d4d133 100644 --- a/drivers/scsi/aacraid/aachba.c +++ b/drivers/scsi/aacraid/aachba.c @@ -785,12 +785,12 @@ int aac_get_adapter_info(struct aac_dev* dev) dev->dac_support = (dacmode!=0); } if(dev->dac_support != 0) { - if (!pci_set_dma_mask(dev->pdev, 0xFFFFFFFFFFFFFFFFULL) && - !pci_set_consistent_dma_mask(dev->pdev, 0xFFFFFFFFFFFFFFFFULL)) { + if (!pci_set_dma_mask(dev->pdev, DMA_64BIT_MASK) && + !pci_set_consistent_dma_mask(dev->pdev, DMA_64BIT_MASK)) { printk(KERN_INFO"%s%d: 64 Bit DAC enabled\n", dev->name, dev->id); - } else if (!pci_set_dma_mask(dev->pdev, 0xFFFFFFFFULL) && - !pci_set_consistent_dma_mask(dev->pdev, 0xFFFFFFFFULL)) { + } else if (!pci_set_dma_mask(dev->pdev, DMA_32BIT_MASK) && + !pci_set_consistent_dma_mask(dev->pdev, DMA_32BIT_MASK)) { printk(KERN_INFO"%s%d: DMA mask set failed, 64 Bit DAC disabled\n", dev->name, dev->id); dev->dac_support = 0; diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index 4ff29d7f5825..7a25dab48a9e 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c @@ -751,8 +751,8 @@ static int __devinit aac_probe_one(struct pci_dev *pdev, if (pci_enable_device(pdev)) goto out; - if (pci_set_dma_mask(pdev, 0xFFFFFFFFULL) || - pci_set_consistent_dma_mask(pdev, 0xFFFFFFFFULL)) + if (pci_set_dma_mask(pdev, DMA_32BIT_MASK) || + pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK)) goto out; /* * If the quirk31 bit is set, the adapter needs adapter @@ -795,9 +795,9 @@ static int __devinit aac_probe_one(struct pci_dev *pdev, * address space. */ if (aac_drivers[index].quirks & AAC_QUIRK_31BIT) - if (pci_set_dma_mask(pdev, 0xFFFFFFFFULL)) - goto out_free_fibs; - + if (pci_set_dma_mask(pdev, DMA_32BIT_MASK)) + goto out_deinit; + aac->maximum_num_channels = aac_drivers[index].channels; aac_get_adapter_info(aac);