Commit 0dcae66f authored by Rolf Eike Beer's avatar Rolf Eike Beer Committed by James Bottomley

[SCSI] aacraid: Do not set DMA mask to 32 bit first if adapter only supports 31

Signed-off-by: default avatarRolf Eike Beer <eike-kernel@sf-tec.de>
Acked-by: default avatarAchim Leubner <Achim_Leubner@pmc-sierra.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent 0c470874
...@@ -1091,6 +1091,7 @@ static int __devinit aac_probe_one(struct pci_dev *pdev, ...@@ -1091,6 +1091,7 @@ static int __devinit aac_probe_one(struct pci_dev *pdev,
struct list_head *insert = &aac_devices; struct list_head *insert = &aac_devices;
int error = -ENODEV; int error = -ENODEV;
int unique_id = 0; int unique_id = 0;
u64 dmamask;
list_for_each_entry(aac, &aac_devices, entry) { list_for_each_entry(aac, &aac_devices, entry) {
if (aac->id > unique_id) if (aac->id > unique_id)
...@@ -1104,16 +1105,17 @@ static int __devinit aac_probe_one(struct pci_dev *pdev, ...@@ -1104,16 +1105,17 @@ static int __devinit aac_probe_one(struct pci_dev *pdev,
goto out; goto out;
error = -ENODEV; error = -ENODEV;
if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32)) ||
pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)))
goto out_disable_pdev;
/* /*
* If the quirk31 bit is set, the adapter needs adapter * If the quirk31 bit is set, the adapter needs adapter
* to driver communication memory to be allocated below 2gig * to driver communication memory to be allocated below 2gig
*/ */
if (aac_drivers[index].quirks & AAC_QUIRK_31BIT) if (aac_drivers[index].quirks & AAC_QUIRK_31BIT)
if (pci_set_dma_mask(pdev, DMA_BIT_MASK(31)) || dmamask = DMA_BIT_MASK(31);
pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(31))) else
dmamask = DMA_BIT_MASK(32);
if (pci_set_dma_mask(pdev, dmamask) ||
pci_set_consistent_dma_mask(pdev, dmamask))
goto out_disable_pdev; goto out_disable_pdev;
pci_set_master(pdev); pci_set_master(pdev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment