aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorRolf Eike Beer <eike-kernel@sf-tec.de>2009-07-01 16:43:39 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-07-28 10:06:19 -0400
commit0dcae66fd9cb47f4db64aba20a59d26e09e78fe4 (patch)
treeddcdff0c6b455244a9def09245b910e66d244adb /drivers/scsi
parent0c470874858e0075f420dcfb3c3570b2057de275 (diff)
[SCSI] aacraid: Do not set DMA mask to 32 bit first if adapter only supports 31
Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de> Acked-by: Achim Leubner <Achim_Leubner@pmc-sierra.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/aacraid/linit.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
index 33898b61fdb5..cad6f9abaeb9 100644
--- a/drivers/scsi/aacraid/linit.c
+++ b/drivers/scsi/aacraid/linit.c
@@ -1091,6 +1091,7 @@ static int __devinit aac_probe_one(struct pci_dev *pdev,
1091 struct list_head *insert = &aac_devices; 1091 struct list_head *insert = &aac_devices;
1092 int error = -ENODEV; 1092 int error = -ENODEV;
1093 int unique_id = 0; 1093 int unique_id = 0;
1094 u64 dmamask;
1094 1095
1095 list_for_each_entry(aac, &aac_devices, entry) { 1096 list_for_each_entry(aac, &aac_devices, entry) {
1096 if (aac->id > unique_id) 1097 if (aac->id > unique_id)
@@ -1104,17 +1105,18 @@ static int __devinit aac_probe_one(struct pci_dev *pdev,
1104 goto out; 1105 goto out;
1105 error = -ENODEV; 1106 error = -ENODEV;
1106 1107
1107 if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32)) ||
1108 pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)))
1109 goto out_disable_pdev;
1110 /* 1108 /*
1111 * If the quirk31 bit is set, the adapter needs adapter 1109 * If the quirk31 bit is set, the adapter needs adapter
1112 * to driver communication memory to be allocated below 2gig 1110 * to driver communication memory to be allocated below 2gig
1113 */ 1111 */
1114 if (aac_drivers[index].quirks & AAC_QUIRK_31BIT) 1112 if (aac_drivers[index].quirks & AAC_QUIRK_31BIT)
1115 if (pci_set_dma_mask(pdev, DMA_BIT_MASK(31)) || 1113 dmamask = DMA_BIT_MASK(31);
1116 pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(31))) 1114 else
1117 goto out_disable_pdev; 1115 dmamask = DMA_BIT_MASK(32);
1116
1117 if (pci_set_dma_mask(pdev, dmamask) ||
1118 pci_set_consistent_dma_mask(pdev, dmamask))
1119 goto out_disable_pdev;
1118 1120
1119 pci_set_master(pdev); 1121 pci_set_master(pdev);
1120 1122