aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorYang Hongyang <yanghy@cn.fujitsu.com>2009-04-06 22:01:15 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-07 11:31:11 -0400
commit284901a90a9e0b812ca3f5f852cbbfb60d10249d (patch)
tree06c1b5a0f83c90cfb662f756e7781977ce739ce8 /drivers/scsi
parent6afd142fd0dfba497246d0fab236c20a7b4bf778 (diff)
dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32)
Replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/3w-9xxx.c4
-rw-r--r--drivers/scsi/3w-xxxx.h2
-rw-r--r--drivers/scsi/BusLogic.c6
-rw-r--r--drivers/scsi/a100u2w.c2
-rw-r--r--drivers/scsi/aacraid/aachba.c4
-rw-r--r--drivers/scsi/aacraid/commsup.c6
-rw-r--r--drivers/scsi/aacraid/linit.c6
-rw-r--r--drivers/scsi/aic7xxx/aic79xx_osm_pci.c6
-rw-r--r--drivers/scsi/aic7xxx/aic7xxx_osm_pci.c4
-rw-r--r--drivers/scsi/aic94xx/aic94xx_init.c4
-rw-r--r--drivers/scsi/arcmsr/arcmsr_hba.c2
-rw-r--r--drivers/scsi/atp870u.c2
-rw-r--r--drivers/scsi/dpt_i2o.c6
-rw-r--r--drivers/scsi/eata.c2
-rw-r--r--drivers/scsi/gdth.c4
-rw-r--r--drivers/scsi/hptiop.c2
-rw-r--r--drivers/scsi/initio.c2
-rw-r--r--drivers/scsi/ipr.c2
-rw-r--r--drivers/scsi/ips.c2
-rw-r--r--drivers/scsi/lasi700.c2
-rw-r--r--drivers/scsi/lpfc/lpfc_init.c2
-rw-r--r--drivers/scsi/megaraid.c4
-rw-r--r--drivers/scsi/megaraid/megaraid_mbox.c4
-rw-r--r--drivers/scsi/megaraid/megaraid_sas.c4
-rw-r--r--drivers/scsi/mvsas.c6
-rw-r--r--drivers/scsi/nsp32.c2
-rw-r--r--drivers/scsi/qla1280.c4
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c4
-rw-r--r--drivers/scsi/qla4xxx/ql4_os.c4
-rw-r--r--drivers/scsi/sni_53c710.c2
-rw-r--r--drivers/scsi/stex.c4
-rw-r--r--drivers/scsi/sym53c8xx_2/sym_glue.c2
-rw-r--r--drivers/scsi/sym53c8xx_2/sym_hipd.h2
33 files changed, 57 insertions, 57 deletions
diff --git a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c
index 6697652740b8..fdb14ec4fd47 100644
--- a/drivers/scsi/3w-9xxx.c
+++ b/drivers/scsi/3w-9xxx.c
@@ -2018,8 +2018,8 @@ static int __devinit twa_probe(struct pci_dev *pdev, const struct pci_device_id
2018 2018
2019 if (pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) 2019 if (pci_set_dma_mask(pdev, DMA_BIT_MASK(64))
2020 || pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64))) 2020 || pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)))
2021 if (pci_set_dma_mask(pdev, DMA_32BIT_MASK) 2021 if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))
2022 || pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK)) { 2022 || pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32))) {
2023 TW_PRINTK(host, TW_DRIVER, 0x23, "Failed to set dma mask"); 2023 TW_PRINTK(host, TW_DRIVER, 0x23, "Failed to set dma mask");
2024 retval = -ENODEV; 2024 retval = -ENODEV;
2025 goto out_disable_device; 2025 goto out_disable_device;
diff --git a/drivers/scsi/3w-xxxx.h b/drivers/scsi/3w-xxxx.h
index 0742e6846656..8e71e5e122b3 100644
--- a/drivers/scsi/3w-xxxx.h
+++ b/drivers/scsi/3w-xxxx.h
@@ -234,7 +234,7 @@ static unsigned char tw_sense_table[][4] =
234#define TW_IOCTL_TIMEOUT 25 /* 25 seconds */ 234#define TW_IOCTL_TIMEOUT 25 /* 25 seconds */
235#define TW_IOCTL_CHRDEV_TIMEOUT 60 /* 60 seconds */ 235#define TW_IOCTL_CHRDEV_TIMEOUT 60 /* 60 seconds */
236#define TW_IOCTL_CHRDEV_FREE -1 236#define TW_IOCTL_CHRDEV_FREE -1
237#define TW_DMA_MASK DMA_32BIT_MASK 237#define TW_DMA_MASK DMA_BIT_MASK(32)
238#define TW_MAX_CDB_LEN 16 238#define TW_MAX_CDB_LEN 16
239 239
240/* Bitmask macros to eliminate bitfields */ 240/* Bitmask macros to eliminate bitfields */
diff --git a/drivers/scsi/BusLogic.c b/drivers/scsi/BusLogic.c
index 2d689af24664..1ddcf4031d4c 100644
--- a/drivers/scsi/BusLogic.c
+++ b/drivers/scsi/BusLogic.c
@@ -667,7 +667,7 @@ static int __init BusLogic_InitializeMultiMasterProbeInfo(struct BusLogic_HostAd
667 if (pci_enable_device(PCI_Device)) 667 if (pci_enable_device(PCI_Device))
668 continue; 668 continue;
669 669
670 if (pci_set_dma_mask(PCI_Device, DMA_32BIT_MASK )) 670 if (pci_set_dma_mask(PCI_Device, DMA_BIT_MASK(32) ))
671 continue; 671 continue;
672 672
673 Bus = PCI_Device->bus->number; 673 Bus = PCI_Device->bus->number;
@@ -834,7 +834,7 @@ static int __init BusLogic_InitializeMultiMasterProbeInfo(struct BusLogic_HostAd
834 if (pci_enable_device(PCI_Device)) 834 if (pci_enable_device(PCI_Device))
835 continue; 835 continue;
836 836
837 if (pci_set_dma_mask(PCI_Device, DMA_32BIT_MASK)) 837 if (pci_set_dma_mask(PCI_Device, DMA_BIT_MASK(32)))
838 continue; 838 continue;
839 839
840 Bus = PCI_Device->bus->number; 840 Bus = PCI_Device->bus->number;
@@ -888,7 +888,7 @@ static int __init BusLogic_InitializeFlashPointProbeInfo(struct BusLogic_HostAda
888 if (pci_enable_device(PCI_Device)) 888 if (pci_enable_device(PCI_Device))
889 continue; 889 continue;
890 890
891 if (pci_set_dma_mask(PCI_Device, DMA_32BIT_MASK)) 891 if (pci_set_dma_mask(PCI_Device, DMA_BIT_MASK(32)))
892 continue; 892 continue;
893 893
894 Bus = PCI_Device->bus->number; 894 Bus = PCI_Device->bus->number;
diff --git a/drivers/scsi/a100u2w.c b/drivers/scsi/a100u2w.c
index 964769f66eac..208d6df9ed59 100644
--- a/drivers/scsi/a100u2w.c
+++ b/drivers/scsi/a100u2w.c
@@ -1094,7 +1094,7 @@ static int __devinit inia100_probe_one(struct pci_dev *pdev,
1094 1094
1095 if (pci_enable_device(pdev)) 1095 if (pci_enable_device(pdev))
1096 goto out; 1096 goto out;
1097 if (pci_set_dma_mask(pdev, DMA_32BIT_MASK)) { 1097 if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
1098 printk(KERN_WARNING "Unable to set 32bit DMA " 1098 printk(KERN_WARNING "Unable to set 32bit DMA "
1099 "on inia100 adapter, ignoring.\n"); 1099 "on inia100 adapter, ignoring.\n");
1100 goto out_disable_device; 1100 goto out_disable_device;
diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c
index e83ef8aaa98c..280261c451d6 100644
--- a/drivers/scsi/aacraid/aachba.c
+++ b/drivers/scsi/aacraid/aachba.c
@@ -1407,8 +1407,8 @@ int aac_get_adapter_info(struct aac_dev* dev)
1407 if (!dev->in_reset) 1407 if (!dev->in_reset)
1408 printk(KERN_INFO"%s%d: 64 Bit DAC enabled\n", 1408 printk(KERN_INFO"%s%d: 64 Bit DAC enabled\n",
1409 dev->name, dev->id); 1409 dev->name, dev->id);
1410 } else if (!pci_set_dma_mask(dev->pdev, DMA_32BIT_MASK) && 1410 } else if (!pci_set_dma_mask(dev->pdev, DMA_BIT_MASK(32)) &&
1411 !pci_set_consistent_dma_mask(dev->pdev, DMA_32BIT_MASK)) { 1411 !pci_set_consistent_dma_mask(dev->pdev, DMA_BIT_MASK(32))) {
1412 printk(KERN_INFO"%s%d: DMA mask set failed, 64 Bit DAC disabled\n", 1412 printk(KERN_INFO"%s%d: DMA mask set failed, 64 Bit DAC disabled\n",
1413 dev->name, dev->id); 1413 dev->name, dev->id);
1414 dev->dac_support = 0; 1414 dev->dac_support = 0;
diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c
index d24c2670040b..3b69c2d98dd6 100644
--- a/drivers/scsi/aacraid/commsup.c
+++ b/drivers/scsi/aacraid/commsup.c
@@ -1210,14 +1210,14 @@ static int _aac_reset_adapter(struct aac_dev *aac, int forced)
1210 ((retval = pci_set_consistent_dma_mask(aac->pdev, DMA_31BIT_MASK)))) 1210 ((retval = pci_set_consistent_dma_mask(aac->pdev, DMA_31BIT_MASK))))
1211 goto out; 1211 goto out;
1212 } else { 1212 } else {
1213 if (((retval = pci_set_dma_mask(aac->pdev, DMA_32BIT_MASK))) || 1213 if (((retval = pci_set_dma_mask(aac->pdev, DMA_BIT_MASK(32)))) ||
1214 ((retval = pci_set_consistent_dma_mask(aac->pdev, DMA_32BIT_MASK)))) 1214 ((retval = pci_set_consistent_dma_mask(aac->pdev, DMA_BIT_MASK(32)))))
1215 goto out; 1215 goto out;
1216 } 1216 }
1217 if ((retval = (*(aac_get_driver_ident(index)->init))(aac))) 1217 if ((retval = (*(aac_get_driver_ident(index)->init))(aac)))
1218 goto out; 1218 goto out;
1219 if (quirks & AAC_QUIRK_31BIT) 1219 if (quirks & AAC_QUIRK_31BIT)
1220 if ((retval = pci_set_dma_mask(aac->pdev, DMA_32BIT_MASK))) 1220 if ((retval = pci_set_dma_mask(aac->pdev, DMA_BIT_MASK(32))))
1221 goto out; 1221 goto out;
1222 if (jafo) { 1222 if (jafo) {
1223 aac->thread = kthread_run(aac_command_thread, aac, aac->name); 1223 aac->thread = kthread_run(aac_command_thread, aac, aac->name);
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
index c507719c0d44..3c3ed4b3311a 100644
--- a/drivers/scsi/aacraid/linit.c
+++ b/drivers/scsi/aacraid/linit.c
@@ -1095,8 +1095,8 @@ static int __devinit aac_probe_one(struct pci_dev *pdev,
1095 goto out; 1095 goto out;
1096 error = -ENODEV; 1096 error = -ENODEV;
1097 1097
1098 if (pci_set_dma_mask(pdev, DMA_32BIT_MASK) || 1098 if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32)) ||
1099 pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK)) 1099 pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)))
1100 goto out_disable_pdev; 1100 goto out_disable_pdev;
1101 /* 1101 /*
1102 * If the quirk31 bit is set, the adapter needs adapter 1102 * If the quirk31 bit is set, the adapter needs adapter
@@ -1154,7 +1154,7 @@ static int __devinit aac_probe_one(struct pci_dev *pdev,
1154 * address space. 1154 * address space.
1155 */ 1155 */
1156 if (aac_drivers[index].quirks & AAC_QUIRK_31BIT) 1156 if (aac_drivers[index].quirks & AAC_QUIRK_31BIT)
1157 if (pci_set_dma_mask(pdev, DMA_32BIT_MASK)) 1157 if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32)))
1158 goto out_deinit; 1158 goto out_deinit;
1159 1159
1160 aac->maximum_num_channels = aac_drivers[index].channels; 1160 aac->maximum_num_channels = aac_drivers[index].channels;
diff --git a/drivers/scsi/aic7xxx/aic79xx_osm_pci.c b/drivers/scsi/aic7xxx/aic79xx_osm_pci.c
index c583d89f569a..8f686122d54e 100644
--- a/drivers/scsi/aic7xxx/aic79xx_osm_pci.c
+++ b/drivers/scsi/aic7xxx/aic79xx_osm_pci.c
@@ -197,13 +197,13 @@ ahd_linux_pci_dev_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
197 if (required_mask > DMA_BIT_MASK(39) && 197 if (required_mask > DMA_BIT_MASK(39) &&
198 dma_set_mask(dev, DMA_BIT_MASK(64)) == 0) 198 dma_set_mask(dev, DMA_BIT_MASK(64)) == 0)
199 ahd->flags |= AHD_64BIT_ADDRESSING; 199 ahd->flags |= AHD_64BIT_ADDRESSING;
200 else if (required_mask > DMA_32BIT_MASK && 200 else if (required_mask > DMA_BIT_MASK(32) &&
201 dma_set_mask(dev, DMA_BIT_MASK(39)) == 0) 201 dma_set_mask(dev, DMA_BIT_MASK(39)) == 0)
202 ahd->flags |= AHD_39BIT_ADDRESSING; 202 ahd->flags |= AHD_39BIT_ADDRESSING;
203 else 203 else
204 dma_set_mask(dev, DMA_32BIT_MASK); 204 dma_set_mask(dev, DMA_BIT_MASK(32));
205 } else { 205 } else {
206 dma_set_mask(dev, DMA_32BIT_MASK); 206 dma_set_mask(dev, DMA_BIT_MASK(32));
207 } 207 }
208 ahd->dev_softc = pci; 208 ahd->dev_softc = pci;
209 error = ahd_pci_config(ahd, entry); 209 error = ahd_pci_config(ahd, entry);
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c b/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c
index 00f5b9868574..78fc70c24e07 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c
@@ -241,10 +241,10 @@ ahc_linux_pci_dev_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
241 if (sizeof(dma_addr_t) > 4 241 if (sizeof(dma_addr_t) > 4
242 && ahc->features & AHC_LARGE_SCBS 242 && ahc->features & AHC_LARGE_SCBS
243 && dma_set_mask(dev, mask_39bit) == 0 243 && dma_set_mask(dev, mask_39bit) == 0
244 && dma_get_required_mask(dev) > DMA_32BIT_MASK) { 244 && dma_get_required_mask(dev) > DMA_BIT_MASK(32)) {
245 ahc->flags |= AHC_39BIT_ADDRESSING; 245 ahc->flags |= AHC_39BIT_ADDRESSING;
246 } else { 246 } else {
247 if (dma_set_mask(dev, DMA_32BIT_MASK)) { 247 if (dma_set_mask(dev, DMA_BIT_MASK(32))) {
248 ahc_free(ahc); 248 ahc_free(ahc);
249 printk(KERN_WARNING "aic7xxx: No suitable DMA available.\n"); 249 printk(KERN_WARNING "aic7xxx: No suitable DMA available.\n");
250 return (-ENODEV); 250 return (-ENODEV);
diff --git a/drivers/scsi/aic94xx/aic94xx_init.c b/drivers/scsi/aic94xx/aic94xx_init.c
index 7edbe4309c61..996f7224f90e 100644
--- a/drivers/scsi/aic94xx/aic94xx_init.c
+++ b/drivers/scsi/aic94xx/aic94xx_init.c
@@ -793,8 +793,8 @@ static int __devinit asd_pci_probe(struct pci_dev *dev,
793 if (!pci_set_dma_mask(dev, DMA_BIT_MASK(64)) 793 if (!pci_set_dma_mask(dev, DMA_BIT_MASK(64))
794 && !pci_set_consistent_dma_mask(dev, DMA_BIT_MASK(64))) 794 && !pci_set_consistent_dma_mask(dev, DMA_BIT_MASK(64)))
795 ; 795 ;
796 else if (!pci_set_dma_mask(dev, DMA_32BIT_MASK) 796 else if (!pci_set_dma_mask(dev, DMA_BIT_MASK(32))
797 && !pci_set_consistent_dma_mask(dev, DMA_32BIT_MASK)) 797 && !pci_set_consistent_dma_mask(dev, DMA_BIT_MASK(32)))
798 ; 798 ;
799 else { 799 else {
800 asd_printk("no suitable DMA mask for %s\n", pci_name(dev)); 800 asd_printk("no suitable DMA mask for %s\n", pci_name(dev));
diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c
index e95b72dd34b1..80aac01b5a6f 100644
--- a/drivers/scsi/arcmsr/arcmsr_hba.c
+++ b/drivers/scsi/arcmsr/arcmsr_hba.c
@@ -395,7 +395,7 @@ static int arcmsr_probe(struct pci_dev *pdev,
395 395
396 error = pci_set_dma_mask(pdev, DMA_BIT_MASK(64)); 396 error = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
397 if (error) { 397 if (error) {
398 error = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 398 error = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
399 if (error) { 399 if (error) {
400 printk(KERN_WARNING 400 printk(KERN_WARNING
401 "scsi%d: No suitable DMA mask available\n", 401 "scsi%d: No suitable DMA mask available\n",
diff --git a/drivers/scsi/atp870u.c b/drivers/scsi/atp870u.c
index 20ca0a6374b5..b137e561f5bc 100644
--- a/drivers/scsi/atp870u.c
+++ b/drivers/scsi/atp870u.c
@@ -2568,7 +2568,7 @@ static int atp870u_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
2568 if (pci_enable_device(pdev)) 2568 if (pci_enable_device(pdev))
2569 goto err_eio; 2569 goto err_eio;
2570 2570
2571 if (!pci_set_dma_mask(pdev, DMA_32BIT_MASK)) { 2571 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
2572 printk(KERN_INFO "atp870u: use 32bit DMA mask.\n"); 2572 printk(KERN_INFO "atp870u: use 32bit DMA mask.\n");
2573 } else { 2573 } else {
2574 printk(KERN_ERR "atp870u: DMA mask required but not available.\n"); 2574 printk(KERN_ERR "atp870u: DMA mask required but not available.\n");
diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c
index 75a94e438fa5..b6af63ca980b 100644
--- a/drivers/scsi/dpt_i2o.c
+++ b/drivers/scsi/dpt_i2o.c
@@ -1015,14 +1015,14 @@ static int adpt_install_hba(struct scsi_host_template* sht, struct pci_dev* pDev
1015 */ 1015 */
1016 if (sizeof(dma_addr_t) > 4 && 1016 if (sizeof(dma_addr_t) > 4 &&
1017 pci_set_dma_mask(pDev, DMA_BIT_MASK(64)) == 0) { 1017 pci_set_dma_mask(pDev, DMA_BIT_MASK(64)) == 0) {
1018 if (dma_get_required_mask(&pDev->dev) > DMA_32BIT_MASK) 1018 if (dma_get_required_mask(&pDev->dev) > DMA_BIT_MASK(32))
1019 dma64 = 1; 1019 dma64 = 1;
1020 } 1020 }
1021 if (!dma64 && pci_set_dma_mask(pDev, DMA_32BIT_MASK) != 0) 1021 if (!dma64 && pci_set_dma_mask(pDev, DMA_BIT_MASK(32)) != 0)
1022 return -EINVAL; 1022 return -EINVAL;
1023 1023
1024 /* adapter only supports message blocks below 4GB */ 1024 /* adapter only supports message blocks below 4GB */
1025 pci_set_consistent_dma_mask(pDev, DMA_32BIT_MASK); 1025 pci_set_consistent_dma_mask(pDev, DMA_BIT_MASK(32));
1026 1026
1027 base_addr0_phys = pci_resource_start(pDev,0); 1027 base_addr0_phys = pci_resource_start(pDev,0);
1028 hba_map0_area_size = pci_resource_len(pDev,0); 1028 hba_map0_area_size = pci_resource_len(pDev,0);
diff --git a/drivers/scsi/eata.c b/drivers/scsi/eata.c
index 976cdd5c94ef..be5099dd94b5 100644
--- a/drivers/scsi/eata.c
+++ b/drivers/scsi/eata.c
@@ -1426,7 +1426,7 @@ static int port_detect(unsigned long port_base, unsigned int j,
1426 1426
1427 if (ha->pdev) { 1427 if (ha->pdev) {
1428 pci_set_master(ha->pdev); 1428 pci_set_master(ha->pdev);
1429 if (pci_set_dma_mask(ha->pdev, DMA_32BIT_MASK)) 1429 if (pci_set_dma_mask(ha->pdev, DMA_BIT_MASK(32)))
1430 printk("%s: warning, pci_set_dma_mask failed.\n", 1430 printk("%s: warning, pci_set_dma_mask failed.\n",
1431 ha->board_name); 1431 ha->board_name);
1432 } 1432 }
diff --git a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c
index 4982344f1f09..185e6bc4dd40 100644
--- a/drivers/scsi/gdth.c
+++ b/drivers/scsi/gdth.c
@@ -5023,7 +5023,7 @@ static int __devinit gdth_pci_probe_one(gdth_pci_str *pcistr,
5023 /* 64-bit DMA only supported from FW >= x.43 */ 5023 /* 64-bit DMA only supported from FW >= x.43 */
5024 if (!(ha->cache_feat & ha->raw_feat & ha->screen_feat & GDT_64BIT) || 5024 if (!(ha->cache_feat & ha->raw_feat & ha->screen_feat & GDT_64BIT) ||
5025 !ha->dma64_support) { 5025 !ha->dma64_support) {
5026 if (pci_set_dma_mask(pdev, DMA_32BIT_MASK)) { 5026 if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
5027 printk(KERN_WARNING "GDT-PCI %d: " 5027 printk(KERN_WARNING "GDT-PCI %d: "
5028 "Unable to set 32-bit DMA\n", ha->hanum); 5028 "Unable to set 32-bit DMA\n", ha->hanum);
5029 goto out_free_coal_stat; 5029 goto out_free_coal_stat;
@@ -5032,7 +5032,7 @@ static int __devinit gdth_pci_probe_one(gdth_pci_str *pcistr,
5032 shp->max_cmd_len = 16; 5032 shp->max_cmd_len = 16;
5033 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) { 5033 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
5034 printk("GDT-PCI %d: 64-bit DMA enabled\n", ha->hanum); 5034 printk("GDT-PCI %d: 64-bit DMA enabled\n", ha->hanum);
5035 } else if (pci_set_dma_mask(pdev, DMA_32BIT_MASK)) { 5035 } else if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
5036 printk(KERN_WARNING "GDT-PCI %d: " 5036 printk(KERN_WARNING "GDT-PCI %d: "
5037 "Unable to set 64/32-bit DMA\n", ha->hanum); 5037 "Unable to set 64/32-bit DMA\n", ha->hanum);
5038 goto out_free_coal_stat; 5038 goto out_free_coal_stat;
diff --git a/drivers/scsi/hptiop.c b/drivers/scsi/hptiop.c
index a13d78150cb5..c596ab5f05c3 100644
--- a/drivers/scsi/hptiop.c
+++ b/drivers/scsi/hptiop.c
@@ -959,7 +959,7 @@ static int __devinit hptiop_probe(struct pci_dev *pcidev,
959 959
960 /* Enable 64bit DMA if possible */ 960 /* Enable 64bit DMA if possible */
961 if (pci_set_dma_mask(pcidev, DMA_BIT_MASK(64))) { 961 if (pci_set_dma_mask(pcidev, DMA_BIT_MASK(64))) {
962 if (pci_set_dma_mask(pcidev, DMA_32BIT_MASK)) { 962 if (pci_set_dma_mask(pcidev, DMA_BIT_MASK(32))) {
963 printk(KERN_ERR "hptiop: fail to set dma_mask\n"); 963 printk(KERN_ERR "hptiop: fail to set dma_mask\n");
964 goto disable_pci_device; 964 goto disable_pci_device;
965 } 965 }
diff --git a/drivers/scsi/initio.c b/drivers/scsi/initio.c
index 5529518ff2fa..89a59484be02 100644
--- a/drivers/scsi/initio.c
+++ b/drivers/scsi/initio.c
@@ -2856,7 +2856,7 @@ static int initio_probe_one(struct pci_dev *pdev,
2856 reg = 0; 2856 reg = 0;
2857 bios_seg = (bios_seg << 8) + ((u16) ((reg & 0xFF00) >> 8)); 2857 bios_seg = (bios_seg << 8) + ((u16) ((reg & 0xFF00) >> 8));
2858 2858
2859 if (pci_set_dma_mask(pdev, DMA_32BIT_MASK)) { 2859 if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
2860 printk(KERN_WARNING "i91u: Could not set 32 bit DMA mask\n"); 2860 printk(KERN_WARNING "i91u: Could not set 32 bit DMA mask\n");
2861 error = -ENODEV; 2861 error = -ENODEV;
2862 goto out_disable_device; 2862 goto out_disable_device;
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index def473f0a98f..c09d77591f92 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -7498,7 +7498,7 @@ static int __devinit ipr_probe_ioa(struct pci_dev *pdev,
7498 7498
7499 pci_set_master(pdev); 7499 pci_set_master(pdev);
7500 7500
7501 rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 7501 rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
7502 if (rc < 0) { 7502 if (rc < 0) {
7503 dev_err(&pdev->dev, "Failed to set PCI DMA mask\n"); 7503 dev_err(&pdev->dev, "Failed to set PCI DMA mask\n");
7504 goto cleanup_nomem; 7504 goto cleanup_nomem;
diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c
index 45296a975f8b..f83a116955f2 100644
--- a/drivers/scsi/ips.c
+++ b/drivers/scsi/ips.c
@@ -7051,7 +7051,7 @@ ips_init_phase1(struct pci_dev *pci_dev, int *indexPtr)
7051 !pci_set_dma_mask(ha->pcidev, DMA_BIT_MASK(64))) { 7051 !pci_set_dma_mask(ha->pcidev, DMA_BIT_MASK(64))) {
7052 (ha)->flags |= IPS_HA_ENH_SG; 7052 (ha)->flags |= IPS_HA_ENH_SG;
7053 } else { 7053 } else {
7054 if (pci_set_dma_mask(ha->pcidev, DMA_32BIT_MASK) != 0) { 7054 if (pci_set_dma_mask(ha->pcidev, DMA_BIT_MASK(32)) != 0) {
7055 printk(KERN_WARNING "Unable to set DMA Mask\n"); 7055 printk(KERN_WARNING "Unable to set DMA Mask\n");
7056 return ips_abort_init(ha, index); 7056 return ips_abort_init(ha, index);
7057 } 7057 }
diff --git a/drivers/scsi/lasi700.c b/drivers/scsi/lasi700.c
index f23c4ca9a2ee..b3d31315ac32 100644
--- a/drivers/scsi/lasi700.c
+++ b/drivers/scsi/lasi700.c
@@ -108,7 +108,7 @@ lasi700_probe(struct parisc_device *dev)
108 } 108 }
109 109
110 hostdata->dev = &dev->dev; 110 hostdata->dev = &dev->dev;
111 dma_set_mask(&dev->dev, DMA_32BIT_MASK); 111 dma_set_mask(&dev->dev, DMA_BIT_MASK(32));
112 hostdata->base = ioremap_nocache(base, 0x100); 112 hostdata->base = ioremap_nocache(base, 0x100);
113 hostdata->differential = 0; 113 hostdata->differential = 0;
114 114
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index c255b4d94b1b..06874e6009ea 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -2661,7 +2661,7 @@ lpfc_pci_probe_one(struct pci_dev *pdev, const struct pci_device_id *pid)
2661 pci_try_set_mwi(pdev); 2661 pci_try_set_mwi(pdev);
2662 2662
2663 if (pci_set_dma_mask(phba->pcidev, DMA_BIT_MASK(64)) != 0) 2663 if (pci_set_dma_mask(phba->pcidev, DMA_BIT_MASK(64)) != 0)
2664 if (pci_set_dma_mask(phba->pcidev, DMA_32BIT_MASK) != 0) 2664 if (pci_set_dma_mask(phba->pcidev, DMA_BIT_MASK(32)) != 0)
2665 goto out_idr_remove; 2665 goto out_idr_remove;
2666 2666
2667 /* 2667 /*
diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c
index 112991d46d95..49eb0612d5af 100644
--- a/drivers/scsi/megaraid.c
+++ b/drivers/scsi/megaraid.c
@@ -2021,7 +2021,7 @@ make_local_pdev(adapter_t *adapter, struct pci_dev **pdev)
2021 2021
2022 memcpy(*pdev, adapter->dev, sizeof(struct pci_dev)); 2022 memcpy(*pdev, adapter->dev, sizeof(struct pci_dev));
2023 2023
2024 if( pci_set_dma_mask(*pdev, DMA_32BIT_MASK) != 0 ) { 2024 if( pci_set_dma_mask(*pdev, DMA_BIT_MASK(32)) != 0 ) {
2025 kfree(*pdev); 2025 kfree(*pdev);
2026 return -1; 2026 return -1;
2027 } 2027 }
@@ -4796,7 +4796,7 @@ megaraid_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
4796 pci_set_dma_mask(pdev, DMA_BIT_MASK(64)); 4796 pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
4797 adapter->has_64bit_addr = 1; 4797 adapter->has_64bit_addr = 1;
4798 } else { 4798 } else {
4799 pci_set_dma_mask(pdev, DMA_32BIT_MASK); 4799 pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
4800 adapter->has_64bit_addr = 0; 4800 adapter->has_64bit_addr = 0;
4801 } 4801 }
4802 4802
diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c
index b2c19449119d..234f0b7eb21c 100644
--- a/drivers/scsi/megaraid/megaraid_mbox.c
+++ b/drivers/scsi/megaraid/megaraid_mbox.c
@@ -473,7 +473,7 @@ megaraid_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
473 473
474 // Setup the default DMA mask. This would be changed later on 474 // Setup the default DMA mask. This would be changed later on
475 // depending on hardware capabilities 475 // depending on hardware capabilities
476 if (pci_set_dma_mask(adapter->pdev, DMA_32BIT_MASK) != 0) { 476 if (pci_set_dma_mask(adapter->pdev, DMA_BIT_MASK(32)) != 0) {
477 477
478 con_log(CL_ANN, (KERN_WARNING 478 con_log(CL_ANN, (KERN_WARNING
479 "megaraid: pci_set_dma_mask failed:%d\n", __LINE__)); 479 "megaraid: pci_set_dma_mask failed:%d\n", __LINE__));
@@ -904,7 +904,7 @@ megaraid_init_mbox(adapter_t *adapter)
904 con_log(CL_ANN, (KERN_WARNING 904 con_log(CL_ANN, (KERN_WARNING
905 "megaraid: DMA mask for 64-bit failed\n")); 905 "megaraid: DMA mask for 64-bit failed\n"));
906 906
907 if (pci_set_dma_mask (adapter->pdev, DMA_32BIT_MASK)) { 907 if (pci_set_dma_mask (adapter->pdev, DMA_BIT_MASK(32))) {
908 con_log(CL_ANN, (KERN_WARNING 908 con_log(CL_ANN, (KERN_WARNING
909 "megaraid: 32-bit DMA mask failed\n")); 909 "megaraid: 32-bit DMA mask failed\n"));
910 goto out_free_sysfs_res; 910 goto out_free_sysfs_res;
diff --git a/drivers/scsi/megaraid/megaraid_sas.c b/drivers/scsi/megaraid/megaraid_sas.c
index 713de85771f3..7dc3d1894b1a 100644
--- a/drivers/scsi/megaraid/megaraid_sas.c
+++ b/drivers/scsi/megaraid/megaraid_sas.c
@@ -2499,11 +2499,11 @@ megasas_set_dma_mask(struct pci_dev *pdev)
2499 if (IS_DMA64) { 2499 if (IS_DMA64) {
2500 if (pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) != 0) { 2500 if (pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) != 0) {
2501 2501
2502 if (pci_set_dma_mask(pdev, DMA_32BIT_MASK) != 0) 2502 if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32)) != 0)
2503 goto fail_set_dma_mask; 2503 goto fail_set_dma_mask;
2504 } 2504 }
2505 } else { 2505 } else {
2506 if (pci_set_dma_mask(pdev, DMA_32BIT_MASK) != 0) 2506 if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32)) != 0)
2507 goto fail_set_dma_mask; 2507 goto fail_set_dma_mask;
2508 } 2508 }
2509 return 0; 2509 return 0;
diff --git a/drivers/scsi/mvsas.c b/drivers/scsi/mvsas.c
index d8093a288438..e4acebd10d1b 100644
--- a/drivers/scsi/mvsas.c
+++ b/drivers/scsi/mvsas.c
@@ -878,7 +878,7 @@ static int pci_go_64(struct pci_dev *pdev)
878 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) { 878 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
879 rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)); 879 rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
880 if (rc) { 880 if (rc) {
881 rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); 881 rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
882 if (rc) { 882 if (rc) {
883 dev_printk(KERN_ERR, &pdev->dev, 883 dev_printk(KERN_ERR, &pdev->dev,
884 "64-bit DMA enable failed\n"); 884 "64-bit DMA enable failed\n");
@@ -886,13 +886,13 @@ static int pci_go_64(struct pci_dev *pdev)
886 } 886 }
887 } 887 }
888 } else { 888 } else {
889 rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 889 rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
890 if (rc) { 890 if (rc) {
891 dev_printk(KERN_ERR, &pdev->dev, 891 dev_printk(KERN_ERR, &pdev->dev,
892 "32-bit DMA enable failed\n"); 892 "32-bit DMA enable failed\n");
893 return rc; 893 return rc;
894 } 894 }
895 rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); 895 rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
896 if (rc) { 896 if (rc) {
897 dev_printk(KERN_ERR, &pdev->dev, 897 dev_printk(KERN_ERR, &pdev->dev,
898 "32-bit consistent DMA enable failed\n"); 898 "32-bit consistent DMA enable failed\n");
diff --git a/drivers/scsi/nsp32.c b/drivers/scsi/nsp32.c
index d06ec5aa6924..2be7d5b018d2 100644
--- a/drivers/scsi/nsp32.c
+++ b/drivers/scsi/nsp32.c
@@ -2672,7 +2672,7 @@ static int nsp32_detect(struct pci_dev *pdev)
2672 /* 2672 /*
2673 * setup DMA 2673 * setup DMA
2674 */ 2674 */
2675 if (pci_set_dma_mask(pdev, DMA_32BIT_MASK) != 0) { 2675 if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32)) != 0) {
2676 nsp32_msg (KERN_ERR, "failed to set PCI DMA mask"); 2676 nsp32_msg (KERN_ERR, "failed to set PCI DMA mask");
2677 goto scsi_unregister; 2677 goto scsi_unregister;
2678 } 2678 }
diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c
index 18f7f98ba571..687dcf2d0154 100644
--- a/drivers/scsi/qla1280.c
+++ b/drivers/scsi/qla1280.c
@@ -4276,7 +4276,7 @@ qla1280_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
4276 4276
4277#ifdef QLA_64BIT_PTR 4277#ifdef QLA_64BIT_PTR
4278 if (pci_set_dma_mask(ha->pdev, DMA_BIT_MASK(64))) { 4278 if (pci_set_dma_mask(ha->pdev, DMA_BIT_MASK(64))) {
4279 if (pci_set_dma_mask(ha->pdev, DMA_32BIT_MASK)) { 4279 if (pci_set_dma_mask(ha->pdev, DMA_BIT_MASK(32))) {
4280 printk(KERN_WARNING "scsi(%li): Unable to set a " 4280 printk(KERN_WARNING "scsi(%li): Unable to set a "
4281 "suitable DMA mask - aborting\n", ha->host_no); 4281 "suitable DMA mask - aborting\n", ha->host_no);
4282 error = -ENODEV; 4282 error = -ENODEV;
@@ -4286,7 +4286,7 @@ qla1280_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
4286 dprintk(2, "scsi(%li): 64 Bit PCI Addressing Enabled\n", 4286 dprintk(2, "scsi(%li): 64 Bit PCI Addressing Enabled\n",
4287 ha->host_no); 4287 ha->host_no);
4288#else 4288#else
4289 if (pci_set_dma_mask(ha->pdev, DMA_32BIT_MASK)) { 4289 if (pci_set_dma_mask(ha->pdev, DMA_BIT_MASK(32))) {
4290 printk(KERN_WARNING "scsi(%li): Unable to set a " 4290 printk(KERN_WARNING "scsi(%li): Unable to set a "
4291 "suitable DMA mask - aborting\n", ha->host_no); 4291 "suitable DMA mask - aborting\n", ha->host_no);
4292 error = -ENODEV; 4292 error = -ENODEV;
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index f60e136b5e1b..e4fdcdad80d0 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -1188,8 +1188,8 @@ qla2x00_config_dma_addressing(struct qla_hw_data *ha)
1188 } 1188 }
1189 } 1189 }
1190 1190
1191 dma_set_mask(&ha->pdev->dev, DMA_32BIT_MASK); 1191 dma_set_mask(&ha->pdev->dev, DMA_BIT_MASK(32));
1192 pci_set_consistent_dma_mask(ha->pdev, DMA_32BIT_MASK); 1192 pci_set_consistent_dma_mask(ha->pdev, DMA_BIT_MASK(32));
1193} 1193}
1194 1194
1195static void 1195static void
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index d427fab7a183..ec9da6ce8489 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -1375,10 +1375,10 @@ static void qla4xxx_config_dma_addressing(struct scsi_qla_host *ha)
1375 "Failed to set 64 bit PCI consistent mask; " 1375 "Failed to set 64 bit PCI consistent mask; "
1376 "using 32 bit.\n"); 1376 "using 32 bit.\n");
1377 retval = pci_set_consistent_dma_mask(ha->pdev, 1377 retval = pci_set_consistent_dma_mask(ha->pdev,
1378 DMA_32BIT_MASK); 1378 DMA_BIT_MASK(32));
1379 } 1379 }
1380 } else 1380 } else
1381 retval = pci_set_dma_mask(ha->pdev, DMA_32BIT_MASK); 1381 retval = pci_set_dma_mask(ha->pdev, DMA_BIT_MASK(32));
1382} 1382}
1383 1383
1384static int qla4xxx_slave_alloc(struct scsi_device *sdev) 1384static int qla4xxx_slave_alloc(struct scsi_device *sdev)
diff --git a/drivers/scsi/sni_53c710.c b/drivers/scsi/sni_53c710.c
index 77f0b2cdaa94..37b3359e863e 100644
--- a/drivers/scsi/sni_53c710.c
+++ b/drivers/scsi/sni_53c710.c
@@ -83,7 +83,7 @@ static int __init snirm710_probe(struct platform_device *dev)
83 } 83 }
84 84
85 hostdata->dev = &dev->dev; 85 hostdata->dev = &dev->dev;
86 dma_set_mask(&dev->dev, DMA_32BIT_MASK); 86 dma_set_mask(&dev->dev, DMA_BIT_MASK(32));
87 hostdata->base = ioremap_nocache(base, 0x100); 87 hostdata->base = ioremap_nocache(base, 0x100);
88 hostdata->differential = 0; 88 hostdata->differential = 0;
89 89
diff --git a/drivers/scsi/stex.c b/drivers/scsi/stex.c
index 7cb8063c4355..8d2a95c4e5b5 100644
--- a/drivers/scsi/stex.c
+++ b/drivers/scsi/stex.c
@@ -1398,9 +1398,9 @@ static int stex_set_dma_mask(struct pci_dev * pdev)
1398 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) 1398 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))
1399 && !pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64))) 1399 && !pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)))
1400 return 0; 1400 return 0;
1401 ret = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 1401 ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
1402 if (!ret) 1402 if (!ret)
1403 ret = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); 1403 ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
1404 return ret; 1404 return ret;
1405} 1405}
1406 1406
diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c
index 23e782015880..583966ec8266 100644
--- a/drivers/scsi/sym53c8xx_2/sym_glue.c
+++ b/drivers/scsi/sym53c8xx_2/sym_glue.c
@@ -1349,7 +1349,7 @@ static struct Scsi_Host * __devinit sym_attach(struct scsi_host_template *tpnt,
1349 if ((SYM_CONF_DMA_ADDRESSING_MODE > 0) && (np->features & FE_DAC) && 1349 if ((SYM_CONF_DMA_ADDRESSING_MODE > 0) && (np->features & FE_DAC) &&
1350 !pci_set_dma_mask(pdev, DMA_DAC_MASK)) { 1350 !pci_set_dma_mask(pdev, DMA_DAC_MASK)) {
1351 set_dac(np); 1351 set_dac(np);
1352 } else if (pci_set_dma_mask(pdev, DMA_32BIT_MASK)) { 1352 } else if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
1353 printf_warning("%s: No suitable DMA available\n", sym_name(np)); 1353 printf_warning("%s: No suitable DMA available\n", sym_name(np));
1354 goto attach_failed; 1354 goto attach_failed;
1355 } 1355 }
diff --git a/drivers/scsi/sym53c8xx_2/sym_hipd.h b/drivers/scsi/sym53c8xx_2/sym_hipd.h
index b707abe90821..9ebc8706b6bf 100644
--- a/drivers/scsi/sym53c8xx_2/sym_hipd.h
+++ b/drivers/scsi/sym53c8xx_2/sym_hipd.h
@@ -1080,7 +1080,7 @@ int sym_hcb_attach(struct Scsi_Host *shost, struct sym_fw *fw, struct sym_nvram
1080 */ 1080 */
1081 1081
1082#if SYM_CONF_DMA_ADDRESSING_MODE == 0 1082#if SYM_CONF_DMA_ADDRESSING_MODE == 0
1083#define DMA_DAC_MASK DMA_32BIT_MASK 1083#define DMA_DAC_MASK DMA_BIT_MASK(32)
1084#define sym_build_sge(np, data, badd, len) \ 1084#define sym_build_sge(np, data, badd, len) \
1085do { \ 1085do { \
1086 (data)->addr = cpu_to_scr(badd); \ 1086 (data)->addr = cpu_to_scr(badd); \