aboutsummaryrefslogtreecommitdiffstats
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
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>
-rw-r--r--arch/arm/mach-davinci/board-evm.c4
-rw-r--r--arch/arm/mach-davinci/usb.c4
-rw-r--r--arch/arm/mach-kirkwood/common.c2
-rw-r--r--arch/arm/mach-orion5x/common.c2
-rw-r--r--arch/arm/plat-iop/adma.c2
-rw-r--r--arch/avr32/boards/hammerhead/flash.c4
-rw-r--r--arch/avr32/mach-at32ap/at32ap700x.c8
-rw-r--r--arch/ia64/kernel/pci-dma.c2
-rw-r--r--arch/mips/alchemy/common/platform.c30
-rw-r--r--arch/mips/alchemy/devboards/pb1200/platform.c4
-rw-r--r--arch/mips/nxp/pnx833x/common/platform.c12
-rw-r--r--arch/mips/nxp/pnx8550/common/platform.c8
-rw-r--r--arch/mips/pmc-sierra/msp71xx/msp_usb.c8
-rw-r--r--arch/powerpc/kernel/dma.c2
-rw-r--r--arch/powerpc/kernel/of_platform.c2
-rw-r--r--arch/powerpc/platforms/iseries/iommu.c4
-rw-r--r--arch/powerpc/platforms/ps3/system-bus.c2
-rw-r--r--arch/x86/include/asm/dma-mapping.h4
-rw-r--r--arch/x86/kernel/pci-dma.c4
-rw-r--r--arch/x86/kernel/pci-nommu.c2
-rw-r--r--drivers/ata/ahci.c6
-rw-r--r--drivers/ata/pata_cs5520.c4
-rw-r--r--drivers/ata/pata_ixp4xx_cf.c2
-rw-r--r--drivers/ata/pdc_adma.c4
-rw-r--r--drivers/ata/sata_inic162x.c4
-rw-r--r--drivers/ata/sata_mv.c6
-rw-r--r--drivers/ata/sata_qstor.c6
-rw-r--r--drivers/ata/sata_sil24.c6
-rw-r--r--drivers/ata/sata_vsc.c4
-rw-r--r--drivers/atm/he.c2
-rw-r--r--drivers/atm/lanai.c4
-rw-r--r--drivers/block/DAC960.c8
-rw-r--r--drivers/block/cciss.c2
-rw-r--r--drivers/block/sx8.c2
-rw-r--r--drivers/block/umem.c2
-rw-r--r--drivers/crypto/hifn_795x.c2
-rw-r--r--drivers/crypto/ixp4xx_crypto.c2
-rw-r--r--drivers/dma/ioat.c4
-rw-r--r--drivers/firmware/dcdbas.c2
-rw-r--r--drivers/ide/cs5520.c2
-rw-r--r--drivers/ide/setup-pci.c2
-rw-r--r--drivers/ieee1394/pcilynx.c2
-rw-r--r--drivers/infiniband/hw/amso1100/c2.c2
-rw-r--r--drivers/infiniband/hw/ipath/ipath_driver.c4
-rw-r--r--drivers/infiniband/hw/mthca/mthca_main.c4
-rw-r--r--drivers/infiniband/hw/nes/nes.c4
-rw-r--r--drivers/media/dvb/dm1105/dm1105.c2
-rw-r--r--drivers/media/dvb/pluto2/pluto2.c2
-rw-r--r--drivers/media/video/bt8xx/bttv-driver.c2
-rw-r--r--drivers/media/video/cx88/cx88-alsa.c2
-rw-r--r--drivers/media/video/cx88/cx88-mpeg.c2
-rw-r--r--drivers/media/video/cx88/cx88-video.c2
-rw-r--r--drivers/media/video/meye.c2
-rw-r--r--drivers/media/video/saa7134/saa7134-core.c2
-rw-r--r--drivers/memstick/host/jmb38x_ms.c2
-rw-r--r--drivers/message/fusion/mptbase.c4
-rw-r--r--drivers/message/i2o/memory.c2
-rw-r--r--drivers/message/i2o/pci.c2
-rw-r--r--drivers/misc/tifm_7xx1.c2
-rw-r--r--drivers/mmc/host/sdhci-pci.c2
-rw-r--r--drivers/net/8139cp.c6
-rw-r--r--drivers/net/acenic.c2
-rw-r--r--drivers/net/amd8111e.c2
-rw-r--r--drivers/net/atl1e/atl1e_main.c4
-rw-r--r--drivers/net/atlx/atl1.c2
-rw-r--r--drivers/net/atlx/atl2.c4
-rw-r--r--drivers/net/bnx2.c2
-rw-r--r--drivers/net/bnx2x_main.c2
-rw-r--r--drivers/net/cassini.c2
-rw-r--r--drivers/net/chelsio/cxgb2.c2
-rw-r--r--drivers/net/cxgb3/cxgb3_main.c2
-rw-r--r--drivers/net/e100.c2
-rw-r--r--drivers/net/e1000/e1000_main.c4
-rw-r--r--drivers/net/e1000e/netdev.c8
-rw-r--r--drivers/net/enic/enic_main.c4
-rw-r--r--drivers/net/hp100.c2
-rw-r--r--drivers/net/igb/igb_main.c4
-rw-r--r--drivers/net/ioc3-eth.c2
-rw-r--r--drivers/net/ipg.c2
-rw-r--r--drivers/net/ixgb/ixgb_main.c4
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c8
-rw-r--r--drivers/net/jme.c4
-rw-r--r--drivers/net/mlx4/main.c4
-rw-r--r--drivers/net/myri10ge/myri10ge.c4
-rw-r--r--drivers/net/niu.c4
-rw-r--r--drivers/net/ns83820.c2
-rw-r--r--drivers/net/qla3xxx.c4
-rw-r--r--drivers/net/qlge/qlge_main.c4
-rw-r--r--drivers/net/r6040.c4
-rw-r--r--drivers/net/r8169.c8
-rw-r--r--drivers/net/s2io.c2
-rw-r--r--drivers/net/sc92031.c4
-rw-r--r--drivers/net/sis190.c2
-rw-r--r--drivers/net/sis900.c2
-rw-r--r--drivers/net/skge.c4
-rw-r--r--drivers/net/sky2.c2
-rw-r--r--drivers/net/smsc9420.c2
-rw-r--r--drivers/net/sungem.c2
-rw-r--r--drivers/net/tehuti.c4
-rw-r--r--drivers/net/tehuti.h4
-rw-r--r--drivers/net/tg3.c10
-rw-r--r--drivers/net/tlan.c2
-rw-r--r--drivers/net/tokenring/lanstreamer.c2
-rw-r--r--drivers/net/tulip/dmfe.c2
-rw-r--r--drivers/net/tulip/uli526x.c2
-rw-r--r--drivers/net/tulip/winbond-840.c2
-rw-r--r--drivers/net/typhoon.c2
-rw-r--r--drivers/net/via-rhine.c2
-rw-r--r--drivers/net/wan/wanxl.c4
-rw-r--r--drivers/net/wireless/adm8211.c4
-rw-r--r--drivers/net/wireless/ath5k/base.c2
-rw-r--r--drivers/net/wireless/b43/dma.c8
-rw-r--r--drivers/net/wireless/b43legacy/dma.c8
-rw-r--r--drivers/net/wireless/ipw2x00/ipw2100.c2
-rw-r--r--drivers/net/wireless/ipw2x00/ipw2200.c4
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c4
-rw-r--r--drivers/net/wireless/prism54/islpci_hotplug.c2
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00pci.c2
-rw-r--r--drivers/pci/intel-iommu.c8
-rw-r--r--drivers/rapidio/rio-scan.c4
-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
-rw-r--r--drivers/staging/agnx/pci.c4
-rw-r--r--drivers/staging/altpciechdma/altpciechdma.c4
-rw-r--r--drivers/staging/sxg/sxg.c4
-rw-r--r--drivers/usb/host/ehci-ps3.c2
-rw-r--r--drivers/usb/host/ohci-ps3.c2
-rw-r--r--drivers/uwb/whci.c4
-rw-r--r--include/linux/dma-mapping.h2
-rw-r--r--lib/swiotlb.c2
-rw-r--r--sound/pci/ad1889.c4
-rw-r--r--sound/pci/au88x0/au88x0.c4
-rw-r--r--sound/pci/aw2/aw2-alsa.c4
-rw-r--r--sound/pci/ca0106/ca0106_main.c4
-rw-r--r--sound/pci/cs5535audio/cs5535audio.c4
-rw-r--r--sound/pci/mixart/mixart.c2
-rw-r--r--sound/pci/pcxhr/pcxhr.c2
-rw-r--r--sound/soc/blackfin/bf5xx-ac97-pcm.c4
-rw-r--r--sound/soc/blackfin/bf5xx-i2s-pcm.c4
-rw-r--r--sound/soc/omap/omap-pcm.c2
-rw-r--r--sound/soc/pxa/pxa2xx-pcm.c4
-rw-r--r--sound/soc/s3c24xx/s3c24xx-pcm.c2
173 files changed, 309 insertions, 313 deletions
diff --git a/arch/arm/mach-davinci/board-evm.c b/arch/arm/mach-davinci/board-evm.c
index 38b6a9ce2a93..0b97a528902b 100644
--- a/arch/arm/mach-davinci/board-evm.c
+++ b/arch/arm/mach-davinci/board-evm.c
@@ -118,7 +118,7 @@ static struct resource ide_resources[] = {
118 }, 118 },
119}; 119};
120 120
121static u64 ide_dma_mask = DMA_32BIT_MASK; 121static u64 ide_dma_mask = DMA_BIT_MASK(32);
122 122
123static struct platform_device ide_dev = { 123static struct platform_device ide_dev = {
124 .name = "palm_bk3710", 124 .name = "palm_bk3710",
@@ -127,7 +127,7 @@ static struct platform_device ide_dev = {
127 .num_resources = ARRAY_SIZE(ide_resources), 127 .num_resources = ARRAY_SIZE(ide_resources),
128 .dev = { 128 .dev = {
129 .dma_mask = &ide_dma_mask, 129 .dma_mask = &ide_dma_mask,
130 .coherent_dma_mask = DMA_32BIT_MASK, 130 .coherent_dma_mask = DMA_BIT_MASK(32),
131 }, 131 },
132}; 132};
133 133
diff --git a/arch/arm/mach-davinci/usb.c b/arch/arm/mach-davinci/usb.c
index 69680784448a..2429b79f6da2 100644
--- a/arch/arm/mach-davinci/usb.c
+++ b/arch/arm/mach-davinci/usb.c
@@ -64,7 +64,7 @@ static struct resource usb_resources[] = {
64 }, 64 },
65}; 65};
66 66
67static u64 usb_dmamask = DMA_32BIT_MASK; 67static u64 usb_dmamask = DMA_BIT_MASK(32);
68 68
69static struct platform_device usb_dev = { 69static struct platform_device usb_dev = {
70 .name = "musb_hdrc", 70 .name = "musb_hdrc",
@@ -72,7 +72,7 @@ static struct platform_device usb_dev = {
72 .dev = { 72 .dev = {
73 .platform_data = &usb_data, 73 .platform_data = &usb_data,
74 .dma_mask = &usb_dmamask, 74 .dma_mask = &usb_dmamask,
75 .coherent_dma_mask = DMA_32BIT_MASK, 75 .coherent_dma_mask = DMA_BIT_MASK(32),
76 }, 76 },
77 .resource = usb_resources, 77 .resource = usb_resources,
78 .num_resources = ARRAY_SIZE(usb_resources), 78 .num_resources = ARRAY_SIZE(usb_resources),
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c
index c691848714d9..16dc9ea08393 100644
--- a/arch/arm/mach-kirkwood/common.c
+++ b/arch/arm/mach-kirkwood/common.c
@@ -508,7 +508,7 @@ static struct mv_xor_platform_shared_data kirkwood_xor_shared_data = {
508 .dram = &kirkwood_mbus_dram_info, 508 .dram = &kirkwood_mbus_dram_info,
509}; 509};
510 510
511static u64 kirkwood_xor_dmamask = DMA_32BIT_MASK; 511static u64 kirkwood_xor_dmamask = DMA_BIT_MASK(32);
512 512
513 513
514/***************************************************************************** 514/*****************************************************************************
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c
index e8d42e8cb465..6af99ddabdfb 100644
--- a/arch/arm/mach-orion5x/common.c
+++ b/arch/arm/mach-orion5x/common.c
@@ -463,7 +463,7 @@ static struct platform_device orion5x_xor_shared = {
463 .resource = orion5x_xor_shared_resources, 463 .resource = orion5x_xor_shared_resources,
464}; 464};
465 465
466static u64 orion5x_xor_dmamask = DMA_32BIT_MASK; 466static u64 orion5x_xor_dmamask = DMA_BIT_MASK(32);
467 467
468static struct resource orion5x_xor0_resources[] = { 468static struct resource orion5x_xor0_resources[] = {
469 [0] = { 469 [0] = {
diff --git a/arch/arm/plat-iop/adma.c b/arch/arm/plat-iop/adma.c
index a2a94f6d2e7c..3c127aabe214 100644
--- a/arch/arm/plat-iop/adma.c
+++ b/arch/arm/plat-iop/adma.c
@@ -119,7 +119,7 @@ static struct resource iop3xx_aau_resources[] = {
119 } 119 }
120}; 120};
121 121
122static u64 iop3xx_adma_dmamask = DMA_32BIT_MASK; 122static u64 iop3xx_adma_dmamask = DMA_BIT_MASK(32);
123 123
124static struct iop_adma_platform_data iop3xx_dma_0_data = { 124static struct iop_adma_platform_data iop3xx_dma_0_data = {
125 .hw_id = DMA0_ID, 125 .hw_id = DMA0_ID,
diff --git a/arch/avr32/boards/hammerhead/flash.c b/arch/avr32/boards/hammerhead/flash.c
index 559bbcb03f9b..776c3cb9b6e4 100644
--- a/arch/avr32/boards/hammerhead/flash.c
+++ b/arch/avr32/boards/hammerhead/flash.c
@@ -280,13 +280,13 @@ static struct resource hh_fpga0_resource[] = {
280 }, 280 },
281}; 281};
282 282
283static u64 hh_fpga0_dma_mask = DMA_32BIT_MASK; 283static u64 hh_fpga0_dma_mask = DMA_BIT_MASK(32);
284static struct platform_device hh_fpga0_device = { 284static struct platform_device hh_fpga0_device = {
285 .name = "hh_fpga", 285 .name = "hh_fpga",
286 .id = 0, 286 .id = 0,
287 .dev = { 287 .dev = {
288 .dma_mask = &hh_fpga0_dma_mask, 288 .dma_mask = &hh_fpga0_dma_mask,
289 .coherent_dma_mask = DMA_32BIT_MASK, 289 .coherent_dma_mask = DMA_BIT_MASK(32),
290 }, 290 },
291 .resource = hh_fpga0_resource, 291 .resource = hh_fpga0_resource,
292 .num_resources = ARRAY_SIZE(hh_fpga0_resource), 292 .num_resources = ARRAY_SIZE(hh_fpga0_resource),
diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c
index 7cc653798327..eb9d4dc2e86d 100644
--- a/arch/avr32/mach-at32ap/at32ap700x.c
+++ b/arch/avr32/mach-at32ap/at32ap700x.c
@@ -60,26 +60,26 @@
60 * don't ... tc, smc, pio, rtc, watchdog, pwm, ps2, and more. 60 * don't ... tc, smc, pio, rtc, watchdog, pwm, ps2, and more.
61 */ 61 */
62#define DEFINE_DEV(_name, _id) \ 62#define DEFINE_DEV(_name, _id) \
63static u64 _name##_id##_dma_mask = DMA_32BIT_MASK; \ 63static u64 _name##_id##_dma_mask = DMA_BIT_MASK(32); \
64static struct platform_device _name##_id##_device = { \ 64static struct platform_device _name##_id##_device = { \
65 .name = #_name, \ 65 .name = #_name, \
66 .id = _id, \ 66 .id = _id, \
67 .dev = { \ 67 .dev = { \
68 .dma_mask = &_name##_id##_dma_mask, \ 68 .dma_mask = &_name##_id##_dma_mask, \
69 .coherent_dma_mask = DMA_32BIT_MASK, \ 69 .coherent_dma_mask = DMA_BIT_MASK(32), \
70 }, \ 70 }, \
71 .resource = _name##_id##_resource, \ 71 .resource = _name##_id##_resource, \
72 .num_resources = ARRAY_SIZE(_name##_id##_resource), \ 72 .num_resources = ARRAY_SIZE(_name##_id##_resource), \
73} 73}
74#define DEFINE_DEV_DATA(_name, _id) \ 74#define DEFINE_DEV_DATA(_name, _id) \
75static u64 _name##_id##_dma_mask = DMA_32BIT_MASK; \ 75static u64 _name##_id##_dma_mask = DMA_BIT_MASK(32); \
76static struct platform_device _name##_id##_device = { \ 76static struct platform_device _name##_id##_device = { \
77 .name = #_name, \ 77 .name = #_name, \
78 .id = _id, \ 78 .id = _id, \
79 .dev = { \ 79 .dev = { \
80 .dma_mask = &_name##_id##_dma_mask, \ 80 .dma_mask = &_name##_id##_dma_mask, \
81 .platform_data = &_name##_id##_data, \ 81 .platform_data = &_name##_id##_data, \
82 .coherent_dma_mask = DMA_32BIT_MASK, \ 82 .coherent_dma_mask = DMA_BIT_MASK(32), \
83 }, \ 83 }, \
84 .resource = _name##_id##_resource, \ 84 .resource = _name##_id##_resource, \
85 .num_resources = ARRAY_SIZE(_name##_id##_resource), \ 85 .num_resources = ARRAY_SIZE(_name##_id##_resource), \
diff --git a/arch/ia64/kernel/pci-dma.c b/arch/ia64/kernel/pci-dma.c
index 8f34f3ddb83b..f82b0ee6bb1f 100644
--- a/arch/ia64/kernel/pci-dma.c
+++ b/arch/ia64/kernel/pci-dma.c
@@ -37,7 +37,7 @@ int force_iommu __read_mostly;
37 to i386. */ 37 to i386. */
38struct device fallback_dev = { 38struct device fallback_dev = {
39 .init_name = "fallback device", 39 .init_name = "fallback device",
40 .coherent_dma_mask = DMA_32BIT_MASK, 40 .coherent_dma_mask = DMA_BIT_MASK(32),
41 .dma_mask = &fallback_dev.coherent_dma_mask, 41 .dma_mask = &fallback_dev.coherent_dma_mask,
42}; 42};
43 43
diff --git a/arch/mips/alchemy/common/platform.c b/arch/mips/alchemy/common/platform.c
index 5c76c6448e04..117f99f70649 100644
--- a/arch/mips/alchemy/common/platform.c
+++ b/arch/mips/alchemy/common/platform.c
@@ -80,14 +80,14 @@ static struct resource au1xxx_usb_ohci_resources[] = {
80}; 80};
81 81
82/* The dmamask must be set for OHCI to work */ 82/* The dmamask must be set for OHCI to work */
83static u64 ohci_dmamask = DMA_32BIT_MASK; 83static u64 ohci_dmamask = DMA_BIT_MASK(32);
84 84
85static struct platform_device au1xxx_usb_ohci_device = { 85static struct platform_device au1xxx_usb_ohci_device = {
86 .name = "au1xxx-ohci", 86 .name = "au1xxx-ohci",
87 .id = 0, 87 .id = 0,
88 .dev = { 88 .dev = {
89 .dma_mask = &ohci_dmamask, 89 .dma_mask = &ohci_dmamask,
90 .coherent_dma_mask = DMA_32BIT_MASK, 90 .coherent_dma_mask = DMA_BIT_MASK(32),
91 }, 91 },
92 .num_resources = ARRAY_SIZE(au1xxx_usb_ohci_resources), 92 .num_resources = ARRAY_SIZE(au1xxx_usb_ohci_resources),
93 .resource = au1xxx_usb_ohci_resources, 93 .resource = au1xxx_usb_ohci_resources,
@@ -109,14 +109,14 @@ static struct resource au1100_lcd_resources[] = {
109 } 109 }
110}; 110};
111 111
112static u64 au1100_lcd_dmamask = DMA_32BIT_MASK; 112static u64 au1100_lcd_dmamask = DMA_BIT_MASK(32);
113 113
114static struct platform_device au1100_lcd_device = { 114static struct platform_device au1100_lcd_device = {
115 .name = "au1100-lcd", 115 .name = "au1100-lcd",
116 .id = 0, 116 .id = 0,
117 .dev = { 117 .dev = {
118 .dma_mask = &au1100_lcd_dmamask, 118 .dma_mask = &au1100_lcd_dmamask,
119 .coherent_dma_mask = DMA_32BIT_MASK, 119 .coherent_dma_mask = DMA_BIT_MASK(32),
120 }, 120 },
121 .num_resources = ARRAY_SIZE(au1100_lcd_resources), 121 .num_resources = ARRAY_SIZE(au1100_lcd_resources),
122 .resource = au1100_lcd_resources, 122 .resource = au1100_lcd_resources,
@@ -138,14 +138,14 @@ static struct resource au1xxx_usb_ehci_resources[] = {
138 }, 138 },
139}; 139};
140 140
141static u64 ehci_dmamask = DMA_32BIT_MASK; 141static u64 ehci_dmamask = DMA_BIT_MASK(32);
142 142
143static struct platform_device au1xxx_usb_ehci_device = { 143static struct platform_device au1xxx_usb_ehci_device = {
144 .name = "au1xxx-ehci", 144 .name = "au1xxx-ehci",
145 .id = 0, 145 .id = 0,
146 .dev = { 146 .dev = {
147 .dma_mask = &ehci_dmamask, 147 .dma_mask = &ehci_dmamask,
148 .coherent_dma_mask = DMA_32BIT_MASK, 148 .coherent_dma_mask = DMA_BIT_MASK(32),
149 }, 149 },
150 .num_resources = ARRAY_SIZE(au1xxx_usb_ehci_resources), 150 .num_resources = ARRAY_SIZE(au1xxx_usb_ehci_resources),
151 .resource = au1xxx_usb_ehci_resources, 151 .resource = au1xxx_usb_ehci_resources,
@@ -165,14 +165,14 @@ static struct resource au1xxx_usb_gdt_resources[] = {
165 }, 165 },
166}; 166};
167 167
168static u64 udc_dmamask = DMA_32BIT_MASK; 168static u64 udc_dmamask = DMA_BIT_MASK(32);
169 169
170static struct platform_device au1xxx_usb_gdt_device = { 170static struct platform_device au1xxx_usb_gdt_device = {
171 .name = "au1xxx-udc", 171 .name = "au1xxx-udc",
172 .id = 0, 172 .id = 0,
173 .dev = { 173 .dev = {
174 .dma_mask = &udc_dmamask, 174 .dma_mask = &udc_dmamask,
175 .coherent_dma_mask = DMA_32BIT_MASK, 175 .coherent_dma_mask = DMA_BIT_MASK(32),
176 }, 176 },
177 .num_resources = ARRAY_SIZE(au1xxx_usb_gdt_resources), 177 .num_resources = ARRAY_SIZE(au1xxx_usb_gdt_resources),
178 .resource = au1xxx_usb_gdt_resources, 178 .resource = au1xxx_usb_gdt_resources,
@@ -192,14 +192,14 @@ static struct resource au1xxx_usb_otg_resources[] = {
192 }, 192 },
193}; 193};
194 194
195static u64 uoc_dmamask = DMA_32BIT_MASK; 195static u64 uoc_dmamask = DMA_BIT_MASK(32);
196 196
197static struct platform_device au1xxx_usb_otg_device = { 197static struct platform_device au1xxx_usb_otg_device = {
198 .name = "au1xxx-uoc", 198 .name = "au1xxx-uoc",
199 .id = 0, 199 .id = 0,
200 .dev = { 200 .dev = {
201 .dma_mask = &uoc_dmamask, 201 .dma_mask = &uoc_dmamask,
202 .coherent_dma_mask = DMA_32BIT_MASK, 202 .coherent_dma_mask = DMA_BIT_MASK(32),
203 }, 203 },
204 .num_resources = ARRAY_SIZE(au1xxx_usb_otg_resources), 204 .num_resources = ARRAY_SIZE(au1xxx_usb_otg_resources),
205 .resource = au1xxx_usb_otg_resources, 205 .resource = au1xxx_usb_otg_resources,
@@ -218,20 +218,20 @@ static struct resource au1200_lcd_resources[] = {
218 } 218 }
219}; 219};
220 220
221static u64 au1200_lcd_dmamask = DMA_32BIT_MASK; 221static u64 au1200_lcd_dmamask = DMA_BIT_MASK(32);
222 222
223static struct platform_device au1200_lcd_device = { 223static struct platform_device au1200_lcd_device = {
224 .name = "au1200-lcd", 224 .name = "au1200-lcd",
225 .id = 0, 225 .id = 0,
226 .dev = { 226 .dev = {
227 .dma_mask = &au1200_lcd_dmamask, 227 .dma_mask = &au1200_lcd_dmamask,
228 .coherent_dma_mask = DMA_32BIT_MASK, 228 .coherent_dma_mask = DMA_BIT_MASK(32),
229 }, 229 },
230 .num_resources = ARRAY_SIZE(au1200_lcd_resources), 230 .num_resources = ARRAY_SIZE(au1200_lcd_resources),
231 .resource = au1200_lcd_resources, 231 .resource = au1200_lcd_resources,
232}; 232};
233 233
234static u64 au1xxx_mmc_dmamask = DMA_32BIT_MASK; 234static u64 au1xxx_mmc_dmamask = DMA_BIT_MASK(32);
235 235
236extern struct au1xmmc_platform_data au1xmmc_platdata[2]; 236extern struct au1xmmc_platform_data au1xmmc_platdata[2];
237 237
@@ -263,7 +263,7 @@ static struct platform_device au1200_mmc0_device = {
263 .id = 0, 263 .id = 0,
264 .dev = { 264 .dev = {
265 .dma_mask = &au1xxx_mmc_dmamask, 265 .dma_mask = &au1xxx_mmc_dmamask,
266 .coherent_dma_mask = DMA_32BIT_MASK, 266 .coherent_dma_mask = DMA_BIT_MASK(32),
267 .platform_data = &au1xmmc_platdata[0], 267 .platform_data = &au1xmmc_platdata[0],
268 }, 268 },
269 .num_resources = ARRAY_SIZE(au1200_mmc0_resources), 269 .num_resources = ARRAY_SIZE(au1200_mmc0_resources),
@@ -299,7 +299,7 @@ static struct platform_device au1200_mmc1_device = {
299 .id = 1, 299 .id = 1,
300 .dev = { 300 .dev = {
301 .dma_mask = &au1xxx_mmc_dmamask, 301 .dma_mask = &au1xxx_mmc_dmamask,
302 .coherent_dma_mask = DMA_32BIT_MASK, 302 .coherent_dma_mask = DMA_BIT_MASK(32),
303 .platform_data = &au1xmmc_platdata[1], 303 .platform_data = &au1xmmc_platdata[1],
304 }, 304 },
305 .num_resources = ARRAY_SIZE(au1200_mmc1_resources), 305 .num_resources = ARRAY_SIZE(au1200_mmc1_resources),
diff --git a/arch/mips/alchemy/devboards/pb1200/platform.c b/arch/mips/alchemy/devboards/pb1200/platform.c
index 0d68e1985ffd..b93dff4a6789 100644
--- a/arch/mips/alchemy/devboards/pb1200/platform.c
+++ b/arch/mips/alchemy/devboards/pb1200/platform.c
@@ -119,14 +119,14 @@ static struct resource ide_resources[] = {
119 } 119 }
120}; 120};
121 121
122static u64 ide_dmamask = DMA_32BIT_MASK; 122static u64 ide_dmamask = DMA_BIT_MASK(32);
123 123
124static struct platform_device ide_device = { 124static struct platform_device ide_device = {
125 .name = "au1200-ide", 125 .name = "au1200-ide",
126 .id = 0, 126 .id = 0,
127 .dev = { 127 .dev = {
128 .dma_mask = &ide_dmamask, 128 .dma_mask = &ide_dmamask,
129 .coherent_dma_mask = DMA_32BIT_MASK, 129 .coherent_dma_mask = DMA_BIT_MASK(32),
130 }, 130 },
131 .num_resources = ARRAY_SIZE(ide_resources), 131 .num_resources = ARRAY_SIZE(ide_resources),
132 .resource = ide_resources 132 .resource = ide_resources
diff --git a/arch/mips/nxp/pnx833x/common/platform.c b/arch/mips/nxp/pnx833x/common/platform.c
index b1ccbcc18f78..01f8345a2069 100644
--- a/arch/mips/nxp/pnx833x/common/platform.c
+++ b/arch/mips/nxp/pnx833x/common/platform.c
@@ -42,7 +42,7 @@
42#include <irq-mapping.h> 42#include <irq-mapping.h>
43#include <pnx833x.h> 43#include <pnx833x.h>
44 44
45static u64 uart_dmamask = DMA_32BIT_MASK; 45static u64 uart_dmamask = DMA_BIT_MASK(32);
46 46
47static struct resource pnx833x_uart_resources[] = { 47static struct resource pnx833x_uart_resources[] = {
48 [0] = { 48 [0] = {
@@ -101,14 +101,14 @@ static struct platform_device pnx833x_uart_device = {
101 .id = -1, 101 .id = -1,
102 .dev = { 102 .dev = {
103 .dma_mask = &uart_dmamask, 103 .dma_mask = &uart_dmamask,
104 .coherent_dma_mask = DMA_32BIT_MASK, 104 .coherent_dma_mask = DMA_BIT_MASK(32),
105 .platform_data = pnx8xxx_ports, 105 .platform_data = pnx8xxx_ports,
106 }, 106 },
107 .num_resources = ARRAY_SIZE(pnx833x_uart_resources), 107 .num_resources = ARRAY_SIZE(pnx833x_uart_resources),
108 .resource = pnx833x_uart_resources, 108 .resource = pnx833x_uart_resources,
109}; 109};
110 110
111static u64 ehci_dmamask = DMA_32BIT_MASK; 111static u64 ehci_dmamask = DMA_BIT_MASK(32);
112 112
113static struct resource pnx833x_usb_ehci_resources[] = { 113static struct resource pnx833x_usb_ehci_resources[] = {
114 [0] = { 114 [0] = {
@@ -128,7 +128,7 @@ static struct platform_device pnx833x_usb_ehci_device = {
128 .id = -1, 128 .id = -1,
129 .dev = { 129 .dev = {
130 .dma_mask = &ehci_dmamask, 130 .dma_mask = &ehci_dmamask,
131 .coherent_dma_mask = DMA_32BIT_MASK, 131 .coherent_dma_mask = DMA_BIT_MASK(32),
132 }, 132 },
133 .num_resources = ARRAY_SIZE(pnx833x_usb_ehci_resources), 133 .num_resources = ARRAY_SIZE(pnx833x_usb_ehci_resources),
134 .resource = pnx833x_usb_ehci_resources, 134 .resource = pnx833x_usb_ehci_resources,
@@ -198,7 +198,7 @@ static struct platform_device pnx833x_i2c1_device = {
198}; 198};
199#endif 199#endif
200 200
201static u64 ethernet_dmamask = DMA_32BIT_MASK; 201static u64 ethernet_dmamask = DMA_BIT_MASK(32);
202 202
203static struct resource pnx833x_ethernet_resources[] = { 203static struct resource pnx833x_ethernet_resources[] = {
204 [0] = { 204 [0] = {
@@ -218,7 +218,7 @@ static struct platform_device pnx833x_ethernet_device = {
218 .id = -1, 218 .id = -1,
219 .dev = { 219 .dev = {
220 .dma_mask = &ethernet_dmamask, 220 .dma_mask = &ethernet_dmamask,
221 .coherent_dma_mask = DMA_32BIT_MASK, 221 .coherent_dma_mask = DMA_BIT_MASK(32),
222 }, 222 },
223 .num_resources = ARRAY_SIZE(pnx833x_ethernet_resources), 223 .num_resources = ARRAY_SIZE(pnx833x_ethernet_resources),
224 .resource = pnx833x_ethernet_resources, 224 .resource = pnx833x_ethernet_resources,
diff --git a/arch/mips/nxp/pnx8550/common/platform.c b/arch/mips/nxp/pnx8550/common/platform.c
index 21d2955359b3..5264cc09a27b 100644
--- a/arch/mips/nxp/pnx8550/common/platform.c
+++ b/arch/mips/nxp/pnx8550/common/platform.c
@@ -92,16 +92,16 @@ struct pnx8xxx_port pnx8xxx_ports[] = {
92}; 92};
93 93
94/* The dmamask must be set for OHCI to work */ 94/* The dmamask must be set for OHCI to work */
95static u64 ohci_dmamask = DMA_32BIT_MASK; 95static u64 ohci_dmamask = DMA_BIT_MASK(32);
96 96
97static u64 uart_dmamask = DMA_32BIT_MASK; 97static u64 uart_dmamask = DMA_BIT_MASK(32);
98 98
99static struct platform_device pnx8550_usb_ohci_device = { 99static struct platform_device pnx8550_usb_ohci_device = {
100 .name = "pnx8550-ohci", 100 .name = "pnx8550-ohci",
101 .id = -1, 101 .id = -1,
102 .dev = { 102 .dev = {
103 .dma_mask = &ohci_dmamask, 103 .dma_mask = &ohci_dmamask,
104 .coherent_dma_mask = DMA_32BIT_MASK, 104 .coherent_dma_mask = DMA_BIT_MASK(32),
105 }, 105 },
106 .num_resources = ARRAY_SIZE(pnx8550_usb_ohci_resources), 106 .num_resources = ARRAY_SIZE(pnx8550_usb_ohci_resources),
107 .resource = pnx8550_usb_ohci_resources, 107 .resource = pnx8550_usb_ohci_resources,
@@ -112,7 +112,7 @@ static struct platform_device pnx8550_uart_device = {
112 .id = -1, 112 .id = -1,
113 .dev = { 113 .dev = {
114 .dma_mask = &uart_dmamask, 114 .dma_mask = &uart_dmamask,
115 .coherent_dma_mask = DMA_32BIT_MASK, 115 .coherent_dma_mask = DMA_BIT_MASK(32),
116 .platform_data = pnx8xxx_ports, 116 .platform_data = pnx8xxx_ports,
117 }, 117 },
118 .num_resources = ARRAY_SIZE(pnx8550_uart_resources), 118 .num_resources = ARRAY_SIZE(pnx8550_uart_resources),
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_usb.c b/arch/mips/pmc-sierra/msp71xx/msp_usb.c
index f7ca4f582331..0ee01e359dd8 100644
--- a/arch/mips/pmc-sierra/msp71xx/msp_usb.c
+++ b/arch/mips/pmc-sierra/msp71xx/msp_usb.c
@@ -49,14 +49,14 @@ static struct resource msp_usbhost_resources [] = {
49 }, 49 },
50}; 50};
51 51
52static u64 msp_usbhost_dma_mask = DMA_32BIT_MASK; 52static u64 msp_usbhost_dma_mask = DMA_BIT_MASK(32);
53 53
54static struct platform_device msp_usbhost_device = { 54static struct platform_device msp_usbhost_device = {
55 .name = "pmcmsp-ehci", 55 .name = "pmcmsp-ehci",
56 .id = 0, 56 .id = 0,
57 .dev = { 57 .dev = {
58 .dma_mask = &msp_usbhost_dma_mask, 58 .dma_mask = &msp_usbhost_dma_mask,
59 .coherent_dma_mask = DMA_32BIT_MASK, 59 .coherent_dma_mask = DMA_BIT_MASK(32),
60 }, 60 },
61 .num_resources = ARRAY_SIZE(msp_usbhost_resources), 61 .num_resources = ARRAY_SIZE(msp_usbhost_resources),
62 .resource = msp_usbhost_resources, 62 .resource = msp_usbhost_resources,
@@ -77,14 +77,14 @@ static struct resource msp_usbdev_resources [] = {
77 }, 77 },
78}; 78};
79 79
80static u64 msp_usbdev_dma_mask = DMA_32BIT_MASK; 80static u64 msp_usbdev_dma_mask = DMA_BIT_MASK(32);
81 81
82static struct platform_device msp_usbdev_device = { 82static struct platform_device msp_usbdev_device = {
83 .name = "msp71xx_udc", 83 .name = "msp71xx_udc",
84 .id = 0, 84 .id = 0,
85 .dev = { 85 .dev = {
86 .dma_mask = &msp_usbdev_dma_mask, 86 .dma_mask = &msp_usbdev_dma_mask,
87 .coherent_dma_mask = DMA_32BIT_MASK, 87 .coherent_dma_mask = DMA_BIT_MASK(32),
88 }, 88 },
89 .num_resources = ARRAY_SIZE(msp_usbdev_resources), 89 .num_resources = ARRAY_SIZE(msp_usbdev_resources),
90 .resource = msp_usbdev_resources, 90 .resource = msp_usbdev_resources,
diff --git a/arch/powerpc/kernel/dma.c b/arch/powerpc/kernel/dma.c
index 1c5c8a6fc129..53c7788cba78 100644
--- a/arch/powerpc/kernel/dma.c
+++ b/arch/powerpc/kernel/dma.c
@@ -94,7 +94,7 @@ static int dma_direct_dma_supported(struct device *dev, u64 mask)
94 * done via some global so platforms can set the limit in case 94 * done via some global so platforms can set the limit in case
95 * they have limited DMA windows 95 * they have limited DMA windows
96 */ 96 */
97 return mask >= DMA_32BIT_MASK; 97 return mask >= DMA_BIT_MASK(32);
98#else 98#else
99 return 1; 99 return 1;
100#endif 100#endif
diff --git a/arch/powerpc/kernel/of_platform.c b/arch/powerpc/kernel/of_platform.c
index 3f37a6e62771..87df428e3588 100644
--- a/arch/powerpc/kernel/of_platform.c
+++ b/arch/powerpc/kernel/of_platform.c
@@ -76,7 +76,7 @@ struct of_device* of_platform_device_create(struct device_node *np,
76 return NULL; 76 return NULL;
77 77
78 dev->dma_mask = 0xffffffffUL; 78 dev->dma_mask = 0xffffffffUL;
79 dev->dev.coherent_dma_mask = DMA_32BIT_MASK; 79 dev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
80 80
81 dev->dev.bus = &of_platform_bus_type; 81 dev->dev.bus = &of_platform_bus_type;
82 82
diff --git a/arch/powerpc/platforms/iseries/iommu.c b/arch/powerpc/platforms/iseries/iommu.c
index 6ed75bffc8ab..ff43f1fd8343 100644
--- a/arch/powerpc/platforms/iseries/iommu.c
+++ b/arch/powerpc/platforms/iseries/iommu.c
@@ -202,7 +202,7 @@ static struct iommu_table vio_iommu_table;
202void *iseries_hv_alloc(size_t size, dma_addr_t *dma_handle, gfp_t flag) 202void *iseries_hv_alloc(size_t size, dma_addr_t *dma_handle, gfp_t flag)
203{ 203{
204 return iommu_alloc_coherent(NULL, &vio_iommu_table, size, dma_handle, 204 return iommu_alloc_coherent(NULL, &vio_iommu_table, size, dma_handle,
205 DMA_32BIT_MASK, flag, -1); 205 DMA_BIT_MASK(32), flag, -1);
206} 206}
207EXPORT_SYMBOL_GPL(iseries_hv_alloc); 207EXPORT_SYMBOL_GPL(iseries_hv_alloc);
208 208
@@ -217,7 +217,7 @@ dma_addr_t iseries_hv_map(void *vaddr, size_t size,
217{ 217{
218 return iommu_map_page(NULL, &vio_iommu_table, virt_to_page(vaddr), 218 return iommu_map_page(NULL, &vio_iommu_table, virt_to_page(vaddr),
219 (unsigned long)vaddr % PAGE_SIZE, size, 219 (unsigned long)vaddr % PAGE_SIZE, size,
220 DMA_32BIT_MASK, direction, NULL); 220 DMA_BIT_MASK(32), direction, NULL);
221} 221}
222 222
223void iseries_hv_unmap(dma_addr_t dma_handle, size_t size, 223void iseries_hv_unmap(dma_addr_t dma_handle, size_t size,
diff --git a/arch/powerpc/platforms/ps3/system-bus.c b/arch/powerpc/platforms/ps3/system-bus.c
index a705fffbb498..9a73d0238639 100644
--- a/arch/powerpc/platforms/ps3/system-bus.c
+++ b/arch/powerpc/platforms/ps3/system-bus.c
@@ -689,7 +689,7 @@ static void ps3_ioc0_unmap_sg(struct device *_dev, struct scatterlist *sg,
689 689
690static int ps3_dma_supported(struct device *_dev, u64 mask) 690static int ps3_dma_supported(struct device *_dev, u64 mask)
691{ 691{
692 return mask >= DMA_32BIT_MASK; 692 return mask >= DMA_BIT_MASK(32);
693} 693}
694 694
695static struct dma_mapping_ops ps3_sb_dma_ops = { 695static struct dma_mapping_ops ps3_sb_dma_ops = {
diff --git a/arch/x86/include/asm/dma-mapping.h b/arch/x86/include/asm/dma-mapping.h
index cea7b74963e9..10a6be94eb77 100644
--- a/arch/x86/include/asm/dma-mapping.h
+++ b/arch/x86/include/asm/dma-mapping.h
@@ -238,7 +238,7 @@ static inline unsigned long dma_alloc_coherent_mask(struct device *dev,
238 238
239 dma_mask = dev->coherent_dma_mask; 239 dma_mask = dev->coherent_dma_mask;
240 if (!dma_mask) 240 if (!dma_mask)
241 dma_mask = (gfp & GFP_DMA) ? DMA_24BIT_MASK : DMA_32BIT_MASK; 241 dma_mask = (gfp & GFP_DMA) ? DMA_24BIT_MASK : DMA_BIT_MASK(32);
242 242
243 return dma_mask; 243 return dma_mask;
244} 244}
@@ -250,7 +250,7 @@ static inline gfp_t dma_alloc_coherent_gfp_flags(struct device *dev, gfp_t gfp)
250 if (dma_mask <= DMA_24BIT_MASK) 250 if (dma_mask <= DMA_24BIT_MASK)
251 gfp |= GFP_DMA; 251 gfp |= GFP_DMA;
252#ifdef CONFIG_X86_64 252#ifdef CONFIG_X86_64
253 if (dma_mask <= DMA_32BIT_MASK && !(gfp & GFP_DMA)) 253 if (dma_mask <= DMA_BIT_MASK(32) && !(gfp & GFP_DMA))
254 gfp |= GFP_DMA32; 254 gfp |= GFP_DMA32;
255#endif 255#endif
256 return gfp; 256 return gfp;
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
index 0cf2d900422b..136a01d52db0 100644
--- a/arch/x86/kernel/pci-dma.c
+++ b/arch/x86/kernel/pci-dma.c
@@ -40,7 +40,7 @@ EXPORT_SYMBOL(bad_dma_address);
40 to older i386. */ 40 to older i386. */
41struct device x86_dma_fallback_dev = { 41struct device x86_dma_fallback_dev = {
42 .init_name = "fallback device", 42 .init_name = "fallback device",
43 .coherent_dma_mask = DMA_32BIT_MASK, 43 .coherent_dma_mask = DMA_BIT_MASK(32),
44 .dma_mask = &x86_dma_fallback_dev.coherent_dma_mask, 44 .dma_mask = &x86_dma_fallback_dev.coherent_dma_mask,
45}; 45};
46EXPORT_SYMBOL(x86_dma_fallback_dev); 46EXPORT_SYMBOL(x86_dma_fallback_dev);
@@ -148,7 +148,7 @@ again:
148 if (!is_buffer_dma_capable(dma_mask, addr, size)) { 148 if (!is_buffer_dma_capable(dma_mask, addr, size)) {
149 __free_pages(page, get_order(size)); 149 __free_pages(page, get_order(size));
150 150
151 if (dma_mask < DMA_32BIT_MASK && !(flag & GFP_DMA)) { 151 if (dma_mask < DMA_BIT_MASK(32) && !(flag & GFP_DMA)) {
152 flag = (flag & ~GFP_DMA32) | GFP_DMA; 152 flag = (flag & ~GFP_DMA32) | GFP_DMA;
153 goto again; 153 goto again;
154 } 154 }
diff --git a/arch/x86/kernel/pci-nommu.c b/arch/x86/kernel/pci-nommu.c
index c6d703b39326..71d412a09f30 100644
--- a/arch/x86/kernel/pci-nommu.c
+++ b/arch/x86/kernel/pci-nommu.c
@@ -15,7 +15,7 @@ static int
15check_addr(char *name, struct device *hwdev, dma_addr_t bus, size_t size) 15check_addr(char *name, struct device *hwdev, dma_addr_t bus, size_t size)
16{ 16{
17 if (hwdev && !is_buffer_dma_capable(*hwdev->dma_mask, bus, size)) { 17 if (hwdev && !is_buffer_dma_capable(*hwdev->dma_mask, bus, size)) {
18 if (*hwdev->dma_mask >= DMA_32BIT_MASK) 18 if (*hwdev->dma_mask >= DMA_BIT_MASK(32))
19 printk(KERN_ERR 19 printk(KERN_ERR
20 "nommu_%s: overflow %Lx+%zu of device mask %Lx\n", 20 "nommu_%s: overflow %Lx+%zu of device mask %Lx\n",
21 name, (long long)bus, size, 21 name, (long long)bus, size,
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 207d775c3c27..f75dac57dc2b 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -2408,7 +2408,7 @@ static int ahci_configure_dma_masks(struct pci_dev *pdev, int using_dac)
2408 !pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) { 2408 !pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
2409 rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)); 2409 rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
2410 if (rc) { 2410 if (rc) {
2411 rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); 2411 rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
2412 if (rc) { 2412 if (rc) {
2413 dev_printk(KERN_ERR, &pdev->dev, 2413 dev_printk(KERN_ERR, &pdev->dev,
2414 "64-bit DMA enable failed\n"); 2414 "64-bit DMA enable failed\n");
@@ -2416,13 +2416,13 @@ static int ahci_configure_dma_masks(struct pci_dev *pdev, int using_dac)
2416 } 2416 }
2417 } 2417 }
2418 } else { 2418 } else {
2419 rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 2419 rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
2420 if (rc) { 2420 if (rc) {
2421 dev_printk(KERN_ERR, &pdev->dev, 2421 dev_printk(KERN_ERR, &pdev->dev,
2422 "32-bit DMA enable failed\n"); 2422 "32-bit DMA enable failed\n");
2423 return rc; 2423 return rc;
2424 } 2424 }
2425 rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); 2425 rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
2426 if (rc) { 2426 if (rc) {
2427 dev_printk(KERN_ERR, &pdev->dev, 2427 dev_printk(KERN_ERR, &pdev->dev,
2428 "32-bit consistent DMA enable failed\n"); 2428 "32-bit consistent DMA enable failed\n");
diff --git a/drivers/ata/pata_cs5520.c b/drivers/ata/pata_cs5520.c
index db6a96984f3f..0df83cf74233 100644
--- a/drivers/ata/pata_cs5520.c
+++ b/drivers/ata/pata_cs5520.c
@@ -203,11 +203,11 @@ static int __devinit cs5520_init_one(struct pci_dev *pdev, const struct pci_devi
203 return -ENODEV; 203 return -ENODEV;
204 } 204 }
205 205
206 if (pci_set_dma_mask(pdev, DMA_32BIT_MASK)) { 206 if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
207 printk(KERN_ERR DRV_NAME ": unable to configure DMA mask.\n"); 207 printk(KERN_ERR DRV_NAME ": unable to configure DMA mask.\n");
208 return -ENODEV; 208 return -ENODEV;
209 } 209 }
210 if (pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK)) { 210 if (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32))) {
211 printk(KERN_ERR DRV_NAME ": unable to configure consistent DMA mask.\n"); 211 printk(KERN_ERR DRV_NAME ": unable to configure consistent DMA mask.\n");
212 return -ENODEV; 212 return -ENODEV;
213 } 213 }
diff --git a/drivers/ata/pata_ixp4xx_cf.c b/drivers/ata/pata_ixp4xx_cf.c
index 19fdecf319a6..ba54b089f98c 100644
--- a/drivers/ata/pata_ixp4xx_cf.c
+++ b/drivers/ata/pata_ixp4xx_cf.c
@@ -157,7 +157,7 @@ static __devinit int ixp4xx_pata_probe(struct platform_device *pdev)
157 return -ENOMEM; 157 return -ENOMEM;
158 158
159 /* acquire resources and fill host */ 159 /* acquire resources and fill host */
160 pdev->dev.coherent_dma_mask = DMA_32BIT_MASK; 160 pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
161 161
162 data->cs0 = devm_ioremap(&pdev->dev, cs0->start, 0x1000); 162 data->cs0 = devm_ioremap(&pdev->dev, cs0->start, 0x1000);
163 data->cs1 = devm_ioremap(&pdev->dev, cs1->start, 0x1000); 163 data->cs1 = devm_ioremap(&pdev->dev, cs1->start, 0x1000);
diff --git a/drivers/ata/pdc_adma.c b/drivers/ata/pdc_adma.c
index 39588178d028..6c65b0776a2c 100644
--- a/drivers/ata/pdc_adma.c
+++ b/drivers/ata/pdc_adma.c
@@ -607,13 +607,13 @@ static int adma_set_dma_masks(struct pci_dev *pdev, void __iomem *mmio_base)
607{ 607{
608 int rc; 608 int rc;
609 609
610 rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 610 rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
611 if (rc) { 611 if (rc) {
612 dev_printk(KERN_ERR, &pdev->dev, 612 dev_printk(KERN_ERR, &pdev->dev,
613 "32-bit DMA enable failed\n"); 613 "32-bit DMA enable failed\n");
614 return rc; 614 return rc;
615 } 615 }
616 rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); 616 rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
617 if (rc) { 617 if (rc) {
618 dev_printk(KERN_ERR, &pdev->dev, 618 dev_printk(KERN_ERR, &pdev->dev,
619 "32-bit consistent DMA enable failed\n"); 619 "32-bit consistent DMA enable failed\n");
diff --git a/drivers/ata/sata_inic162x.c b/drivers/ata/sata_inic162x.c
index 305a4f825f53..8d890cc5a7ee 100644
--- a/drivers/ata/sata_inic162x.c
+++ b/drivers/ata/sata_inic162x.c
@@ -861,14 +861,14 @@ static int inic_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
861 } 861 }
862 862
863 /* Set dma_mask. This devices doesn't support 64bit addressing. */ 863 /* Set dma_mask. This devices doesn't support 64bit addressing. */
864 rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 864 rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
865 if (rc) { 865 if (rc) {
866 dev_printk(KERN_ERR, &pdev->dev, 866 dev_printk(KERN_ERR, &pdev->dev,
867 "32-bit DMA enable failed\n"); 867 "32-bit DMA enable failed\n");
868 return rc; 868 return rc;
869 } 869 }
870 870
871 rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); 871 rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
872 if (rc) { 872 if (rc) {
873 dev_printk(KERN_ERR, &pdev->dev, 873 dev_printk(KERN_ERR, &pdev->dev,
874 "32-bit consistent DMA enable failed\n"); 874 "32-bit consistent DMA enable failed\n");
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 45e0fe191afc..5af3ea19d3c5 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -3916,7 +3916,7 @@ static int pci_go_64(struct pci_dev *pdev)
3916 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) { 3916 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
3917 rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)); 3917 rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
3918 if (rc) { 3918 if (rc) {
3919 rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); 3919 rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
3920 if (rc) { 3920 if (rc) {
3921 dev_printk(KERN_ERR, &pdev->dev, 3921 dev_printk(KERN_ERR, &pdev->dev,
3922 "64-bit DMA enable failed\n"); 3922 "64-bit DMA enable failed\n");
@@ -3924,13 +3924,13 @@ static int pci_go_64(struct pci_dev *pdev)
3924 } 3924 }
3925 } 3925 }
3926 } else { 3926 } else {
3927 rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 3927 rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
3928 if (rc) { 3928 if (rc) {
3929 dev_printk(KERN_ERR, &pdev->dev, 3929 dev_printk(KERN_ERR, &pdev->dev,
3930 "32-bit DMA enable failed\n"); 3930 "32-bit DMA enable failed\n");
3931 return rc; 3931 return rc;
3932 } 3932 }
3933 rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); 3933 rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
3934 if (rc) { 3934 if (rc) {
3935 dev_printk(KERN_ERR, &pdev->dev, 3935 dev_printk(KERN_ERR, &pdev->dev,
3936 "32-bit consistent DMA enable failed\n"); 3936 "32-bit consistent DMA enable failed\n");
diff --git a/drivers/ata/sata_qstor.c b/drivers/ata/sata_qstor.c
index 7b37c27d7972..326c0cfc29b3 100644
--- a/drivers/ata/sata_qstor.c
+++ b/drivers/ata/sata_qstor.c
@@ -587,7 +587,7 @@ static int qs_set_dma_masks(struct pci_dev *pdev, void __iomem *mmio_base)
587 !pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) { 587 !pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
588 rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)); 588 rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
589 if (rc) { 589 if (rc) {
590 rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); 590 rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
591 if (rc) { 591 if (rc) {
592 dev_printk(KERN_ERR, &pdev->dev, 592 dev_printk(KERN_ERR, &pdev->dev,
593 "64-bit DMA enable failed\n"); 593 "64-bit DMA enable failed\n");
@@ -595,13 +595,13 @@ static int qs_set_dma_masks(struct pci_dev *pdev, void __iomem *mmio_base)
595 } 595 }
596 } 596 }
597 } else { 597 } else {
598 rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 598 rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
599 if (rc) { 599 if (rc) {
600 dev_printk(KERN_ERR, &pdev->dev, 600 dev_printk(KERN_ERR, &pdev->dev,
601 "32-bit DMA enable failed\n"); 601 "32-bit DMA enable failed\n");
602 return rc; 602 return rc;
603 } 603 }
604 rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); 604 rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
605 if (rc) { 605 if (rc) {
606 dev_printk(KERN_ERR, &pdev->dev, 606 dev_printk(KERN_ERR, &pdev->dev,
607 "32-bit consistent DMA enable failed\n"); 607 "32-bit consistent DMA enable failed\n");
diff --git a/drivers/ata/sata_sil24.c b/drivers/ata/sata_sil24.c
index 37730bc2f09f..77aa8d7ecec4 100644
--- a/drivers/ata/sata_sil24.c
+++ b/drivers/ata/sata_sil24.c
@@ -1300,7 +1300,7 @@ static int sil24_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
1300 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) { 1300 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
1301 rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)); 1301 rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
1302 if (rc) { 1302 if (rc) {
1303 rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); 1303 rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
1304 if (rc) { 1304 if (rc) {
1305 dev_printk(KERN_ERR, &pdev->dev, 1305 dev_printk(KERN_ERR, &pdev->dev,
1306 "64-bit DMA enable failed\n"); 1306 "64-bit DMA enable failed\n");
@@ -1308,13 +1308,13 @@ static int sil24_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
1308 } 1308 }
1309 } 1309 }
1310 } else { 1310 } else {
1311 rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 1311 rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
1312 if (rc) { 1312 if (rc) {
1313 dev_printk(KERN_ERR, &pdev->dev, 1313 dev_printk(KERN_ERR, &pdev->dev,
1314 "32-bit DMA enable failed\n"); 1314 "32-bit DMA enable failed\n");
1315 return rc; 1315 return rc;
1316 } 1316 }
1317 rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); 1317 rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
1318 if (rc) { 1318 if (rc) {
1319 dev_printk(KERN_ERR, &pdev->dev, 1319 dev_printk(KERN_ERR, &pdev->dev,
1320 "32-bit consistent DMA enable failed\n"); 1320 "32-bit consistent DMA enable failed\n");
diff --git a/drivers/ata/sata_vsc.c b/drivers/ata/sata_vsc.c
index ed70bd28fa2c..8b2a278b2547 100644
--- a/drivers/ata/sata_vsc.c
+++ b/drivers/ata/sata_vsc.c
@@ -399,10 +399,10 @@ static int __devinit vsc_sata_init_one(struct pci_dev *pdev,
399 /* 399 /*
400 * Use 32 bit DMA mask, because 64 bit address support is poor. 400 * Use 32 bit DMA mask, because 64 bit address support is poor.
401 */ 401 */
402 rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 402 rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
403 if (rc) 403 if (rc)
404 return rc; 404 return rc;
405 rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); 405 rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
406 if (rc) 406 if (rc)
407 return rc; 407 return rc;
408 408
diff --git a/drivers/atm/he.c b/drivers/atm/he.c
index bdbad7edf682..2de64065aa1b 100644
--- a/drivers/atm/he.c
+++ b/drivers/atm/he.c
@@ -358,7 +358,7 @@ he_init_one(struct pci_dev *pci_dev, const struct pci_device_id *pci_ent)
358 358
359 if (pci_enable_device(pci_dev)) 359 if (pci_enable_device(pci_dev))
360 return -EIO; 360 return -EIO;
361 if (pci_set_dma_mask(pci_dev, DMA_32BIT_MASK) != 0) { 361 if (pci_set_dma_mask(pci_dev, DMA_BIT_MASK(32)) != 0) {
362 printk(KERN_WARNING "he: no suitable dma available\n"); 362 printk(KERN_WARNING "he: no suitable dma available\n");
363 err = -EIO; 363 err = -EIO;
364 goto init_one_failure; 364 goto init_one_failure;
diff --git a/drivers/atm/lanai.c b/drivers/atm/lanai.c
index 8733a2ea04c2..cf97c34cbaf1 100644
--- a/drivers/atm/lanai.c
+++ b/drivers/atm/lanai.c
@@ -1957,12 +1957,12 @@ static int __devinit lanai_pci_start(struct lanai_dev *lanai)
1957 return -ENXIO; 1957 return -ENXIO;
1958 } 1958 }
1959 pci_set_master(pci); 1959 pci_set_master(pci);
1960 if (pci_set_dma_mask(pci, DMA_32BIT_MASK) != 0) { 1960 if (pci_set_dma_mask(pci, DMA_BIT_MASK(32)) != 0) {
1961 printk(KERN_WARNING DEV_LABEL 1961 printk(KERN_WARNING DEV_LABEL
1962 "(itf %d): No suitable DMA available.\n", lanai->number); 1962 "(itf %d): No suitable DMA available.\n", lanai->number);
1963 return -EBUSY; 1963 return -EBUSY;
1964 } 1964 }
1965 if (pci_set_consistent_dma_mask(pci, DMA_32BIT_MASK) != 0) { 1965 if (pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(32)) != 0) {
1966 printk(KERN_WARNING DEV_LABEL 1966 printk(KERN_WARNING DEV_LABEL
1967 "(itf %d): No suitable DMA available.\n", lanai->number); 1967 "(itf %d): No suitable DMA available.\n", lanai->number);
1968 return -EBUSY; 1968 return -EBUSY;
diff --git a/drivers/block/DAC960.c b/drivers/block/DAC960.c
index 5496865b297e..f22ed6cc69f2 100644
--- a/drivers/block/DAC960.c
+++ b/drivers/block/DAC960.c
@@ -1169,9 +1169,9 @@ static bool DAC960_V1_EnableMemoryMailboxInterface(DAC960_Controller_T
1169 int i; 1169 int i;
1170 1170
1171 1171
1172 if (pci_set_dma_mask(Controller->PCIDevice, DMA_32BIT_MASK)) 1172 if (pci_set_dma_mask(Controller->PCIDevice, DMA_BIT_MASK(32)))
1173 return DAC960_Failure(Controller, "DMA mask out of range"); 1173 return DAC960_Failure(Controller, "DMA mask out of range");
1174 Controller->BounceBufferLimit = DMA_32BIT_MASK; 1174 Controller->BounceBufferLimit = DMA_BIT_MASK(32);
1175 1175
1176 if ((hw_type == DAC960_PD_Controller) || (hw_type == DAC960_P_Controller)) { 1176 if ((hw_type == DAC960_PD_Controller) || (hw_type == DAC960_P_Controller)) {
1177 CommandMailboxesSize = 0; 1177 CommandMailboxesSize = 0;
@@ -1374,8 +1374,8 @@ static bool DAC960_V2_EnableMemoryMailboxInterface(DAC960_Controller_T
1374 1374
1375 if (!pci_set_dma_mask(Controller->PCIDevice, DMA_BIT_MASK(64))) 1375 if (!pci_set_dma_mask(Controller->PCIDevice, DMA_BIT_MASK(64)))
1376 Controller->BounceBufferLimit = DMA_BIT_MASK(64); 1376 Controller->BounceBufferLimit = DMA_BIT_MASK(64);
1377 else if (!pci_set_dma_mask(Controller->PCIDevice, DMA_32BIT_MASK)) 1377 else if (!pci_set_dma_mask(Controller->PCIDevice, DMA_BIT_MASK(32)))
1378 Controller->BounceBufferLimit = DMA_32BIT_MASK; 1378 Controller->BounceBufferLimit = DMA_BIT_MASK(32);
1379 else 1379 else
1380 return DAC960_Failure(Controller, "DMA mask out of range"); 1380 return DAC960_Failure(Controller, "DMA mask out of range");
1381 1381
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index 149a611e8fe5..a6c55432819b 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -3639,7 +3639,7 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
3639 /* configure PCI DMA stuff */ 3639 /* configure PCI DMA stuff */
3640 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) 3640 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64)))
3641 dac = 1; 3641 dac = 1;
3642 else if (!pci_set_dma_mask(pdev, DMA_32BIT_MASK)) 3642 else if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(32)))
3643 dac = 0; 3643 dac = 0;
3644 else { 3644 else {
3645 printk(KERN_ERR "cciss: no suitable DMA available\n"); 3645 printk(KERN_ERR "cciss: no suitable DMA available\n");
diff --git a/drivers/block/sx8.c b/drivers/block/sx8.c
index db5783ace1e4..ff0448e4bf03 100644
--- a/drivers/block/sx8.c
+++ b/drivers/block/sx8.c
@@ -1597,7 +1597,7 @@ static int carm_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
1597 pci_dac = 1; 1597 pci_dac = 1;
1598 } else { 1598 } else {
1599#endif 1599#endif
1600 rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 1600 rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
1601 if (rc) { 1601 if (rc) {
1602 printk(KERN_ERR DRV_NAME "(%s): DMA mask failure\n", 1602 printk(KERN_ERR DRV_NAME "(%s): DMA mask failure\n",
1603 pci_name(pdev)); 1603 pci_name(pdev));
diff --git a/drivers/block/umem.c b/drivers/block/umem.c
index e93e99c9103c..9744d59a69f2 100644
--- a/drivers/block/umem.c
+++ b/drivers/block/umem.c
@@ -830,7 +830,7 @@ static int __devinit mm_pci_probe(struct pci_dev *dev,
830 "Micro Memory(tm) controller found (PCI Mem Module (Battery Backup))\n"); 830 "Micro Memory(tm) controller found (PCI Mem Module (Battery Backup))\n");
831 831
832 if (pci_set_dma_mask(dev, DMA_BIT_MASK(64)) && 832 if (pci_set_dma_mask(dev, DMA_BIT_MASK(64)) &&
833 pci_set_dma_mask(dev, DMA_32BIT_MASK)) { 833 pci_set_dma_mask(dev, DMA_BIT_MASK(32))) {
834 dev_printk(KERN_WARNING, &dev->dev, "NO suitable DMA found\n"); 834 dev_printk(KERN_WARNING, &dev->dev, "NO suitable DMA found\n");
835 return -ENOMEM; 835 return -ENOMEM;
836 } 836 }
diff --git a/drivers/crypto/hifn_795x.c b/drivers/crypto/hifn_795x.c
index 4d85402a9e4a..2bef086fb342 100644
--- a/drivers/crypto/hifn_795x.c
+++ b/drivers/crypto/hifn_795x.c
@@ -2575,7 +2575,7 @@ static int hifn_probe(struct pci_dev *pdev, const struct pci_device_id *id)
2575 return err; 2575 return err;
2576 pci_set_master(pdev); 2576 pci_set_master(pdev);
2577 2577
2578 err = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 2578 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
2579 if (err) 2579 if (err)
2580 goto err_out_disable_pci_device; 2580 goto err_out_disable_pci_device;
2581 2581
diff --git a/drivers/crypto/ixp4xx_crypto.c b/drivers/crypto/ixp4xx_crypto.c
index af9761ccf9f1..f9f05d7a707d 100644
--- a/drivers/crypto/ixp4xx_crypto.c
+++ b/drivers/crypto/ixp4xx_crypto.c
@@ -209,7 +209,7 @@ static struct platform_device pseudo_dev = {
209 .id = 0, 209 .id = 0,
210 .num_resources = 0, 210 .num_resources = 0,
211 .dev = { 211 .dev = {
212 .coherent_dma_mask = DMA_32BIT_MASK, 212 .coherent_dma_mask = DMA_BIT_MASK(32),
213 .release = dev_release, 213 .release = dev_release,
214 } 214 }
215}; 215};
diff --git a/drivers/dma/ioat.c b/drivers/dma/ioat.c
index 22e9f1911111..2225bb6ba3d1 100644
--- a/drivers/dma/ioat.c
+++ b/drivers/dma/ioat.c
@@ -100,13 +100,13 @@ static int __devinit ioat_probe(struct pci_dev *pdev,
100 100
101 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(64)); 101 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
102 if (err) 102 if (err)
103 err = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 103 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
104 if (err) 104 if (err)
105 goto err_set_dma_mask; 105 goto err_set_dma_mask;
106 106
107 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)); 107 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
108 if (err) 108 if (err)
109 err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); 109 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
110 if (err) 110 if (err)
111 goto err_set_dma_mask; 111 goto err_set_dma_mask;
112 112
diff --git a/drivers/firmware/dcdbas.c b/drivers/firmware/dcdbas.c
index 3009e0171e54..18d65fb42ee7 100644
--- a/drivers/firmware/dcdbas.c
+++ b/drivers/firmware/dcdbas.c
@@ -545,7 +545,7 @@ static int __devinit dcdbas_probe(struct platform_device *dev)
545 * BIOS SMI calls require buffer addresses be in 32-bit address space. 545 * BIOS SMI calls require buffer addresses be in 32-bit address space.
546 * This is done by setting the DMA mask below. 546 * This is done by setting the DMA mask below.
547 */ 547 */
548 dcdbas_pdev->dev.coherent_dma_mask = DMA_32BIT_MASK; 548 dcdbas_pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
549 dcdbas_pdev->dev.dma_mask = &dcdbas_pdev->dev.coherent_dma_mask; 549 dcdbas_pdev->dev.dma_mask = &dcdbas_pdev->dev.coherent_dma_mask;
550 550
551 error = sysfs_create_group(&dev->dev.kobj, &dcdbas_attr_group); 551 error = sysfs_create_group(&dev->dev.kobj, &dcdbas_attr_group);
diff --git a/drivers/ide/cs5520.c b/drivers/ide/cs5520.c
index 58fb90e5b763..87987a7d36c9 100644
--- a/drivers/ide/cs5520.c
+++ b/drivers/ide/cs5520.c
@@ -122,7 +122,7 @@ static int __devinit cs5520_init_one(struct pci_dev *dev, const struct pci_devic
122 return -ENODEV; 122 return -ENODEV;
123 } 123 }
124 pci_set_master(dev); 124 pci_set_master(dev);
125 if (pci_set_dma_mask(dev, DMA_32BIT_MASK)) { 125 if (pci_set_dma_mask(dev, DMA_BIT_MASK(32))) {
126 printk(KERN_WARNING "%s: No suitable DMA available.\n", 126 printk(KERN_WARNING "%s: No suitable DMA available.\n",
127 d->name); 127 d->name);
128 return -ENODEV; 128 return -ENODEV;
diff --git a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c
index a19dbccd7617..7a3a12d6e638 100644
--- a/drivers/ide/setup-pci.c
+++ b/drivers/ide/setup-pci.c
@@ -208,7 +208,7 @@ static int ide_pci_enable(struct pci_dev *dev, const struct ide_port_info *d)
208 * a DMA mask field to the struct ide_port_info if we need it 208 * a DMA mask field to the struct ide_port_info if we need it
209 * (or let lower level driver set the DMA mask) 209 * (or let lower level driver set the DMA mask)
210 */ 210 */
211 ret = pci_set_dma_mask(dev, DMA_32BIT_MASK); 211 ret = pci_set_dma_mask(dev, DMA_BIT_MASK(32));
212 if (ret < 0) { 212 if (ret < 0) {
213 printk(KERN_ERR "%s %s: can't set DMA mask\n", 213 printk(KERN_ERR "%s %s: can't set DMA mask\n",
214 d->name, pci_name(dev)); 214 d->name, pci_name(dev));
diff --git a/drivers/ieee1394/pcilynx.c b/drivers/ieee1394/pcilynx.c
index 38f712036201..9555fd253865 100644
--- a/drivers/ieee1394/pcilynx.c
+++ b/drivers/ieee1394/pcilynx.c
@@ -1171,7 +1171,7 @@ static int __devinit add_card(struct pci_dev *dev,
1171 1171
1172 error = -ENXIO; 1172 error = -ENXIO;
1173 1173
1174 if (pci_set_dma_mask(dev, DMA_32BIT_MASK)) 1174 if (pci_set_dma_mask(dev, DMA_BIT_MASK(32)))
1175 FAIL("DMA address limits not supported for PCILynx hardware"); 1175 FAIL("DMA address limits not supported for PCILynx hardware");
1176 if (pci_enable_device(dev)) 1176 if (pci_enable_device(dev))
1177 FAIL("failed to enable PCILynx hardware"); 1177 FAIL("failed to enable PCILynx hardware");
diff --git a/drivers/infiniband/hw/amso1100/c2.c b/drivers/infiniband/hw/amso1100/c2.c
index 54d2e0760abf..0cfbb6d2f762 100644
--- a/drivers/infiniband/hw/amso1100/c2.c
+++ b/drivers/infiniband/hw/amso1100/c2.c
@@ -995,7 +995,7 @@ static int __devinit c2_probe(struct pci_dev *pcidev,
995 goto bail2; 995 goto bail2;
996 } 996 }
997 } else { 997 } else {
998 ret = pci_set_dma_mask(pcidev, DMA_32BIT_MASK); 998 ret = pci_set_dma_mask(pcidev, DMA_BIT_MASK(32));
999 if (ret < 0) { 999 if (ret < 0) {
1000 printk(KERN_ERR PFX "32b DMA configuration failed\n"); 1000 printk(KERN_ERR PFX "32b DMA configuration failed\n");
1001 goto bail2; 1001 goto bail2;
diff --git a/drivers/infiniband/hw/ipath/ipath_driver.c b/drivers/infiniband/hw/ipath/ipath_driver.c
index 77b2fb5b7c35..04e88b600558 100644
--- a/drivers/infiniband/hw/ipath/ipath_driver.c
+++ b/drivers/infiniband/hw/ipath/ipath_driver.c
@@ -477,7 +477,7 @@ static int __devinit ipath_init_one(struct pci_dev *pdev,
477 * do not setup 64 bit maps on systems with 2GB or less 477 * do not setup 64 bit maps on systems with 2GB or less
478 * memory installed. 478 * memory installed.
479 */ 479 */
480 ret = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 480 ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
481 if (ret) { 481 if (ret) {
482 dev_info(&pdev->dev, 482 dev_info(&pdev->dev,
483 "Unable to set DMA mask for unit %u: %d\n", 483 "Unable to set DMA mask for unit %u: %d\n",
@@ -486,7 +486,7 @@ static int __devinit ipath_init_one(struct pci_dev *pdev,
486 } 486 }
487 else { 487 else {
488 ipath_dbg("No 64bit DMA mask, used 32 bit mask\n"); 488 ipath_dbg("No 64bit DMA mask, used 32 bit mask\n");
489 ret = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); 489 ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
490 if (ret) 490 if (ret)
491 dev_info(&pdev->dev, 491 dev_info(&pdev->dev,
492 "Unable to set DMA consistent mask " 492 "Unable to set DMA consistent mask "
diff --git a/drivers/infiniband/hw/mthca/mthca_main.c b/drivers/infiniband/hw/mthca/mthca_main.c
index 5d234204f7b7..1d83cf7caf38 100644
--- a/drivers/infiniband/hw/mthca/mthca_main.c
+++ b/drivers/infiniband/hw/mthca/mthca_main.c
@@ -1019,7 +1019,7 @@ static int __mthca_init_one(struct pci_dev *pdev, int hca_type)
1019 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(64)); 1019 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
1020 if (err) { 1020 if (err) {
1021 dev_warn(&pdev->dev, "Warning: couldn't set 64-bit PCI DMA mask.\n"); 1021 dev_warn(&pdev->dev, "Warning: couldn't set 64-bit PCI DMA mask.\n");
1022 err = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 1022 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
1023 if (err) { 1023 if (err) {
1024 dev_err(&pdev->dev, "Can't set PCI DMA mask, aborting.\n"); 1024 dev_err(&pdev->dev, "Can't set PCI DMA mask, aborting.\n");
1025 goto err_free_res; 1025 goto err_free_res;
@@ -1029,7 +1029,7 @@ static int __mthca_init_one(struct pci_dev *pdev, int hca_type)
1029 if (err) { 1029 if (err) {
1030 dev_warn(&pdev->dev, "Warning: couldn't set 64-bit " 1030 dev_warn(&pdev->dev, "Warning: couldn't set 64-bit "
1031 "consistent PCI DMA mask.\n"); 1031 "consistent PCI DMA mask.\n");
1032 err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); 1032 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
1033 if (err) { 1033 if (err) {
1034 dev_err(&pdev->dev, "Can't set consistent PCI DMA mask, " 1034 dev_err(&pdev->dev, "Can't set consistent PCI DMA mask, "
1035 "aborting.\n"); 1035 "aborting.\n");
diff --git a/drivers/infiniband/hw/nes/nes.c b/drivers/infiniband/hw/nes/nes.c
index 7446810446e1..cbde0cfe27e0 100644
--- a/drivers/infiniband/hw/nes/nes.c
+++ b/drivers/infiniband/hw/nes/nes.c
@@ -489,12 +489,12 @@ static int __devinit nes_probe(struct pci_dev *pcidev, const struct pci_device_i
489 goto bail2; 489 goto bail2;
490 } 490 }
491 } else { 491 } else {
492 ret = pci_set_dma_mask(pcidev, DMA_32BIT_MASK); 492 ret = pci_set_dma_mask(pcidev, DMA_BIT_MASK(32));
493 if (ret < 0) { 493 if (ret < 0) {
494 printk(KERN_ERR PFX "32b DMA mask configuration failed\n"); 494 printk(KERN_ERR PFX "32b DMA mask configuration failed\n");
495 goto bail2; 495 goto bail2;
496 } 496 }
497 ret = pci_set_consistent_dma_mask(pcidev, DMA_32BIT_MASK); 497 ret = pci_set_consistent_dma_mask(pcidev, DMA_BIT_MASK(32));
498 if (ret) { 498 if (ret) {
499 printk(KERN_ERR PFX "32b DMA consistent mask configuration failed\n"); 499 printk(KERN_ERR PFX "32b DMA consistent mask configuration failed\n");
500 goto bail2; 500 goto bail2;
diff --git a/drivers/media/dvb/dm1105/dm1105.c b/drivers/media/dvb/dm1105/dm1105.c
index 5b20cf5a29f0..971a8b18f6dd 100644
--- a/drivers/media/dvb/dm1105/dm1105.c
+++ b/drivers/media/dvb/dm1105/dm1105.c
@@ -662,7 +662,7 @@ static int __devinit dm1105_probe(struct pci_dev *pdev,
662 if (ret < 0) 662 if (ret < 0)
663 goto err_kfree; 663 goto err_kfree;
664 664
665 ret = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 665 ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
666 if (ret < 0) 666 if (ret < 0)
667 goto err_pci_disable_device; 667 goto err_pci_disable_device;
668 668
diff --git a/drivers/media/dvb/pluto2/pluto2.c b/drivers/media/dvb/pluto2/pluto2.c
index ee89623be85a..598eaf8acc6e 100644
--- a/drivers/media/dvb/pluto2/pluto2.c
+++ b/drivers/media/dvb/pluto2/pluto2.c
@@ -616,7 +616,7 @@ static int __devinit pluto2_probe(struct pci_dev *pdev,
616 /* enable interrupts */ 616 /* enable interrupts */
617 pci_write_config_dword(pdev, 0x6c, 0x8000); 617 pci_write_config_dword(pdev, 0x6c, 0x8000);
618 618
619 ret = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 619 ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
620 if (ret < 0) 620 if (ret < 0)
621 goto err_pci_disable_device; 621 goto err_pci_disable_device;
622 622
diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c
index 74f619d6cc93..23b7499b3185 100644
--- a/drivers/media/video/bt8xx/bttv-driver.c
+++ b/drivers/media/video/bt8xx/bttv-driver.c
@@ -4317,7 +4317,7 @@ static int __devinit bttv_probe(struct pci_dev *dev,
4317 btv->c.nr); 4317 btv->c.nr);
4318 return -EIO; 4318 return -EIO;
4319 } 4319 }
4320 if (pci_set_dma_mask(dev, DMA_32BIT_MASK)) { 4320 if (pci_set_dma_mask(dev, DMA_BIT_MASK(32))) {
4321 printk(KERN_WARNING "bttv%d: No suitable DMA available.\n", 4321 printk(KERN_WARNING "bttv%d: No suitable DMA available.\n",
4322 btv->c.nr); 4322 btv->c.nr);
4323 return -EIO; 4323 return -EIO;
diff --git a/drivers/media/video/cx88/cx88-alsa.c b/drivers/media/video/cx88/cx88-alsa.c
index ce98d955231a..0ccdf36626e3 100644
--- a/drivers/media/video/cx88/cx88-alsa.c
+++ b/drivers/media/video/cx88/cx88-alsa.c
@@ -745,7 +745,7 @@ static int __devinit snd_cx88_create(struct snd_card *card,
745 return err; 745 return err;
746 } 746 }
747 747
748 if (!pci_dma_supported(pci,DMA_32BIT_MASK)) { 748 if (!pci_dma_supported(pci,DMA_BIT_MASK(32))) {
749 dprintk(0, "%s/1: Oops: no 32bit PCI DMA ???\n",core->name); 749 dprintk(0, "%s/1: Oops: no 32bit PCI DMA ???\n",core->name);
750 err = -EIO; 750 err = -EIO;
751 cx88_core_put(core,pci); 751 cx88_core_put(core,pci);
diff --git a/drivers/media/video/cx88/cx88-mpeg.c b/drivers/media/video/cx88/cx88-mpeg.c
index b295b76737e3..da4e3912cd37 100644
--- a/drivers/media/video/cx88/cx88-mpeg.c
+++ b/drivers/media/video/cx88/cx88-mpeg.c
@@ -455,7 +455,7 @@ static int cx8802_init_common(struct cx8802_dev *dev)
455 if (pci_enable_device(dev->pci)) 455 if (pci_enable_device(dev->pci))
456 return -EIO; 456 return -EIO;
457 pci_set_master(dev->pci); 457 pci_set_master(dev->pci);
458 if (!pci_dma_supported(dev->pci,DMA_32BIT_MASK)) { 458 if (!pci_dma_supported(dev->pci,DMA_BIT_MASK(32))) {
459 printk("%s/2: Oops: no 32bit PCI DMA ???\n",dev->core->name); 459 printk("%s/2: Oops: no 32bit PCI DMA ???\n",dev->core->name);
460 return -EIO; 460 return -EIO;
461 } 461 }
diff --git a/drivers/media/video/cx88/cx88-video.c b/drivers/media/video/cx88/cx88-video.c
index ec0425d9043a..b993d42fe73c 100644
--- a/drivers/media/video/cx88/cx88-video.c
+++ b/drivers/media/video/cx88/cx88-video.c
@@ -1832,7 +1832,7 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev,
1832 dev->pci_lat,(unsigned long long)pci_resource_start(pci_dev,0)); 1832 dev->pci_lat,(unsigned long long)pci_resource_start(pci_dev,0));
1833 1833
1834 pci_set_master(pci_dev); 1834 pci_set_master(pci_dev);
1835 if (!pci_dma_supported(pci_dev,DMA_32BIT_MASK)) { 1835 if (!pci_dma_supported(pci_dev,DMA_BIT_MASK(32))) {
1836 printk("%s/0: Oops: no 32bit PCI DMA ???\n",core->name); 1836 printk("%s/0: Oops: no 32bit PCI DMA ???\n",core->name);
1837 err = -EIO; 1837 err = -EIO;
1838 goto fail_core; 1838 goto fail_core;
diff --git a/drivers/media/video/meye.c b/drivers/media/video/meye.c
index 2ad11f0999c6..1d66855a379a 100644
--- a/drivers/media/video/meye.c
+++ b/drivers/media/video/meye.c
@@ -117,7 +117,7 @@ static int ptable_alloc(void)
117 memset(meye.mchip_ptable, 0, sizeof(meye.mchip_ptable)); 117 memset(meye.mchip_ptable, 0, sizeof(meye.mchip_ptable));
118 118
119 /* give only 32 bit DMA addresses */ 119 /* give only 32 bit DMA addresses */
120 if (dma_set_mask(&meye.mchip_dev->dev, DMA_32BIT_MASK)) 120 if (dma_set_mask(&meye.mchip_dev->dev, DMA_BIT_MASK(32)))
121 return -1; 121 return -1;
122 122
123 meye.mchip_ptable_toc = dma_alloc_coherent(&meye.mchip_dev->dev, 123 meye.mchip_ptable_toc = dma_alloc_coherent(&meye.mchip_dev->dev,
diff --git a/drivers/media/video/saa7134/saa7134-core.c b/drivers/media/video/saa7134/saa7134-core.c
index 0bb09f1723d1..2def6fec814b 100644
--- a/drivers/media/video/saa7134/saa7134-core.c
+++ b/drivers/media/video/saa7134/saa7134-core.c
@@ -911,7 +911,7 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
911 pci_name(pci_dev), dev->pci_rev, pci_dev->irq, 911 pci_name(pci_dev), dev->pci_rev, pci_dev->irq,
912 dev->pci_lat,(unsigned long long)pci_resource_start(pci_dev,0)); 912 dev->pci_lat,(unsigned long long)pci_resource_start(pci_dev,0));
913 pci_set_master(pci_dev); 913 pci_set_master(pci_dev);
914 if (!pci_dma_supported(pci_dev, DMA_32BIT_MASK)) { 914 if (!pci_dma_supported(pci_dev, DMA_BIT_MASK(32))) {
915 printk("%s: Oops: no 32bit PCI DMA ???\n",dev->name); 915 printk("%s: Oops: no 32bit PCI DMA ???\n",dev->name);
916 err = -EIO; 916 err = -EIO;
917 goto fail1; 917 goto fail1;
diff --git a/drivers/memstick/host/jmb38x_ms.c b/drivers/memstick/host/jmb38x_ms.c
index 2fb95a5b72eb..f4a162a4bece 100644
--- a/drivers/memstick/host/jmb38x_ms.c
+++ b/drivers/memstick/host/jmb38x_ms.c
@@ -877,7 +877,7 @@ static int jmb38x_ms_probe(struct pci_dev *pdev,
877 int pci_dev_busy = 0; 877 int pci_dev_busy = 0;
878 int rc, cnt; 878 int rc, cnt;
879 879
880 rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 880 rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
881 if (rc) 881 if (rc)
882 return rc; 882 return rc;
883 883
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index 98026016a935..d0d126c69354 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -1539,8 +1539,8 @@ mpt_mapresources(MPT_ADAPTER *ioc)
1539 dinitprintk(ioc, printk(MYIOC_s_INFO_FMT 1539 dinitprintk(ioc, printk(MYIOC_s_INFO_FMT
1540 ": 64 BIT PCI BUS DMA ADDRESSING SUPPORTED\n", 1540 ": 64 BIT PCI BUS DMA ADDRESSING SUPPORTED\n",
1541 ioc->name)); 1541 ioc->name));
1542 } else if (!pci_set_dma_mask(pdev, DMA_32BIT_MASK) 1542 } else if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(32))
1543 && !pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK)) { 1543 && !pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32))) {
1544 dinitprintk(ioc, printk(MYIOC_s_INFO_FMT 1544 dinitprintk(ioc, printk(MYIOC_s_INFO_FMT
1545 ": 32 BIT PCI BUS DMA ADDRESSING SUPPORTED\n", 1545 ": 32 BIT PCI BUS DMA ADDRESSING SUPPORTED\n",
1546 ioc->name)); 1546 ioc->name));
diff --git a/drivers/message/i2o/memory.c b/drivers/message/i2o/memory.c
index 9a08d8e45516..292b41e49fbd 100644
--- a/drivers/message/i2o/memory.c
+++ b/drivers/message/i2o/memory.c
@@ -187,7 +187,7 @@ int i2o_dma_alloc(struct device *dev, struct i2o_dma *addr, size_t len)
187 mutex_lock(&mem_lock); 187 mutex_lock(&mem_lock);
188 if ((sizeof(dma_addr_t) > 4) && (pdev->dma_mask == DMA_BIT_MASK(64))) { 188 if ((sizeof(dma_addr_t) > 4) && (pdev->dma_mask == DMA_BIT_MASK(64))) {
189 dma_64 = 1; 189 dma_64 = 1;
190 if (pci_set_dma_mask(pdev, DMA_32BIT_MASK)) { 190 if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
191 mutex_unlock(&mem_lock); 191 mutex_unlock(&mem_lock);
192 return -ENOMEM; 192 return -ENOMEM;
193 } 193 }
diff --git a/drivers/message/i2o/pci.c b/drivers/message/i2o/pci.c
index ed17ac5af3e0..35ba2ae38b42 100644
--- a/drivers/message/i2o/pci.c
+++ b/drivers/message/i2o/pci.c
@@ -334,7 +334,7 @@ static int __devinit i2o_pci_probe(struct pci_dev *pdev,
334 return rc; 334 return rc;
335 } 335 }
336 336
337 if (pci_set_dma_mask(pdev, DMA_32BIT_MASK)) { 337 if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
338 printk(KERN_WARNING "i2o: no suitable DMA found for %s\n", 338 printk(KERN_WARNING "i2o: no suitable DMA found for %s\n",
339 pci_name(pdev)); 339 pci_name(pdev));
340 rc = -ENODEV; 340 rc = -ENODEV;
diff --git a/drivers/misc/tifm_7xx1.c b/drivers/misc/tifm_7xx1.c
index be5672a98702..a6ef18259da0 100644
--- a/drivers/misc/tifm_7xx1.c
+++ b/drivers/misc/tifm_7xx1.c
@@ -324,7 +324,7 @@ static int tifm_7xx1_probe(struct pci_dev *dev,
324 int pci_dev_busy = 0; 324 int pci_dev_busy = 0;
325 int rc; 325 int rc;
326 326
327 rc = pci_set_dma_mask(dev, DMA_32BIT_MASK); 327 rc = pci_set_dma_mask(dev, DMA_BIT_MASK(32));
328 if (rc) 328 if (rc)
329 return rc; 329 return rc;
330 330
diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c
index 406da9a8d453..c5b316e22371 100644
--- a/drivers/mmc/host/sdhci-pci.c
+++ b/drivers/mmc/host/sdhci-pci.c
@@ -380,7 +380,7 @@ static int sdhci_pci_enable_dma(struct sdhci_host *host)
380 "doesn't fully claim to support it.\n"); 380 "doesn't fully claim to support it.\n");
381 } 381 }
382 382
383 ret = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 383 ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
384 if (ret) 384 if (ret)
385 return ret; 385 return ret;
386 386
diff --git a/drivers/net/8139cp.c b/drivers/net/8139cp.c
index d08475a7f676..02330f3d5a55 100644
--- a/drivers/net/8139cp.c
+++ b/drivers/net/8139cp.c
@@ -1530,7 +1530,7 @@ static void cp_get_ethtool_stats (struct net_device *dev,
1530 1530
1531 /* begin NIC statistics dump */ 1531 /* begin NIC statistics dump */
1532 cpw32(StatsAddr + 4, (u64)dma >> 32); 1532 cpw32(StatsAddr + 4, (u64)dma >> 32);
1533 cpw32(StatsAddr, ((u64)dma & DMA_32BIT_MASK) | DumpStats); 1533 cpw32(StatsAddr, ((u64)dma & DMA_BIT_MASK(32)) | DumpStats);
1534 cpr32(StatsAddr); 1534 cpr32(StatsAddr);
1535 1535
1536 for (i = 0; i < 1000; i++) { 1536 for (i = 0; i < 1000; i++) {
@@ -1935,13 +1935,13 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
1935 } else { 1935 } else {
1936 pci_using_dac = 0; 1936 pci_using_dac = 0;
1937 1937
1938 rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 1938 rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
1939 if (rc) { 1939 if (rc) {
1940 dev_err(&pdev->dev, 1940 dev_err(&pdev->dev,
1941 "No usable DMA configuration, aborting.\n"); 1941 "No usable DMA configuration, aborting.\n");
1942 goto err_out_res; 1942 goto err_out_res;
1943 } 1943 }
1944 rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); 1944 rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
1945 if (rc) { 1945 if (rc) {
1946 dev_err(&pdev->dev, 1946 dev_err(&pdev->dev,
1947 "No usable consistent DMA configuration, " 1947 "No usable consistent DMA configuration, "
diff --git a/drivers/net/acenic.c b/drivers/net/acenic.c
index 9509c17b3667..57bc71527850 100644
--- a/drivers/net/acenic.c
+++ b/drivers/net/acenic.c
@@ -1163,7 +1163,7 @@ static int __devinit ace_init(struct net_device *dev)
1163 */ 1163 */
1164 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) { 1164 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
1165 ap->pci_using_dac = 1; 1165 ap->pci_using_dac = 1;
1166 } else if (!pci_set_dma_mask(pdev, DMA_32BIT_MASK)) { 1166 } else if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
1167 ap->pci_using_dac = 0; 1167 ap->pci_using_dac = 0;
1168 } else { 1168 } else {
1169 ecode = -ENODEV; 1169 ecode = -ENODEV;
diff --git a/drivers/net/amd8111e.c b/drivers/net/amd8111e.c
index cb9c95d3ed0a..19831bd64016 100644
--- a/drivers/net/amd8111e.c
+++ b/drivers/net/amd8111e.c
@@ -1871,7 +1871,7 @@ static int __devinit amd8111e_probe_one(struct pci_dev *pdev,
1871 } 1871 }
1872 1872
1873 /* Initialize DMA */ 1873 /* Initialize DMA */
1874 if (pci_set_dma_mask(pdev, DMA_32BIT_MASK) < 0) { 1874 if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32)) < 0) {
1875 printk(KERN_ERR "amd8111e: DMA not supported," 1875 printk(KERN_ERR "amd8111e: DMA not supported,"
1876 "exiting.\n"); 1876 "exiting.\n");
1877 goto err_free_reg; 1877 goto err_free_reg;
diff --git a/drivers/net/atl1e/atl1e_main.c b/drivers/net/atl1e/atl1e_main.c
index c758884728a5..fb57b750866b 100644
--- a/drivers/net/atl1e/atl1e_main.c
+++ b/drivers/net/atl1e/atl1e_main.c
@@ -2326,8 +2326,8 @@ static int __devinit atl1e_probe(struct pci_dev *pdev,
2326 * various kernel subsystems to support the mechanics required by a 2326 * various kernel subsystems to support the mechanics required by a
2327 * fixed-high-32-bit system. 2327 * fixed-high-32-bit system.
2328 */ 2328 */
2329 if ((pci_set_dma_mask(pdev, DMA_32BIT_MASK) != 0) || 2329 if ((pci_set_dma_mask(pdev, DMA_BIT_MASK(32)) != 0) ||
2330 (pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK) != 0)) { 2330 (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)) != 0)) {
2331 dev_err(&pdev->dev, "No usable DMA configuration,aborting\n"); 2331 dev_err(&pdev->dev, "No usable DMA configuration,aborting\n");
2332 goto err_dma; 2332 goto err_dma;
2333 } 2333 }
diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c
index 43fc1b2ca3cd..0ab22540bf59 100644
--- a/drivers/net/atlx/atl1.c
+++ b/drivers/net/atlx/atl1.c
@@ -2929,7 +2929,7 @@ static int __devinit atl1_probe(struct pci_dev *pdev,
2929 * various kernel subsystems to support the mechanics required by a 2929 * various kernel subsystems to support the mechanics required by a
2930 * fixed-high-32-bit system. 2930 * fixed-high-32-bit system.
2931 */ 2931 */
2932 err = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 2932 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
2933 if (err) { 2933 if (err) {
2934 dev_err(&pdev->dev, "no usable DMA configuration\n"); 2934 dev_err(&pdev->dev, "no usable DMA configuration\n");
2935 goto err_dma; 2935 goto err_dma;
diff --git a/drivers/net/atlx/atl2.c b/drivers/net/atlx/atl2.c
index 9fe06c3f4097..c734b1983ec1 100644
--- a/drivers/net/atlx/atl2.c
+++ b/drivers/net/atlx/atl2.c
@@ -1358,8 +1358,8 @@ static int __devinit atl2_probe(struct pci_dev *pdev,
1358 * until the kernel has the proper infrastructure to support 64-bit DMA 1358 * until the kernel has the proper infrastructure to support 64-bit DMA
1359 * on these devices. 1359 * on these devices.
1360 */ 1360 */
1361 if (pci_set_dma_mask(pdev, DMA_32BIT_MASK) && 1361 if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32)) &&
1362 pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK)) { 1362 pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32))) {
1363 printk(KERN_ERR "atl2: No usable DMA configuration, aborting\n"); 1363 printk(KERN_ERR "atl2: No usable DMA configuration, aborting\n");
1364 goto err_dma; 1364 goto err_dma;
1365 } 1365 }
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 5fd57703c65a..9d268be0b670 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -7538,7 +7538,7 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
7538 "pci_set_consistent_dma_mask failed, aborting.\n"); 7538 "pci_set_consistent_dma_mask failed, aborting.\n");
7539 goto err_out_unmap; 7539 goto err_out_unmap;
7540 } 7540 }
7541 } else if ((rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK)) != 0) { 7541 } else if ((rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) != 0) {
7542 dev_err(&pdev->dev, "System does not support DMA, aborting.\n"); 7542 dev_err(&pdev->dev, "System does not support DMA, aborting.\n");
7543 goto err_out_unmap; 7543 goto err_out_unmap;
7544 } 7544 }
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c
index 03e01243b45e..ad5ef25add3e 100644
--- a/drivers/net/bnx2x_main.c
+++ b/drivers/net/bnx2x_main.c
@@ -10988,7 +10988,7 @@ static int __devinit bnx2x_init_dev(struct pci_dev *pdev,
10988 goto err_out_release; 10988 goto err_out_release;
10989 } 10989 }
10990 10990
10991 } else if (pci_set_dma_mask(pdev, DMA_32BIT_MASK) != 0) { 10991 } else if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32)) != 0) {
10992 printk(KERN_ERR PFX "System does not support DMA," 10992 printk(KERN_ERR PFX "System does not support DMA,"
10993 " aborting\n"); 10993 " aborting\n");
10994 rc = -EIO; 10994 rc = -EIO;
diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c
index c2895240e467..f5222764061c 100644
--- a/drivers/net/cassini.c
+++ b/drivers/net/cassini.c
@@ -5085,7 +5085,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev,
5085 } 5085 }
5086 5086
5087 } else { 5087 } else {
5088 err = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 5088 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
5089 if (err) { 5089 if (err) {
5090 dev_err(&pdev->dev, "No usable DMA configuration, " 5090 dev_err(&pdev->dev, "No usable DMA configuration, "
5091 "aborting.\n"); 5091 "aborting.\n");
diff --git a/drivers/net/chelsio/cxgb2.c b/drivers/net/chelsio/cxgb2.c
index 57cfbc369f51..fa06994f9737 100644
--- a/drivers/net/chelsio/cxgb2.c
+++ b/drivers/net/chelsio/cxgb2.c
@@ -1066,7 +1066,7 @@ static int __devinit init_one(struct pci_dev *pdev,
1066 goto out_disable_pdev; 1066 goto out_disable_pdev;
1067 } 1067 }
1068 1068
1069 } else if ((err = pci_set_dma_mask(pdev, DMA_32BIT_MASK)) != 0) { 1069 } else if ((err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) != 0) {
1070 CH_ERR("%s: no usable DMA configuration\n", pci_name(pdev)); 1070 CH_ERR("%s: no usable DMA configuration\n", pci_name(pdev));
1071 goto out_disable_pdev; 1071 goto out_disable_pdev;
1072 } 1072 }
diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c
index ec35d3b82409..ab0e5febef83 100644
--- a/drivers/net/cxgb3/cxgb3_main.c
+++ b/drivers/net/cxgb3/cxgb3_main.c
@@ -3046,7 +3046,7 @@ static int __devinit init_one(struct pci_dev *pdev,
3046 "coherent allocations\n"); 3046 "coherent allocations\n");
3047 goto out_disable_device; 3047 goto out_disable_device;
3048 } 3048 }
3049 } else if ((err = pci_set_dma_mask(pdev, DMA_32BIT_MASK)) != 0) { 3049 } else if ((err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) != 0) {
3050 dev_err(&pdev->dev, "no usable DMA configuration\n"); 3050 dev_err(&pdev->dev, "no usable DMA configuration\n");
3051 goto out_disable_device; 3051 goto out_disable_device;
3052 } 3052 }
diff --git a/drivers/net/e100.c b/drivers/net/e100.c
index 0504db9ad643..5c0b457c7868 100644
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -2604,7 +2604,7 @@ static int __devinit e100_probe(struct pci_dev *pdev,
2604 goto err_out_disable_pdev; 2604 goto err_out_disable_pdev;
2605 } 2605 }
2606 2606
2607 if ((err = pci_set_dma_mask(pdev, DMA_32BIT_MASK))) { 2607 if ((err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)))) {
2608 DPRINTK(PROBE, ERR, "No usable DMA configuration, aborting.\n"); 2608 DPRINTK(PROBE, ERR, "No usable DMA configuration, aborting.\n");
2609 goto err_out_free_res; 2609 goto err_out_free_res;
2610 } 2610 }
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index caa71dffb3d0..ddc5c533e89c 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -966,9 +966,9 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
966 !pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64))) { 966 !pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64))) {
967 pci_using_dac = 1; 967 pci_using_dac = 1;
968 } else { 968 } else {
969 err = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 969 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
970 if (err) { 970 if (err) {
971 err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); 971 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
972 if (err) { 972 if (err) {
973 E1000_ERR("No usable DMA configuration, " 973 E1000_ERR("No usable DMA configuration, "
974 "aborting\n"); 974 "aborting\n");
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index 4a61160052a3..409b58cad0e5 100644
--- a/drivers/net/e1000e/netdev.c
+++ b/drivers/net/e1000e/netdev.c
@@ -2203,7 +2203,7 @@ static void e1000_configure_tx(struct e1000_adapter *adapter)
2203 /* Setup the HW Tx Head and Tail descriptor pointers */ 2203 /* Setup the HW Tx Head and Tail descriptor pointers */
2204 tdba = tx_ring->dma; 2204 tdba = tx_ring->dma;
2205 tdlen = tx_ring->count * sizeof(struct e1000_tx_desc); 2205 tdlen = tx_ring->count * sizeof(struct e1000_tx_desc);
2206 ew32(TDBAL, (tdba & DMA_32BIT_MASK)); 2206 ew32(TDBAL, (tdba & DMA_BIT_MASK(32)));
2207 ew32(TDBAH, (tdba >> 32)); 2207 ew32(TDBAH, (tdba >> 32));
2208 ew32(TDLEN, tdlen); 2208 ew32(TDLEN, tdlen);
2209 ew32(TDH, 0); 2209 ew32(TDH, 0);
@@ -2459,7 +2459,7 @@ static void e1000_configure_rx(struct e1000_adapter *adapter)
2459 * the Base and Length of the Rx Descriptor Ring 2459 * the Base and Length of the Rx Descriptor Ring
2460 */ 2460 */
2461 rdba = rx_ring->dma; 2461 rdba = rx_ring->dma;
2462 ew32(RDBAL, (rdba & DMA_32BIT_MASK)); 2462 ew32(RDBAL, (rdba & DMA_BIT_MASK(32)));
2463 ew32(RDBAH, (rdba >> 32)); 2463 ew32(RDBAH, (rdba >> 32));
2464 ew32(RDLEN, rdlen); 2464 ew32(RDLEN, rdlen);
2465 ew32(RDH, 0); 2465 ew32(RDH, 0);
@@ -4769,10 +4769,10 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
4769 if (!err) 4769 if (!err)
4770 pci_using_dac = 1; 4770 pci_using_dac = 1;
4771 } else { 4771 } else {
4772 err = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 4772 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
4773 if (err) { 4773 if (err) {
4774 err = pci_set_consistent_dma_mask(pdev, 4774 err = pci_set_consistent_dma_mask(pdev,
4775 DMA_32BIT_MASK); 4775 DMA_BIT_MASK(32));
4776 if (err) { 4776 if (err) {
4777 dev_err(&pdev->dev, "No usable DMA " 4777 dev_err(&pdev->dev, "No usable DMA "
4778 "configuration, aborting\n"); 4778 "configuration, aborting\n");
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index 5b87105ac9e0..9080f07da8fe 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -1687,13 +1687,13 @@ static int __devinit enic_probe(struct pci_dev *pdev,
1687 1687
1688 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(40)); 1688 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(40));
1689 if (err) { 1689 if (err) {
1690 err = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 1690 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
1691 if (err) { 1691 if (err) {
1692 printk(KERN_ERR PFX 1692 printk(KERN_ERR PFX
1693 "No usable DMA configuration, aborting.\n"); 1693 "No usable DMA configuration, aborting.\n");
1694 goto err_out_release_regions; 1694 goto err_out_release_regions;
1695 } 1695 }
1696 err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); 1696 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
1697 if (err) { 1697 if (err) {
1698 printk(KERN_ERR PFX 1698 printk(KERN_ERR PFX
1699 "Unable to obtain 32-bit DMA " 1699 "Unable to obtain 32-bit DMA "
diff --git a/drivers/net/hp100.c b/drivers/net/hp100.c
index ad8be7e78290..de3f49f991a3 100644
--- a/drivers/net/hp100.c
+++ b/drivers/net/hp100.c
@@ -580,7 +580,7 @@ static int __devinit hp100_probe1(struct net_device *dev, int ioaddr,
580 * Also, we can have EISA Busmaster cards (not tested), 580 * Also, we can have EISA Busmaster cards (not tested),
581 * so beware !!! - Jean II */ 581 * so beware !!! - Jean II */
582 if((bus == HP100_BUS_PCI) && 582 if((bus == HP100_BUS_PCI) &&
583 (pci_set_dma_mask(pci_dev, DMA_32BIT_MASK))) { 583 (pci_set_dma_mask(pci_dev, DMA_BIT_MASK(32)))) {
584 /* Gracefully fallback to shared memory */ 584 /* Gracefully fallback to shared memory */
585 goto busmasterfail; 585 goto busmasterfail;
586 } 586 }
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index 82278beaac83..6b0697c565b9 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -1160,9 +1160,9 @@ static int __devinit igb_probe(struct pci_dev *pdev,
1160 if (!err) 1160 if (!err)
1161 pci_using_dac = 1; 1161 pci_using_dac = 1;
1162 } else { 1162 } else {
1163 err = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 1163 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
1164 if (err) { 1164 if (err) {
1165 err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); 1165 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
1166 if (err) { 1166 if (err) {
1167 dev_err(&pdev->dev, "No usable DMA " 1167 dev_err(&pdev->dev, "No usable DMA "
1168 "configuration, aborting\n"); 1168 "configuration, aborting\n");
diff --git a/drivers/net/ioc3-eth.c b/drivers/net/ioc3-eth.c
index 43be0b01f12c..cbc63ff13add 100644
--- a/drivers/net/ioc3-eth.c
+++ b/drivers/net/ioc3-eth.c
@@ -1236,7 +1236,7 @@ static int __devinit ioc3_probe(struct pci_dev *pdev,
1236 goto out; 1236 goto out;
1237 } 1237 }
1238 } else { 1238 } else {
1239 err = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 1239 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
1240 if (err) { 1240 if (err) {
1241 printk(KERN_ERR "%s: No usable DMA configuration, " 1241 printk(KERN_ERR "%s: No usable DMA configuration, "
1242 "aborting.\n", pci_name(pdev)); 1242 "aborting.\n", pci_name(pdev));
diff --git a/drivers/net/ipg.c b/drivers/net/ipg.c
index ed9ded939d96..43019461b776 100644
--- a/drivers/net/ipg.c
+++ b/drivers/net/ipg.c
@@ -2242,7 +2242,7 @@ static int __devinit ipg_probe(struct pci_dev *pdev,
2242 2242
2243 rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(40)); 2243 rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(40));
2244 if (rc < 0) { 2244 if (rc < 0) {
2245 rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 2245 rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
2246 if (rc < 0) { 2246 if (rc < 0) {
2247 printk(KERN_ERR "%s: DMA config failed.\n", 2247 printk(KERN_ERR "%s: DMA config failed.\n",
2248 pci_name(pdev)); 2248 pci_name(pdev));
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c
index 0ac51758bc6c..4a0826b8f6f2 100644
--- a/drivers/net/ixgb/ixgb_main.c
+++ b/drivers/net/ixgb/ixgb_main.c
@@ -369,8 +369,8 @@ ixgb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
369 !(err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)))) { 369 !(err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)))) {
370 pci_using_dac = 1; 370 pci_using_dac = 1;
371 } else { 371 } else {
372 if ((err = pci_set_dma_mask(pdev, DMA_32BIT_MASK)) || 372 if ((err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) ||
373 (err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK))) { 373 (err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)))) {
374 printk(KERN_ERR 374 printk(KERN_ERR
375 "ixgb: No usable DMA configuration, aborting\n"); 375 "ixgb: No usable DMA configuration, aborting\n");
376 goto err_dma_mask; 376 goto err_dma_mask;
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 126735ca6d7f..9ef128ae6458 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -1643,7 +1643,7 @@ static void ixgbe_configure_tx(struct ixgbe_adapter *adapter)
1643 tdba = ring->dma; 1643 tdba = ring->dma;
1644 tdlen = ring->count * sizeof(union ixgbe_adv_tx_desc); 1644 tdlen = ring->count * sizeof(union ixgbe_adv_tx_desc);
1645 IXGBE_WRITE_REG(hw, IXGBE_TDBAL(j), 1645 IXGBE_WRITE_REG(hw, IXGBE_TDBAL(j),
1646 (tdba & DMA_32BIT_MASK)); 1646 (tdba & DMA_BIT_MASK(32)));
1647 IXGBE_WRITE_REG(hw, IXGBE_TDBAH(j), (tdba >> 32)); 1647 IXGBE_WRITE_REG(hw, IXGBE_TDBAH(j), (tdba >> 32));
1648 IXGBE_WRITE_REG(hw, IXGBE_TDLEN(j), tdlen); 1648 IXGBE_WRITE_REG(hw, IXGBE_TDLEN(j), tdlen);
1649 IXGBE_WRITE_REG(hw, IXGBE_TDH(j), 0); 1649 IXGBE_WRITE_REG(hw, IXGBE_TDH(j), 0);
@@ -1782,7 +1782,7 @@ static void ixgbe_configure_rx(struct ixgbe_adapter *adapter)
1782 for (i = 0; i < adapter->num_rx_queues; i++) { 1782 for (i = 0; i < adapter->num_rx_queues; i++) {
1783 rdba = adapter->rx_ring[i].dma; 1783 rdba = adapter->rx_ring[i].dma;
1784 j = adapter->rx_ring[i].reg_idx; 1784 j = adapter->rx_ring[i].reg_idx;
1785 IXGBE_WRITE_REG(hw, IXGBE_RDBAL(j), (rdba & DMA_32BIT_MASK)); 1785 IXGBE_WRITE_REG(hw, IXGBE_RDBAL(j), (rdba & DMA_BIT_MASK(32)));
1786 IXGBE_WRITE_REG(hw, IXGBE_RDBAH(j), (rdba >> 32)); 1786 IXGBE_WRITE_REG(hw, IXGBE_RDBAH(j), (rdba >> 32));
1787 IXGBE_WRITE_REG(hw, IXGBE_RDLEN(j), rdlen); 1787 IXGBE_WRITE_REG(hw, IXGBE_RDLEN(j), rdlen);
1788 IXGBE_WRITE_REG(hw, IXGBE_RDH(j), 0); 1788 IXGBE_WRITE_REG(hw, IXGBE_RDH(j), 0);
@@ -4513,9 +4513,9 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
4513 !pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64))) { 4513 !pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64))) {
4514 pci_using_dac = 1; 4514 pci_using_dac = 1;
4515 } else { 4515 } else {
4516 err = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 4516 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
4517 if (err) { 4517 if (err) {
4518 err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); 4518 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
4519 if (err) { 4519 if (err) {
4520 dev_err(&pdev->dev, "No usable DMA " 4520 dev_err(&pdev->dev, "No usable DMA "
4521 "configuration, aborting\n"); 4521 "configuration, aborting\n");
diff --git a/drivers/net/jme.c b/drivers/net/jme.c
index 860dcd98a07c..ece35040288c 100644
--- a/drivers/net/jme.c
+++ b/drivers/net/jme.c
@@ -2600,8 +2600,8 @@ jme_pci_dma64(struct pci_dev *pdev)
2600 if (!pci_set_consistent_dma_mask(pdev, DMA_40BIT_MASK)) 2600 if (!pci_set_consistent_dma_mask(pdev, DMA_40BIT_MASK))
2601 return 1; 2601 return 1;
2602 2602
2603 if (!pci_set_dma_mask(pdev, DMA_32BIT_MASK)) 2603 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(32)))
2604 if (!pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK)) 2604 if (!pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)))
2605 return 0; 2605 return 0;
2606 2606
2607 return -1; 2607 return -1;
diff --git a/drivers/net/mlx4/main.c b/drivers/net/mlx4/main.c
index fed53fbaf545..102bac90a302 100644
--- a/drivers/net/mlx4/main.c
+++ b/drivers/net/mlx4/main.c
@@ -1079,7 +1079,7 @@ static int __mlx4_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
1079 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(64)); 1079 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
1080 if (err) { 1080 if (err) {
1081 dev_warn(&pdev->dev, "Warning: couldn't set 64-bit PCI DMA mask.\n"); 1081 dev_warn(&pdev->dev, "Warning: couldn't set 64-bit PCI DMA mask.\n");
1082 err = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 1082 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
1083 if (err) { 1083 if (err) {
1084 dev_err(&pdev->dev, "Can't set PCI DMA mask, aborting.\n"); 1084 dev_err(&pdev->dev, "Can't set PCI DMA mask, aborting.\n");
1085 goto err_release_bar2; 1085 goto err_release_bar2;
@@ -1089,7 +1089,7 @@ static int __mlx4_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
1089 if (err) { 1089 if (err) {
1090 dev_warn(&pdev->dev, "Warning: couldn't set 64-bit " 1090 dev_warn(&pdev->dev, "Warning: couldn't set 64-bit "
1091 "consistent PCI DMA mask.\n"); 1091 "consistent PCI DMA mask.\n");
1092 err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); 1092 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
1093 if (err) { 1093 if (err) {
1094 dev_err(&pdev->dev, "Can't set consistent PCI DMA mask, " 1094 dev_err(&pdev->dev, "Can't set consistent PCI DMA mask, "
1095 "aborting.\n"); 1095 "aborting.\n");
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c
index 27655466dbeb..9eed126a82f0 100644
--- a/drivers/net/myri10ge/myri10ge.c
+++ b/drivers/net/myri10ge/myri10ge.c
@@ -1130,7 +1130,7 @@ myri10ge_submit_8rx(struct mcp_kreq_ether_recv __iomem * dst,
1130 __be32 low; 1130 __be32 low;
1131 1131
1132 low = src->addr_low; 1132 low = src->addr_low;
1133 src->addr_low = htonl(DMA_32BIT_MASK); 1133 src->addr_low = htonl(DMA_BIT_MASK(32));
1134 myri10ge_pio_copy(dst, src, 4 * sizeof(*src)); 1134 myri10ge_pio_copy(dst, src, 4 * sizeof(*src));
1135 mb(); 1135 mb();
1136 myri10ge_pio_copy(dst + 4, src + 4, 4 * sizeof(*src)); 1136 myri10ge_pio_copy(dst + 4, src + 4, 4 * sizeof(*src));
@@ -3798,7 +3798,7 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
3798 dev_err(&pdev->dev, 3798 dev_err(&pdev->dev,
3799 "64-bit pci address mask was refused, " 3799 "64-bit pci address mask was refused, "
3800 "trying 32-bit\n"); 3800 "trying 32-bit\n");
3801 status = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 3801 status = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
3802 } 3802 }
3803 if (status != 0) { 3803 if (status != 0) {
3804 dev_err(&pdev->dev, "Error %d setting DMA mask\n", status); 3804 dev_err(&pdev->dev, "Error %d setting DMA mask\n", status);
diff --git a/drivers/net/niu.c b/drivers/net/niu.c
index 02c37e2f08a9..73cac6c78cb6 100644
--- a/drivers/net/niu.c
+++ b/drivers/net/niu.c
@@ -9889,8 +9889,8 @@ static int __devinit niu_pci_init_one(struct pci_dev *pdev,
9889 goto err_out_release_parent; 9889 goto err_out_release_parent;
9890 } 9890 }
9891 } 9891 }
9892 if (err || dma_mask == DMA_32BIT_MASK) { 9892 if (err || dma_mask == DMA_BIT_MASK(32)) {
9893 err = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 9893 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
9894 if (err) { 9894 if (err) {
9895 dev_err(&pdev->dev, PFX "No usable DMA configuration, " 9895 dev_err(&pdev->dev, PFX "No usable DMA configuration, "
9896 "aborting.\n"); 9896 "aborting.\n");
diff --git a/drivers/net/ns83820.c b/drivers/net/ns83820.c
index e30ab06e7103..d531614a90b5 100644
--- a/drivers/net/ns83820.c
+++ b/drivers/net/ns83820.c
@@ -1975,7 +1975,7 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev,
1975 if (sizeof(dma_addr_t) == 8 && 1975 if (sizeof(dma_addr_t) == 8 &&
1976 !pci_set_dma_mask(pci_dev, DMA_BIT_MASK(64))) { 1976 !pci_set_dma_mask(pci_dev, DMA_BIT_MASK(64))) {
1977 using_dac = 1; 1977 using_dac = 1;
1978 } else if (!pci_set_dma_mask(pci_dev, DMA_32BIT_MASK)) { 1978 } else if (!pci_set_dma_mask(pci_dev, DMA_BIT_MASK(32))) {
1979 using_dac = 0; 1979 using_dac = 0;
1980 } else { 1980 } else {
1981 dev_warn(&pci_dev->dev, "pci_set_dma_mask failed!\n"); 1981 dev_warn(&pci_dev->dev, "pci_set_dma_mask failed!\n");
diff --git a/drivers/net/qla3xxx.c b/drivers/net/qla3xxx.c
index aef047e4515a..cadc32c94c1e 100644
--- a/drivers/net/qla3xxx.c
+++ b/drivers/net/qla3xxx.c
@@ -3937,9 +3937,9 @@ static int __devinit ql3xxx_probe(struct pci_dev *pdev,
3937 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) { 3937 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
3938 pci_using_dac = 1; 3938 pci_using_dac = 1;
3939 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)); 3939 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
3940 } else if (!(err = pci_set_dma_mask(pdev, DMA_32BIT_MASK))) { 3940 } else if (!(err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)))) {
3941 pci_using_dac = 0; 3941 pci_using_dac = 0;
3942 err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); 3942 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
3943 } 3943 }
3944 3944
3945 if (err) { 3945 if (err) {
diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c
index 0add30d38d62..c92ced247947 100644
--- a/drivers/net/qlge/qlge_main.c
+++ b/drivers/net/qlge/qlge_main.c
@@ -3730,9 +3730,9 @@ static int __devinit ql_init_device(struct pci_dev *pdev,
3730 set_bit(QL_DMA64, &qdev->flags); 3730 set_bit(QL_DMA64, &qdev->flags);
3731 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)); 3731 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
3732 } else { 3732 } else {
3733 err = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 3733 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
3734 if (!err) 3734 if (!err)
3735 err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); 3735 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
3736 } 3736 }
3737 3737
3738 if (err) { 3738 if (err) {
diff --git a/drivers/net/r6040.c b/drivers/net/r6040.c
index 0a37f9902a07..5e8540b6ffa1 100644
--- a/drivers/net/r6040.c
+++ b/drivers/net/r6040.c
@@ -1085,13 +1085,13 @@ static int __devinit r6040_init_one(struct pci_dev *pdev,
1085 goto err_out; 1085 goto err_out;
1086 1086
1087 /* this should always be supported */ 1087 /* this should always be supported */
1088 err = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 1088 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
1089 if (err) { 1089 if (err) {
1090 printk(KERN_ERR DRV_NAME ": 32-bit PCI DMA addresses" 1090 printk(KERN_ERR DRV_NAME ": 32-bit PCI DMA addresses"
1091 "not supported by the card\n"); 1091 "not supported by the card\n");
1092 goto err_out; 1092 goto err_out;
1093 } 1093 }
1094 err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); 1094 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
1095 if (err) { 1095 if (err) {
1096 printk(KERN_ERR DRV_NAME ": 32-bit PCI DMA addresses" 1096 printk(KERN_ERR DRV_NAME ": 32-bit PCI DMA addresses"
1097 "not supported by the card\n"); 1097 "not supported by the card\n");
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index fe676d38d342..0b6e8c896835 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -1148,7 +1148,7 @@ static void rtl8169_update_counters(struct net_device *dev)
1148 return; 1148 return;
1149 1149
1150 RTL_W32(CounterAddrHigh, (u64)paddr >> 32); 1150 RTL_W32(CounterAddrHigh, (u64)paddr >> 32);
1151 cmd = (u64)paddr & DMA_32BIT_MASK; 1151 cmd = (u64)paddr & DMA_BIT_MASK(32);
1152 RTL_W32(CounterAddrLow, cmd); 1152 RTL_W32(CounterAddrLow, cmd);
1153 RTL_W32(CounterAddrLow, cmd | CounterDump); 1153 RTL_W32(CounterAddrLow, cmd | CounterDump);
1154 1154
@@ -2050,7 +2050,7 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
2050 tp->cp_cmd |= PCIDAC; 2050 tp->cp_cmd |= PCIDAC;
2051 dev->features |= NETIF_F_HIGHDMA; 2051 dev->features |= NETIF_F_HIGHDMA;
2052 } else { 2052 } else {
2053 rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 2053 rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
2054 if (rc < 0) { 2054 if (rc < 0) {
2055 if (netif_msg_probe(tp)) { 2055 if (netif_msg_probe(tp)) {
2056 dev_err(&pdev->dev, 2056 dev_err(&pdev->dev,
@@ -2343,9 +2343,9 @@ static void rtl_set_rx_tx_desc_registers(struct rtl8169_private *tp,
2343 * Switching from MMIO to I/O access fixes the issue as well. 2343 * Switching from MMIO to I/O access fixes the issue as well.
2344 */ 2344 */
2345 RTL_W32(TxDescStartAddrHigh, ((u64) tp->TxPhyAddr) >> 32); 2345 RTL_W32(TxDescStartAddrHigh, ((u64) tp->TxPhyAddr) >> 32);
2346 RTL_W32(TxDescStartAddrLow, ((u64) tp->TxPhyAddr) & DMA_32BIT_MASK); 2346 RTL_W32(TxDescStartAddrLow, ((u64) tp->TxPhyAddr) & DMA_BIT_MASK(32));
2347 RTL_W32(RxDescAddrHigh, ((u64) tp->RxPhyAddr) >> 32); 2347 RTL_W32(RxDescAddrHigh, ((u64) tp->RxPhyAddr) >> 32);
2348 RTL_W32(RxDescAddrLow, ((u64) tp->RxPhyAddr) & DMA_32BIT_MASK); 2348 RTL_W32(RxDescAddrLow, ((u64) tp->RxPhyAddr) & DMA_BIT_MASK(32));
2349} 2349}
2350 2350
2351static u16 rtl_rw_cpluscmd(void __iomem *ioaddr) 2351static u16 rtl_rw_cpluscmd(void __iomem *ioaddr)
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index 7c8d5613a1da..1a4979f27fb5 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -7786,7 +7786,7 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre)
7786 pci_disable_device(pdev); 7786 pci_disable_device(pdev);
7787 return -ENOMEM; 7787 return -ENOMEM;
7788 } 7788 }
7789 } else if (!pci_set_dma_mask(pdev, DMA_32BIT_MASK)) { 7789 } else if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
7790 DBG_PRINT(INIT_DBG, "s2io_init_nic: Using 32bit DMA\n"); 7790 DBG_PRINT(INIT_DBG, "s2io_init_nic: Using 32bit DMA\n");
7791 } else { 7791 } else {
7792 pci_disable_device(pdev); 7792 pci_disable_device(pdev);
diff --git a/drivers/net/sc92031.c b/drivers/net/sc92031.c
index c13cbf099b88..18821f217e19 100644
--- a/drivers/net/sc92031.c
+++ b/drivers/net/sc92031.c
@@ -1427,11 +1427,11 @@ static int __devinit sc92031_probe(struct pci_dev *pdev,
1427 1427
1428 pci_set_master(pdev); 1428 pci_set_master(pdev);
1429 1429
1430 err = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 1430 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
1431 if (unlikely(err < 0)) 1431 if (unlikely(err < 0))
1432 goto out_set_dma_mask; 1432 goto out_set_dma_mask;
1433 1433
1434 err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); 1434 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
1435 if (unlikely(err < 0)) 1435 if (unlikely(err < 0))
1436 goto out_set_dma_mask; 1436 goto out_set_dma_mask;
1437 1437
diff --git a/drivers/net/sis190.c b/drivers/net/sis190.c
index a9732686134b..55ccd51d247e 100644
--- a/drivers/net/sis190.c
+++ b/drivers/net/sis190.c
@@ -1467,7 +1467,7 @@ static struct net_device * __devinit sis190_init_board(struct pci_dev *pdev)
1467 goto err_pci_disable_2; 1467 goto err_pci_disable_2;
1468 } 1468 }
1469 1469
1470 rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 1470 rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
1471 if (rc < 0) { 1471 if (rc < 0) {
1472 net_probe(tp, KERN_ERR "%s: DMA configuration failed.\n", 1472 net_probe(tp, KERN_ERR "%s: DMA configuration failed.\n",
1473 pci_name(pdev)); 1473 pci_name(pdev));
diff --git a/drivers/net/sis900.c b/drivers/net/sis900.c
index 8a70de72ea2c..2d4617b3e208 100644
--- a/drivers/net/sis900.c
+++ b/drivers/net/sis900.c
@@ -432,7 +432,7 @@ static int __devinit sis900_probe(struct pci_dev *pci_dev,
432 ret = pci_enable_device(pci_dev); 432 ret = pci_enable_device(pci_dev);
433 if(ret) return ret; 433 if(ret) return ret;
434 434
435 i = pci_set_dma_mask(pci_dev, DMA_32BIT_MASK); 435 i = pci_set_dma_mask(pci_dev, DMA_BIT_MASK(32));
436 if(i){ 436 if(i){
437 printk(KERN_ERR "sis900.c: architecture does not support " 437 printk(KERN_ERR "sis900.c: architecture does not support "
438 "32bit PCI busmaster DMA\n"); 438 "32bit PCI busmaster DMA\n");
diff --git a/drivers/net/skge.c b/drivers/net/skge.c
index 18a7b662aff1..b8978d4af1b7 100644
--- a/drivers/net/skge.c
+++ b/drivers/net/skge.c
@@ -3915,9 +3915,9 @@ static int __devinit skge_probe(struct pci_dev *pdev,
3915 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) { 3915 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
3916 using_dac = 1; 3916 using_dac = 1;
3917 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)); 3917 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
3918 } else if (!(err = pci_set_dma_mask(pdev, DMA_32BIT_MASK))) { 3918 } else if (!(err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)))) {
3919 using_dac = 0; 3919 using_dac = 0;
3920 err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); 3920 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
3921 } 3921 }
3922 3922
3923 if (err) { 3923 if (err) {
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index da570f44b12b..a2ff9cb1e7ac 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -4383,7 +4383,7 @@ static int __devinit sky2_probe(struct pci_dev *pdev,
4383 goto err_out_free_regions; 4383 goto err_out_free_regions;
4384 } 4384 }
4385 } else { 4385 } else {
4386 err = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 4386 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
4387 if (err) { 4387 if (err) {
4388 dev_err(&pdev->dev, "no usable DMA configuration\n"); 4388 dev_err(&pdev->dev, "no usable DMA configuration\n");
4389 goto err_out_free_regions; 4389 goto err_out_free_regions;
diff --git a/drivers/net/smsc9420.c b/drivers/net/smsc9420.c
index 5959ae86e57d..60abdb1081ad 100644
--- a/drivers/net/smsc9420.c
+++ b/drivers/net/smsc9420.c
@@ -1598,7 +1598,7 @@ smsc9420_probe(struct pci_dev *pdev, const struct pci_device_id *id)
1598 goto out_free_netdev_2; 1598 goto out_free_netdev_2;
1599 } 1599 }
1600 1600
1601 if (pci_set_dma_mask(pdev, DMA_32BIT_MASK)) { 1601 if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
1602 printk(KERN_ERR "No usable DMA configuration, aborting.\n"); 1602 printk(KERN_ERR "No usable DMA configuration, aborting.\n");
1603 goto out_free_regions_3; 1603 goto out_free_regions_3;
1604 } 1604 }
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c
index 2312d10f3b54..d2dfe0ab5106 100644
--- a/drivers/net/sungem.c
+++ b/drivers/net/sungem.c
@@ -3045,7 +3045,7 @@ static int __devinit gem_init_one(struct pci_dev *pdev,
3045 !pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) { 3045 !pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
3046 pci_using_dac = 1; 3046 pci_using_dac = 1;
3047 } else { 3047 } else {
3048 err = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 3048 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
3049 if (err) { 3049 if (err) {
3050 printk(KERN_ERR PFX "No usable DMA configuration, " 3050 printk(KERN_ERR PFX "No usable DMA configuration, "
3051 "aborting.\n"); 3051 "aborting.\n");
diff --git a/drivers/net/tehuti.c b/drivers/net/tehuti.c
index d77a0918a325..7f4a9683ba1e 100644
--- a/drivers/net/tehuti.c
+++ b/drivers/net/tehuti.c
@@ -1945,8 +1945,8 @@ bdx_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1945 !(err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)))) { 1945 !(err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)))) {
1946 pci_using_dac = 1; 1946 pci_using_dac = 1;
1947 } else { 1947 } else {
1948 if ((err = pci_set_dma_mask(pdev, DMA_32BIT_MASK)) || 1948 if ((err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) ||
1949 (err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK))) { 1949 (err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)))) {
1950 printk(KERN_ERR "tehuti: No usable DMA configuration" 1950 printk(KERN_ERR "tehuti: No usable DMA configuration"
1951 ", aborting\n"); 1951 ", aborting\n");
1952 goto err_dma; 1952 goto err_dma;
diff --git a/drivers/net/tehuti.h b/drivers/net/tehuti.h
index 121dda917fdc..4fc875e5dcdd 100644
--- a/drivers/net/tehuti.h
+++ b/drivers/net/tehuti.h
@@ -99,10 +99,6 @@
99#define READ_REG(pp, reg) readl(pp->pBdxRegs + reg) 99#define READ_REG(pp, reg) readl(pp->pBdxRegs + reg)
100#define WRITE_REG(pp, reg, val) writel(val, pp->pBdxRegs + reg) 100#define WRITE_REG(pp, reg, val) writel(val, pp->pBdxRegs + reg)
101 101
102#ifndef DMA_32BIT_MASK
103# define DMA_32BIT_MASK 0x00000000ffffffffULL
104#endif
105
106#ifndef NET_IP_ALIGN 102#ifndef NET_IP_ALIGN
107# define NET_IP_ALIGN 2 103# define NET_IP_ALIGN 2
108#endif 104#endif
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 5ba91d7f7587..6a736dda3ee2 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -13228,7 +13228,7 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
13228 * do DMA address check in tg3_start_xmit(). 13228 * do DMA address check in tg3_start_xmit().
13229 */ 13229 */
13230 if (tp->tg3_flags2 & TG3_FLG2_IS_5788) 13230 if (tp->tg3_flags2 & TG3_FLG2_IS_5788)
13231 persist_dma_mask = dma_mask = DMA_32BIT_MASK; 13231 persist_dma_mask = dma_mask = DMA_BIT_MASK(32);
13232 else if (tp->tg3_flags & TG3_FLAG_40BIT_DMA_BUG) { 13232 else if (tp->tg3_flags & TG3_FLAG_40BIT_DMA_BUG) {
13233 persist_dma_mask = dma_mask = DMA_BIT_MASK(40); 13233 persist_dma_mask = dma_mask = DMA_BIT_MASK(40);
13234#ifdef CONFIG_HIGHMEM 13234#ifdef CONFIG_HIGHMEM
@@ -13238,7 +13238,7 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
13238 persist_dma_mask = dma_mask = DMA_BIT_MASK(64); 13238 persist_dma_mask = dma_mask = DMA_BIT_MASK(64);
13239 13239
13240 /* Configure DMA attributes. */ 13240 /* Configure DMA attributes. */
13241 if (dma_mask > DMA_32BIT_MASK) { 13241 if (dma_mask > DMA_BIT_MASK(32)) {
13242 err = pci_set_dma_mask(pdev, dma_mask); 13242 err = pci_set_dma_mask(pdev, dma_mask);
13243 if (!err) { 13243 if (!err) {
13244 dev->features |= NETIF_F_HIGHDMA; 13244 dev->features |= NETIF_F_HIGHDMA;
@@ -13251,8 +13251,8 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
13251 } 13251 }
13252 } 13252 }
13253 } 13253 }
13254 if (err || dma_mask == DMA_32BIT_MASK) { 13254 if (err || dma_mask == DMA_BIT_MASK(32)) {
13255 err = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 13255 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
13256 if (err) { 13256 if (err) {
13257 printk(KERN_ERR PFX "No usable DMA configuration, " 13257 printk(KERN_ERR PFX "No usable DMA configuration, "
13258 "aborting.\n"); 13258 "aborting.\n");
@@ -13393,7 +13393,7 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
13393 (tp->tg3_flags2 & TG3_FLG2_TSO_CAPABLE) != 0); 13393 (tp->tg3_flags2 & TG3_FLG2_TSO_CAPABLE) != 0);
13394 printk(KERN_INFO "%s: dma_rwctrl[%08x] dma_mask[%d-bit]\n", 13394 printk(KERN_INFO "%s: dma_rwctrl[%08x] dma_mask[%d-bit]\n",
13395 dev->name, tp->dma_rwctrl, 13395 dev->name, tp->dma_rwctrl,
13396 (pdev->dma_mask == DMA_32BIT_MASK) ? 32 : 13396 (pdev->dma_mask == DMA_BIT_MASK(32)) ? 32 :
13397 (((u64) pdev->dma_mask == DMA_BIT_MASK(40)) ? 40 : 64)); 13397 (((u64) pdev->dma_mask == DMA_BIT_MASK(40)) ? 40 : 64));
13398 13398
13399 return 0; 13399 return 0;
diff --git a/drivers/net/tlan.c b/drivers/net/tlan.c
index 68b967b585aa..aa6964922d5e 100644
--- a/drivers/net/tlan.c
+++ b/drivers/net/tlan.c
@@ -570,7 +570,7 @@ static int __devinit TLan_probe1(struct pci_dev *pdev,
570 570
571 priv->adapter = &board_info[ent->driver_data]; 571 priv->adapter = &board_info[ent->driver_data];
572 572
573 rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 573 rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
574 if (rc) { 574 if (rc) {
575 printk(KERN_ERR "TLAN: No suitable PCI mapping available.\n"); 575 printk(KERN_ERR "TLAN: No suitable PCI mapping available.\n");
576 goto err_out_free_dev; 576 goto err_out_free_dev;
diff --git a/drivers/net/tokenring/lanstreamer.c b/drivers/net/tokenring/lanstreamer.c
index f309b8f703bd..2e70ee8f1459 100644
--- a/drivers/net/tokenring/lanstreamer.c
+++ b/drivers/net/tokenring/lanstreamer.c
@@ -267,7 +267,7 @@ static int __devinit streamer_init_one(struct pci_dev *pdev,
267#endif 267#endif
268#endif 268#endif
269 269
270 rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 270 rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
271 if (rc) { 271 if (rc) {
272 printk(KERN_ERR "%s: No suitable PCI mapping available.\n", 272 printk(KERN_ERR "%s: No suitable PCI mapping available.\n",
273 dev->name); 273 dev->name);
diff --git a/drivers/net/tulip/dmfe.c b/drivers/net/tulip/dmfe.c
index e2c9d0f5a755..f2e669974c78 100644
--- a/drivers/net/tulip/dmfe.c
+++ b/drivers/net/tulip/dmfe.c
@@ -383,7 +383,7 @@ static int __devinit dmfe_init_one (struct pci_dev *pdev,
383 return -ENOMEM; 383 return -ENOMEM;
384 SET_NETDEV_DEV(dev, &pdev->dev); 384 SET_NETDEV_DEV(dev, &pdev->dev);
385 385
386 if (pci_set_dma_mask(pdev, DMA_32BIT_MASK)) { 386 if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
387 printk(KERN_WARNING DRV_NAME 387 printk(KERN_WARNING DRV_NAME
388 ": 32-bit PCI DMA not available.\n"); 388 ": 32-bit PCI DMA not available.\n");
389 err = -ENODEV; 389 err = -ENODEV;
diff --git a/drivers/net/tulip/uli526x.c b/drivers/net/tulip/uli526x.c
index c227db079621..8761a5a5bd79 100644
--- a/drivers/net/tulip/uli526x.c
+++ b/drivers/net/tulip/uli526x.c
@@ -282,7 +282,7 @@ static int __devinit uli526x_init_one (struct pci_dev *pdev,
282 return -ENOMEM; 282 return -ENOMEM;
283 SET_NETDEV_DEV(dev, &pdev->dev); 283 SET_NETDEV_DEV(dev, &pdev->dev);
284 284
285 if (pci_set_dma_mask(pdev, DMA_32BIT_MASK)) { 285 if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
286 printk(KERN_WARNING DRV_NAME ": 32-bit PCI DMA not available.\n"); 286 printk(KERN_WARNING DRV_NAME ": 32-bit PCI DMA not available.\n");
287 err = -ENODEV; 287 err = -ENODEV;
288 goto err_out_free; 288 goto err_out_free;
diff --git a/drivers/net/tulip/winbond-840.c b/drivers/net/tulip/winbond-840.c
index c61a01b029af..264e61404f34 100644
--- a/drivers/net/tulip/winbond-840.c
+++ b/drivers/net/tulip/winbond-840.c
@@ -375,7 +375,7 @@ static int __devinit w840_probe1 (struct pci_dev *pdev,
375 375
376 irq = pdev->irq; 376 irq = pdev->irq;
377 377
378 if (pci_set_dma_mask(pdev, DMA_32BIT_MASK)) { 378 if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
379 printk(KERN_WARNING "Winbond-840: Device %s disabled due to DMA limitations.\n", 379 printk(KERN_WARNING "Winbond-840: Device %s disabled due to DMA limitations.\n",
380 pci_name(pdev)); 380 pci_name(pdev));
381 return -EIO; 381 return -EIO;
diff --git a/drivers/net/typhoon.c b/drivers/net/typhoon.c
index 9dd4f76a2ff5..cf25eb41b1ce 100644
--- a/drivers/net/typhoon.c
+++ b/drivers/net/typhoon.c
@@ -2406,7 +2406,7 @@ typhoon_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
2406 goto error_out_disable; 2406 goto error_out_disable;
2407 } 2407 }
2408 2408
2409 err = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 2409 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
2410 if(err < 0) { 2410 if(err < 0) {
2411 printk(ERR_PFX "%s: No usable DMA configuration\n", 2411 printk(ERR_PFX "%s: No usable DMA configuration\n",
2412 pci_name(pdev)); 2412 pci_name(pdev));
diff --git a/drivers/net/via-rhine.c b/drivers/net/via-rhine.c
index 880eaf07413b..45daba726b66 100644
--- a/drivers/net/via-rhine.c
+++ b/drivers/net/via-rhine.c
@@ -686,7 +686,7 @@ static int __devinit rhine_init_one(struct pci_dev *pdev,
686 goto err_out; 686 goto err_out;
687 687
688 /* this should always be supported */ 688 /* this should always be supported */
689 rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 689 rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
690 if (rc) { 690 if (rc) {
691 printk(KERN_ERR "32-bit PCI DMA addresses not supported by " 691 printk(KERN_ERR "32-bit PCI DMA addresses not supported by "
692 "the card!?\n"); 692 "the card!?\n");
diff --git a/drivers/net/wan/wanxl.c b/drivers/net/wan/wanxl.c
index 887acb0dc807..850d70d7b05d 100644
--- a/drivers/net/wan/wanxl.c
+++ b/drivers/net/wan/wanxl.c
@@ -633,8 +633,8 @@ static int __devinit wanxl_pci_init_one(struct pci_dev *pdev,
633 /* FIXME when PCI/DMA subsystems are fixed. 633 /* FIXME when PCI/DMA subsystems are fixed.
634 We set both dma_mask and consistent_dma_mask back to 32 bits 634 We set both dma_mask and consistent_dma_mask back to 32 bits
635 to indicate the card can do 32-bit DMA addressing */ 635 to indicate the card can do 32-bit DMA addressing */
636 if (pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK) || 636 if (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)) ||
637 pci_set_dma_mask(pdev, DMA_32BIT_MASK)) { 637 pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
638 printk(KERN_ERR "wanXL: No usable DMA configuration\n"); 638 printk(KERN_ERR "wanXL: No usable DMA configuration\n");
639 wanxl_pci_remove_one(pdev); 639 wanxl_pci_remove_one(pdev);
640 return -EIO; 640 return -EIO;
diff --git a/drivers/net/wireless/adm8211.c b/drivers/net/wireless/adm8211.c
index fc0897fb2239..f71821795018 100644
--- a/drivers/net/wireless/adm8211.c
+++ b/drivers/net/wireless/adm8211.c
@@ -1804,8 +1804,8 @@ static int __devinit adm8211_probe(struct pci_dev *pdev,
1804 return err; /* someone else grabbed it? don't disable it */ 1804 return err; /* someone else grabbed it? don't disable it */
1805 } 1805 }
1806 1806
1807 if (pci_set_dma_mask(pdev, DMA_32BIT_MASK) || 1807 if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32)) ||
1808 pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK)) { 1808 pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32))) {
1809 printk(KERN_ERR "%s (adm8211): No suitable DMA available\n", 1809 printk(KERN_ERR "%s (adm8211): No suitable DMA available\n",
1810 pci_name(pdev)); 1810 pci_name(pdev));
1811 goto err_free_reg; 1811 goto err_free_reg;
diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c
index 5d57d774e466..a08bc8a4fb69 100644
--- a/drivers/net/wireless/ath5k/base.c
+++ b/drivers/net/wireless/ath5k/base.c
@@ -445,7 +445,7 @@ ath5k_pci_probe(struct pci_dev *pdev,
445 } 445 }
446 446
447 /* XXX 32-bit addressing only */ 447 /* XXX 32-bit addressing only */
448 ret = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 448 ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
449 if (ret) { 449 if (ret) {
450 dev_err(&pdev->dev, "32-bit DMA not available\n"); 450 dev_err(&pdev->dev, "32-bit DMA not available\n");
451 goto err_dis; 451 goto err_dis;
diff --git a/drivers/net/wireless/b43/dma.c b/drivers/net/wireless/b43/dma.c
index 461d680d2cec..de1964f7d9e0 100644
--- a/drivers/net/wireless/b43/dma.c
+++ b/drivers/net/wireless/b43/dma.c
@@ -777,7 +777,7 @@ static u64 supported_dma_mask(struct b43_wldev *dev)
777 b43_write32(dev, mmio_base + B43_DMA32_TXCTL, B43_DMA32_TXADDREXT_MASK); 777 b43_write32(dev, mmio_base + B43_DMA32_TXCTL, B43_DMA32_TXADDREXT_MASK);
778 tmp = b43_read32(dev, mmio_base + B43_DMA32_TXCTL); 778 tmp = b43_read32(dev, mmio_base + B43_DMA32_TXCTL);
779 if (tmp & B43_DMA32_TXADDREXT_MASK) 779 if (tmp & B43_DMA32_TXADDREXT_MASK)
780 return DMA_32BIT_MASK; 780 return DMA_BIT_MASK(32);
781 781
782 return DMA_30BIT_MASK; 782 return DMA_30BIT_MASK;
783} 783}
@@ -786,7 +786,7 @@ static enum b43_dmatype dma_mask_to_engine_type(u64 dmamask)
786{ 786{
787 if (dmamask == DMA_30BIT_MASK) 787 if (dmamask == DMA_30BIT_MASK)
788 return B43_DMA_30BIT; 788 return B43_DMA_30BIT;
789 if (dmamask == DMA_32BIT_MASK) 789 if (dmamask == DMA_BIT_MASK(32))
790 return B43_DMA_32BIT; 790 return B43_DMA_32BIT;
791 if (dmamask == DMA_BIT_MASK(64)) 791 if (dmamask == DMA_BIT_MASK(64))
792 return B43_DMA_64BIT; 792 return B43_DMA_64BIT;
@@ -1000,11 +1000,11 @@ static int b43_dma_set_mask(struct b43_wldev *dev, u64 mask)
1000 if (!err) 1000 if (!err)
1001 break; 1001 break;
1002 if (mask == DMA_BIT_MASK(64)) { 1002 if (mask == DMA_BIT_MASK(64)) {
1003 mask = DMA_32BIT_MASK; 1003 mask = DMA_BIT_MASK(32);
1004 fallback = 1; 1004 fallback = 1;
1005 continue; 1005 continue;
1006 } 1006 }
1007 if (mask == DMA_32BIT_MASK) { 1007 if (mask == DMA_BIT_MASK(32)) {
1008 mask = DMA_30BIT_MASK; 1008 mask = DMA_30BIT_MASK;
1009 fallback = 1; 1009 fallback = 1;
1010 continue; 1010 continue;
diff --git a/drivers/net/wireless/b43legacy/dma.c b/drivers/net/wireless/b43legacy/dma.c
index 61bb91266aa8..1d3e0d239314 100644
--- a/drivers/net/wireless/b43legacy/dma.c
+++ b/drivers/net/wireless/b43legacy/dma.c
@@ -854,7 +854,7 @@ static u64 supported_dma_mask(struct b43legacy_wldev *dev)
854 tmp = b43legacy_read32(dev, mmio_base + 854 tmp = b43legacy_read32(dev, mmio_base +
855 B43legacy_DMA32_TXCTL); 855 B43legacy_DMA32_TXCTL);
856 if (tmp & B43legacy_DMA32_TXADDREXT_MASK) 856 if (tmp & B43legacy_DMA32_TXADDREXT_MASK)
857 return DMA_32BIT_MASK; 857 return DMA_BIT_MASK(32);
858 858
859 return DMA_30BIT_MASK; 859 return DMA_30BIT_MASK;
860} 860}
@@ -863,7 +863,7 @@ static enum b43legacy_dmatype dma_mask_to_engine_type(u64 dmamask)
863{ 863{
864 if (dmamask == DMA_30BIT_MASK) 864 if (dmamask == DMA_30BIT_MASK)
865 return B43legacy_DMA_30BIT; 865 return B43legacy_DMA_30BIT;
866 if (dmamask == DMA_32BIT_MASK) 866 if (dmamask == DMA_BIT_MASK(32))
867 return B43legacy_DMA_32BIT; 867 return B43legacy_DMA_32BIT;
868 if (dmamask == DMA_BIT_MASK(64)) 868 if (dmamask == DMA_BIT_MASK(64))
869 return B43legacy_DMA_64BIT; 869 return B43legacy_DMA_64BIT;
@@ -1043,11 +1043,11 @@ static int b43legacy_dma_set_mask(struct b43legacy_wldev *dev, u64 mask)
1043 if (!err) 1043 if (!err)
1044 break; 1044 break;
1045 if (mask == DMA_BIT_MASK(64)) { 1045 if (mask == DMA_BIT_MASK(64)) {
1046 mask = DMA_32BIT_MASK; 1046 mask = DMA_BIT_MASK(32);
1047 fallback = 1; 1047 fallback = 1;
1048 continue; 1048 continue;
1049 } 1049 }
1050 if (mask == DMA_32BIT_MASK) { 1050 if (mask == DMA_BIT_MASK(32)) {
1051 mask = DMA_30BIT_MASK; 1051 mask = DMA_30BIT_MASK;
1052 fallback = 1; 1052 fallback = 1;
1053 continue; 1053 continue;
diff --git a/drivers/net/wireless/ipw2x00/ipw2100.c b/drivers/net/wireless/ipw2x00/ipw2100.c
index f4e963ba768b..97e5647ff050 100644
--- a/drivers/net/wireless/ipw2x00/ipw2100.c
+++ b/drivers/net/wireless/ipw2x00/ipw2100.c
@@ -6207,7 +6207,7 @@ static int ipw2100_pci_init_one(struct pci_dev *pci_dev,
6207 pci_set_master(pci_dev); 6207 pci_set_master(pci_dev);
6208 pci_set_drvdata(pci_dev, priv); 6208 pci_set_drvdata(pci_dev, priv);
6209 6209
6210 err = pci_set_dma_mask(pci_dev, DMA_32BIT_MASK); 6210 err = pci_set_dma_mask(pci_dev, DMA_BIT_MASK(32));
6211 if (err) { 6211 if (err) {
6212 printk(KERN_WARNING DRV_NAME 6212 printk(KERN_WARNING DRV_NAME
6213 "Error calling pci_set_dma_mask.\n"); 6213 "Error calling pci_set_dma_mask.\n");
diff --git a/drivers/net/wireless/ipw2x00/ipw2200.c b/drivers/net/wireless/ipw2x00/ipw2200.c
index e17a4593e1f5..bd4dbcfe1bbe 100644
--- a/drivers/net/wireless/ipw2x00/ipw2200.c
+++ b/drivers/net/wireless/ipw2x00/ipw2200.c
@@ -11631,9 +11631,9 @@ static int __devinit ipw_pci_probe(struct pci_dev *pdev,
11631 11631
11632 pci_set_master(pdev); 11632 pci_set_master(pdev);
11633 11633
11634 err = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 11634 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
11635 if (!err) 11635 if (!err)
11636 err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); 11636 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
11637 if (err) { 11637 if (err) {
11638 printk(KERN_WARNING DRV_NAME ": No suitable DMA available.\n"); 11638 printk(KERN_WARNING DRV_NAME ": No suitable DMA available.\n");
11639 goto out_pci_disable_device; 11639 goto out_pci_disable_device;
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 9d5f97dd7c73..ce729281ff62 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -4998,9 +4998,9 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
4998 4998
4999 pci_set_master(pdev); 4999 pci_set_master(pdev);
5000 5000
5001 err = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 5001 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
5002 if (!err) 5002 if (!err)
5003 err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); 5003 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
5004 if (err) { 5004 if (err) {
5005 IWL_WARN(priv, "No suitable DMA available.\n"); 5005 IWL_WARN(priv, "No suitable DMA available.\n");
5006 goto out_pci_disable_device; 5006 goto out_pci_disable_device;
diff --git a/drivers/net/wireless/prism54/islpci_hotplug.c b/drivers/net/wireless/prism54/islpci_hotplug.c
index 9a72b1e3e163..30876728d7e6 100644
--- a/drivers/net/wireless/prism54/islpci_hotplug.c
+++ b/drivers/net/wireless/prism54/islpci_hotplug.c
@@ -120,7 +120,7 @@ prism54_probe(struct pci_dev *pdev, const struct pci_device_id *id)
120 } 120 }
121 121
122 /* enable PCI DMA */ 122 /* enable PCI DMA */
123 if (pci_set_dma_mask(pdev, DMA_32BIT_MASK)) { 123 if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
124 printk(KERN_ERR "%s: 32-bit PCI DMA not supported", DRV_NAME); 124 printk(KERN_ERR "%s: 32-bit PCI DMA not supported", DRV_NAME);
125 goto do_pci_disable_device; 125 goto do_pci_disable_device;
126 } 126 }
diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.c b/drivers/net/wireless/rt2x00/rt2x00pci.c
index e616c20d4a78..43fa0f849003 100644
--- a/drivers/net/wireless/rt2x00/rt2x00pci.c
+++ b/drivers/net/wireless/rt2x00/rt2x00pci.c
@@ -288,7 +288,7 @@ int rt2x00pci_probe(struct pci_dev *pci_dev, const struct pci_device_id *id)
288 if (pci_set_mwi(pci_dev)) 288 if (pci_set_mwi(pci_dev))
289 ERROR_PROBE("MWI not available.\n"); 289 ERROR_PROBE("MWI not available.\n");
290 290
291 if (dma_set_mask(&pci_dev->dev, DMA_32BIT_MASK)) { 291 if (dma_set_mask(&pci_dev->dev, DMA_BIT_MASK(32))) {
292 ERROR_PROBE("PCI DMA not supported.\n"); 292 ERROR_PROBE("PCI DMA not supported.\n");
293 retval = -EIO; 293 retval = -EIO;
294 goto exit_disable_device; 294 goto exit_disable_device;
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c
index 09dc98b84553..fb3a3f3fca7a 100644
--- a/drivers/pci/intel-iommu.c
+++ b/drivers/pci/intel-iommu.c
@@ -56,7 +56,7 @@
56#define DOMAIN_MAX_ADDR(gaw) ((((u64)1) << gaw) - 1) 56#define DOMAIN_MAX_ADDR(gaw) ((((u64)1) << gaw) - 1)
57 57
58#define IOVA_PFN(addr) ((addr) >> PAGE_SHIFT) 58#define IOVA_PFN(addr) ((addr) >> PAGE_SHIFT)
59#define DMA_32BIT_PFN IOVA_PFN(DMA_32BIT_MASK) 59#define DMA_32BIT_PFN IOVA_PFN(DMA_BIT_MASK(32))
60#define DMA_64BIT_PFN IOVA_PFN(DMA_BIT_MASK(64)) 60#define DMA_64BIT_PFN IOVA_PFN(DMA_BIT_MASK(64))
61 61
62/* global iommu list, set NULL for ignored DMAR units */ 62/* global iommu list, set NULL for ignored DMAR units */
@@ -2080,15 +2080,15 @@ __intel_alloc_iova(struct device *dev, struct dmar_domain *domain,
2080 struct pci_dev *pdev = to_pci_dev(dev); 2080 struct pci_dev *pdev = to_pci_dev(dev);
2081 struct iova *iova = NULL; 2081 struct iova *iova = NULL;
2082 2082
2083 if (dma_mask <= DMA_32BIT_MASK || dmar_forcedac) 2083 if (dma_mask <= DMA_BIT_MASK(32) || dmar_forcedac)
2084 iova = iommu_alloc_iova(domain, size, dma_mask); 2084 iova = iommu_alloc_iova(domain, size, dma_mask);
2085 else { 2085 else {
2086 /* 2086 /*
2087 * First try to allocate an io virtual address in 2087 * First try to allocate an io virtual address in
2088 * DMA_32BIT_MASK and if that fails then try allocating 2088 * DMA_BIT_MASK(32) and if that fails then try allocating
2089 * from higher range 2089 * from higher range
2090 */ 2090 */
2091 iova = iommu_alloc_iova(domain, size, DMA_32BIT_MASK); 2091 iova = iommu_alloc_iova(domain, size, DMA_BIT_MASK(32));
2092 if (!iova) 2092 if (!iova)
2093 iova = iommu_alloc_iova(domain, size, dma_mask); 2093 iova = iommu_alloc_iova(domain, size, dma_mask);
2094 } 2094 }
diff --git a/drivers/rapidio/rio-scan.c b/drivers/rapidio/rio-scan.c
index 5c13f61bfb1b..74d0bfa3f310 100644
--- a/drivers/rapidio/rio-scan.c
+++ b/drivers/rapidio/rio-scan.c
@@ -381,9 +381,9 @@ static struct rio_dev *rio_setup_device(struct rio_net *net,
381 rdev->dev.release = rio_release_dev; 381 rdev->dev.release = rio_release_dev;
382 rio_dev_get(rdev); 382 rio_dev_get(rdev);
383 383
384 rdev->dma_mask = DMA_32BIT_MASK; 384 rdev->dma_mask = DMA_BIT_MASK(32);
385 rdev->dev.dma_mask = &rdev->dma_mask; 385 rdev->dev.dma_mask = &rdev->dma_mask;
386 rdev->dev.coherent_dma_mask = DMA_32BIT_MASK; 386 rdev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
387 387
388 if ((rdev->pef & RIO_PEF_INB_DOORBELL) && 388 if ((rdev->pef & RIO_PEF_INB_DOORBELL) &&
389 (rdev->dst_ops & RIO_DST_OPS_DOORBELL)) 389 (rdev->dst_ops & RIO_DST_OPS_DOORBELL))
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); \
diff --git a/drivers/staging/agnx/pci.c b/drivers/staging/agnx/pci.c
index 4ff4c1601423..25c0ffd2faa0 100644
--- a/drivers/staging/agnx/pci.c
+++ b/drivers/staging/agnx/pci.c
@@ -477,8 +477,8 @@ static int __devinit agnx_pci_probe(struct pci_dev *pdev,
477 return err; 477 return err;
478 } 478 }
479 479
480 if (pci_set_dma_mask(pdev, DMA_32BIT_MASK) || 480 if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32)) ||
481 pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK)) { 481 pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32))) {
482 printk(KERN_ERR PFX "No suitable DMA available\n"); 482 printk(KERN_ERR PFX "No suitable DMA available\n");
483 goto err_free_reg; 483 goto err_free_reg;
484 } 484 }
diff --git a/drivers/staging/altpciechdma/altpciechdma.c b/drivers/staging/altpciechdma/altpciechdma.c
index 6a4d0b8e0960..5869e1484a95 100644
--- a/drivers/staging/altpciechdma/altpciechdma.c
+++ b/drivers/staging/altpciechdma/altpciechdma.c
@@ -855,9 +855,9 @@ static int __devinit probe(struct pci_dev *dev, const struct pci_device_id *id)
855 printk(KERN_DEBUG "Using a 64-bit DMA mask.\n"); 855 printk(KERN_DEBUG "Using a 64-bit DMA mask.\n");
856 } else 856 } else
857#endif 857#endif
858 if (!pci_set_dma_mask(dev, DMA_32BIT_MASK)) { 858 if (!pci_set_dma_mask(dev, DMA_BIT_MASK(32))) {
859 printk(KERN_DEBUG "Could not set 64-bit DMA mask.\n"); 859 printk(KERN_DEBUG "Could not set 64-bit DMA mask.\n");
860 pci_set_consistent_dma_mask(dev, DMA_32BIT_MASK); 860 pci_set_consistent_dma_mask(dev, DMA_BIT_MASK(32));
861 /* use 32-bit DMA */ 861 /* use 32-bit DMA */
862 printk(KERN_DEBUG "Using a 32-bit DMA mask.\n"); 862 printk(KERN_DEBUG "Using a 32-bit DMA mask.\n");
863 } else { 863 } else {
diff --git a/drivers/staging/sxg/sxg.c b/drivers/staging/sxg/sxg.c
index a77e1eee5693..891f6e334672 100644
--- a/drivers/staging/sxg/sxg.c
+++ b/drivers/staging/sxg/sxg.c
@@ -937,13 +937,13 @@ static int sxg_entry_probe(struct pci_dev *pcidev,
937 if (!(err = pci_set_dma_mask(pcidev, DMA_BIT_MASK(64)))) { 937 if (!(err = pci_set_dma_mask(pcidev, DMA_BIT_MASK(64)))) {
938 DBG_ERROR("pci_set_dma_mask(DMA_BIT_MASK(64)) successful\n"); 938 DBG_ERROR("pci_set_dma_mask(DMA_BIT_MASK(64)) successful\n");
939 } else { 939 } else {
940 if ((err = pci_set_dma_mask(pcidev, DMA_32BIT_MASK))) { 940 if ((err = pci_set_dma_mask(pcidev, DMA_BIT_MASK(32)))) {
941 DBG_ERROR 941 DBG_ERROR
942 ("No usable DMA configuration, aborting err[%x]\n", 942 ("No usable DMA configuration, aborting err[%x]\n",
943 err); 943 err);
944 return err; 944 return err;
945 } 945 }
946 DBG_ERROR("pci_set_dma_mask(DMA_32BIT_MASK) successful\n"); 946 DBG_ERROR("pci_set_dma_mask(DMA_BIT_MASK(32)) successful\n");
947 } 947 }
948 948
949 DBG_ERROR("Call pci_request_regions\n"); 949 DBG_ERROR("Call pci_request_regions\n");
diff --git a/drivers/usb/host/ehci-ps3.c b/drivers/usb/host/ehci-ps3.c
index 9c9da35abc6c..1ba9f9a8c308 100644
--- a/drivers/usb/host/ehci-ps3.c
+++ b/drivers/usb/host/ehci-ps3.c
@@ -81,7 +81,7 @@ static int ps3_ehci_probe(struct ps3_system_bus_device *dev)
81 int result; 81 int result;
82 struct usb_hcd *hcd; 82 struct usb_hcd *hcd;
83 unsigned int virq; 83 unsigned int virq;
84 static u64 dummy_mask = DMA_32BIT_MASK; 84 static u64 dummy_mask = DMA_BIT_MASK(32);
85 85
86 if (usb_disabled()) { 86 if (usb_disabled()) {
87 result = -ENODEV; 87 result = -ENODEV;
diff --git a/drivers/usb/host/ohci-ps3.c b/drivers/usb/host/ohci-ps3.c
index 3c1a3b5f89f1..3d1910317328 100644
--- a/drivers/usb/host/ohci-ps3.c
+++ b/drivers/usb/host/ohci-ps3.c
@@ -80,7 +80,7 @@ static int ps3_ohci_probe(struct ps3_system_bus_device *dev)
80 int result; 80 int result;
81 struct usb_hcd *hcd; 81 struct usb_hcd *hcd;
82 unsigned int virq; 82 unsigned int virq;
83 static u64 dummy_mask = DMA_32BIT_MASK; 83 static u64 dummy_mask = DMA_BIT_MASK(32);
84 84
85 if (usb_disabled()) { 85 if (usb_disabled()) {
86 result = -ENODEV; 86 result = -ENODEV;
diff --git a/drivers/uwb/whci.c b/drivers/uwb/whci.c
index 79bb06c7a76b..2e2784627ad6 100644
--- a/drivers/uwb/whci.c
+++ b/drivers/uwb/whci.c
@@ -162,8 +162,8 @@ static int whci_probe(struct pci_dev *pci, const struct pci_device_id *id)
162 err = -ENXIO; 162 err = -ENXIO;
163 if (!pci_set_dma_mask(pci, DMA_BIT_MASK(64))) 163 if (!pci_set_dma_mask(pci, DMA_BIT_MASK(64)))
164 pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(64)); 164 pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(64));
165 else if (!pci_set_dma_mask(pci, DMA_32BIT_MASK)) 165 else if (!pci_set_dma_mask(pci, DMA_BIT_MASK(32)))
166 pci_set_consistent_dma_mask(pci, DMA_32BIT_MASK); 166 pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(32));
167 else 167 else
168 goto error_dma; 168 goto error_dma;
169 169
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
index d7d090d21031..8083b6a36a38 100644
--- a/include/linux/dma-mapping.h
+++ b/include/linux/dma-mapping.h
@@ -115,7 +115,7 @@ static inline u64 dma_get_mask(struct device *dev)
115{ 115{
116 if (dev && dev->dma_mask && *dev->dma_mask) 116 if (dev && dev->dma_mask && *dev->dma_mask)
117 return *dev->dma_mask; 117 return *dev->dma_mask;
118 return DMA_32BIT_MASK; 118 return DMA_BIT_MASK(32);
119} 119}
120 120
121extern u64 dma_get_required_mask(struct device *dev); 121extern u64 dma_get_required_mask(struct device *dev);
diff --git a/lib/swiotlb.c b/lib/swiotlb.c
index 32e2bd3b1142..2b0b5a7d2ced 100644
--- a/lib/swiotlb.c
+++ b/lib/swiotlb.c
@@ -549,7 +549,7 @@ swiotlb_alloc_coherent(struct device *hwdev, size_t size,
549 dma_addr_t dev_addr; 549 dma_addr_t dev_addr;
550 void *ret; 550 void *ret;
551 int order = get_order(size); 551 int order = get_order(size);
552 u64 dma_mask = DMA_32BIT_MASK; 552 u64 dma_mask = DMA_BIT_MASK(32);
553 553
554 if (hwdev && hwdev->coherent_dma_mask) 554 if (hwdev && hwdev->coherent_dma_mask)
555 dma_mask = hwdev->coherent_dma_mask; 555 dma_mask = hwdev->coherent_dma_mask;
diff --git a/sound/pci/ad1889.c b/sound/pci/ad1889.c
index d1f242bd0ac5..8f5098f92c37 100644
--- a/sound/pci/ad1889.c
+++ b/sound/pci/ad1889.c
@@ -909,8 +909,8 @@ snd_ad1889_create(struct snd_card *card,
909 return err; 909 return err;
910 910
911 /* check PCI availability (32bit DMA) */ 911 /* check PCI availability (32bit DMA) */
912 if (pci_set_dma_mask(pci, DMA_32BIT_MASK) < 0 || 912 if (pci_set_dma_mask(pci, DMA_BIT_MASK(32)) < 0 ||
913 pci_set_consistent_dma_mask(pci, DMA_32BIT_MASK) < 0) { 913 pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(32)) < 0) {
914 printk(KERN_ERR PFX "error setting 32-bit DMA mask.\n"); 914 printk(KERN_ERR PFX "error setting 32-bit DMA mask.\n");
915 pci_disable_device(pci); 915 pci_disable_device(pci);
916 return -ENXIO; 916 return -ENXIO;
diff --git a/sound/pci/au88x0/au88x0.c b/sound/pci/au88x0/au88x0.c
index 9ec122383eef..7b72c88e449d 100644
--- a/sound/pci/au88x0/au88x0.c
+++ b/sound/pci/au88x0/au88x0.c
@@ -151,8 +151,8 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci, vortex_t ** rchip)
151 // check PCI availability (DMA). 151 // check PCI availability (DMA).
152 if ((err = pci_enable_device(pci)) < 0) 152 if ((err = pci_enable_device(pci)) < 0)
153 return err; 153 return err;
154 if (pci_set_dma_mask(pci, DMA_32BIT_MASK) < 0 || 154 if (pci_set_dma_mask(pci, DMA_BIT_MASK(32)) < 0 ||
155 pci_set_consistent_dma_mask(pci, DMA_32BIT_MASK) < 0) { 155 pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(32)) < 0) {
156 printk(KERN_ERR "error to set DMA mask\n"); 156 printk(KERN_ERR "error to set DMA mask\n");
157 pci_disable_device(pci); 157 pci_disable_device(pci);
158 return -ENXIO; 158 return -ENXIO;
diff --git a/sound/pci/aw2/aw2-alsa.c b/sound/pci/aw2/aw2-alsa.c
index 8eea29fc42fe..4d34bb0d99d3 100644
--- a/sound/pci/aw2/aw2-alsa.c
+++ b/sound/pci/aw2/aw2-alsa.c
@@ -279,8 +279,8 @@ static int __devinit snd_aw2_create(struct snd_card *card,
279 pci_set_master(pci); 279 pci_set_master(pci);
280 280
281 /* check PCI availability (32bit DMA) */ 281 /* check PCI availability (32bit DMA) */
282 if ((pci_set_dma_mask(pci, DMA_32BIT_MASK) < 0) || 282 if ((pci_set_dma_mask(pci, DMA_BIT_MASK(32)) < 0) ||
283 (pci_set_consistent_dma_mask(pci, DMA_32BIT_MASK) < 0)) { 283 (pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(32)) < 0)) {
284 printk(KERN_ERR "aw2: Impossible to set 32bit mask DMA\n"); 284 printk(KERN_ERR "aw2: Impossible to set 32bit mask DMA\n");
285 pci_disable_device(pci); 285 pci_disable_device(pci);
286 return -ENXIO; 286 return -ENXIO;
diff --git a/sound/pci/ca0106/ca0106_main.c b/sound/pci/ca0106/ca0106_main.c
index df757575798a..bfac30f7929f 100644
--- a/sound/pci/ca0106/ca0106_main.c
+++ b/sound/pci/ca0106/ca0106_main.c
@@ -1589,8 +1589,8 @@ static int __devinit snd_ca0106_create(int dev, struct snd_card *card,
1589 err = pci_enable_device(pci); 1589 err = pci_enable_device(pci);
1590 if (err < 0) 1590 if (err < 0)
1591 return err; 1591 return err;
1592 if (pci_set_dma_mask(pci, DMA_32BIT_MASK) < 0 || 1592 if (pci_set_dma_mask(pci, DMA_BIT_MASK(32)) < 0 ||
1593 pci_set_consistent_dma_mask(pci, DMA_32BIT_MASK) < 0) { 1593 pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(32)) < 0) {
1594 printk(KERN_ERR "error to set 32bit mask DMA\n"); 1594 printk(KERN_ERR "error to set 32bit mask DMA\n");
1595 pci_disable_device(pci); 1595 pci_disable_device(pci);
1596 return -ENXIO; 1596 return -ENXIO;
diff --git a/sound/pci/cs5535audio/cs5535audio.c b/sound/pci/cs5535audio/cs5535audio.c
index c89ed1f5bc2b..05f56e04849b 100644
--- a/sound/pci/cs5535audio/cs5535audio.c
+++ b/sound/pci/cs5535audio/cs5535audio.c
@@ -285,8 +285,8 @@ static int __devinit snd_cs5535audio_create(struct snd_card *card,
285 if ((err = pci_enable_device(pci)) < 0) 285 if ((err = pci_enable_device(pci)) < 0)
286 return err; 286 return err;
287 287
288 if (pci_set_dma_mask(pci, DMA_32BIT_MASK) < 0 || 288 if (pci_set_dma_mask(pci, DMA_BIT_MASK(32)) < 0 ||
289 pci_set_consistent_dma_mask(pci, DMA_32BIT_MASK) < 0) { 289 pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(32)) < 0) {
290 printk(KERN_WARNING "unable to get 32bit dma\n"); 290 printk(KERN_WARNING "unable to get 32bit dma\n");
291 err = -ENXIO; 291 err = -ENXIO;
292 goto pcifail; 292 goto pcifail;
diff --git a/sound/pci/mixart/mixart.c b/sound/pci/mixart/mixart.c
index c1eb84a14c42..82bc5b9e7629 100644
--- a/sound/pci/mixart/mixart.c
+++ b/sound/pci/mixart/mixart.c
@@ -1291,7 +1291,7 @@ static int __devinit snd_mixart_probe(struct pci_dev *pci,
1291 pci_set_master(pci); 1291 pci_set_master(pci);
1292 1292
1293 /* check if we can restrict PCI DMA transfers to 32 bits */ 1293 /* check if we can restrict PCI DMA transfers to 32 bits */
1294 if (pci_set_dma_mask(pci, DMA_32BIT_MASK) < 0) { 1294 if (pci_set_dma_mask(pci, DMA_BIT_MASK(32)) < 0) {
1295 snd_printk(KERN_ERR "architecture does not support 32bit PCI busmaster DMA\n"); 1295 snd_printk(KERN_ERR "architecture does not support 32bit PCI busmaster DMA\n");
1296 pci_disable_device(pci); 1296 pci_disable_device(pci);
1297 return -ENXIO; 1297 return -ENXIO;
diff --git a/sound/pci/pcxhr/pcxhr.c b/sound/pci/pcxhr/pcxhr.c
index 80e064a3efff..833e9c7b27c7 100644
--- a/sound/pci/pcxhr/pcxhr.c
+++ b/sound/pci/pcxhr/pcxhr.c
@@ -1449,7 +1449,7 @@ static int __devinit pcxhr_probe(struct pci_dev *pci,
1449 pci_set_master(pci); 1449 pci_set_master(pci);
1450 1450
1451 /* check if we can restrict PCI DMA transfers to 32 bits */ 1451 /* check if we can restrict PCI DMA transfers to 32 bits */
1452 if (pci_set_dma_mask(pci, DMA_32BIT_MASK) < 0) { 1452 if (pci_set_dma_mask(pci, DMA_BIT_MASK(32)) < 0) {
1453 snd_printk(KERN_ERR "architecture does not support " 1453 snd_printk(KERN_ERR "architecture does not support "
1454 "32bit PCI busmaster DMA\n"); 1454 "32bit PCI busmaster DMA\n");
1455 pci_disable_device(pci); 1455 pci_disable_device(pci);
diff --git a/sound/soc/blackfin/bf5xx-ac97-pcm.c b/sound/soc/blackfin/bf5xx-ac97-pcm.c
index 8cfed1a5dcbe..cf0dfb7ca221 100644
--- a/sound/soc/blackfin/bf5xx-ac97-pcm.c
+++ b/sound/soc/blackfin/bf5xx-ac97-pcm.c
@@ -413,7 +413,7 @@ static void bf5xx_pcm_free_dma_buffers(struct snd_pcm *pcm)
413 sport_done(sport_handle); 413 sport_done(sport_handle);
414} 414}
415 415
416static u64 bf5xx_pcm_dmamask = DMA_32BIT_MASK; 416static u64 bf5xx_pcm_dmamask = DMA_BIT_MASK(32);
417 417
418int bf5xx_pcm_ac97_new(struct snd_card *card, struct snd_soc_dai *dai, 418int bf5xx_pcm_ac97_new(struct snd_card *card, struct snd_soc_dai *dai,
419 struct snd_pcm *pcm) 419 struct snd_pcm *pcm)
@@ -424,7 +424,7 @@ int bf5xx_pcm_ac97_new(struct snd_card *card, struct snd_soc_dai *dai,
424 if (!card->dev->dma_mask) 424 if (!card->dev->dma_mask)
425 card->dev->dma_mask = &bf5xx_pcm_dmamask; 425 card->dev->dma_mask = &bf5xx_pcm_dmamask;
426 if (!card->dev->coherent_dma_mask) 426 if (!card->dev->coherent_dma_mask)
427 card->dev->coherent_dma_mask = DMA_32BIT_MASK; 427 card->dev->coherent_dma_mask = DMA_BIT_MASK(32);
428 428
429 if (dai->playback.channels_min) { 429 if (dai->playback.channels_min) {
430 ret = bf5xx_pcm_preallocate_dma_buffer(pcm, 430 ret = bf5xx_pcm_preallocate_dma_buffer(pcm,
diff --git a/sound/soc/blackfin/bf5xx-i2s-pcm.c b/sound/soc/blackfin/bf5xx-i2s-pcm.c
index 1318c4f627b7..62fbb8459569 100644
--- a/sound/soc/blackfin/bf5xx-i2s-pcm.c
+++ b/sound/soc/blackfin/bf5xx-i2s-pcm.c
@@ -245,7 +245,7 @@ static void bf5xx_pcm_free_dma_buffers(struct snd_pcm *pcm)
245 sport_done(sport_handle); 245 sport_done(sport_handle);
246} 246}
247 247
248static u64 bf5xx_pcm_dmamask = DMA_32BIT_MASK; 248static u64 bf5xx_pcm_dmamask = DMA_BIT_MASK(32);
249 249
250int bf5xx_pcm_i2s_new(struct snd_card *card, struct snd_soc_dai *dai, 250int bf5xx_pcm_i2s_new(struct snd_card *card, struct snd_soc_dai *dai,
251 struct snd_pcm *pcm) 251 struct snd_pcm *pcm)
@@ -256,7 +256,7 @@ int bf5xx_pcm_i2s_new(struct snd_card *card, struct snd_soc_dai *dai,
256 if (!card->dev->dma_mask) 256 if (!card->dev->dma_mask)
257 card->dev->dma_mask = &bf5xx_pcm_dmamask; 257 card->dev->dma_mask = &bf5xx_pcm_dmamask;
258 if (!card->dev->coherent_dma_mask) 258 if (!card->dev->coherent_dma_mask)
259 card->dev->coherent_dma_mask = DMA_32BIT_MASK; 259 card->dev->coherent_dma_mask = DMA_BIT_MASK(32);
260 260
261 if (dai->playback.channels_min) { 261 if (dai->playback.channels_min) {
262 ret = bf5xx_pcm_preallocate_dma_buffer(pcm, 262 ret = bf5xx_pcm_preallocate_dma_buffer(pcm,
diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c
index 8e1431cb46bb..1bdbb0427183 100644
--- a/sound/soc/omap/omap-pcm.c
+++ b/sound/soc/omap/omap-pcm.c
@@ -327,7 +327,7 @@ int omap_pcm_new(struct snd_card *card, struct snd_soc_dai *dai,
327 if (!card->dev->dma_mask) 327 if (!card->dev->dma_mask)
328 card->dev->dma_mask = &omap_pcm_dmamask; 328 card->dev->dma_mask = &omap_pcm_dmamask;
329 if (!card->dev->coherent_dma_mask) 329 if (!card->dev->coherent_dma_mask)
330 card->dev->coherent_dma_mask = DMA_32BIT_MASK; 330 card->dev->coherent_dma_mask = DMA_BIT_MASK(32);
331 331
332 if (dai->playback.channels_min) { 332 if (dai->playback.channels_min) {
333 ret = omap_pcm_preallocate_dma_buffer(pcm, 333 ret = omap_pcm_preallocate_dma_buffer(pcm,
diff --git a/sound/soc/pxa/pxa2xx-pcm.c b/sound/soc/pxa/pxa2xx-pcm.c
index 53b9fb127a6d..d38e39575f51 100644
--- a/sound/soc/pxa/pxa2xx-pcm.c
+++ b/sound/soc/pxa/pxa2xx-pcm.c
@@ -81,7 +81,7 @@ static struct snd_pcm_ops pxa2xx_pcm_ops = {
81 .mmap = pxa2xx_pcm_mmap, 81 .mmap = pxa2xx_pcm_mmap,
82}; 82};
83 83
84static u64 pxa2xx_pcm_dmamask = DMA_32BIT_MASK; 84static u64 pxa2xx_pcm_dmamask = DMA_BIT_MASK(32);
85 85
86static int pxa2xx_soc_pcm_new(struct snd_card *card, struct snd_soc_dai *dai, 86static int pxa2xx_soc_pcm_new(struct snd_card *card, struct snd_soc_dai *dai,
87 struct snd_pcm *pcm) 87 struct snd_pcm *pcm)
@@ -91,7 +91,7 @@ static int pxa2xx_soc_pcm_new(struct snd_card *card, struct snd_soc_dai *dai,
91 if (!card->dev->dma_mask) 91 if (!card->dev->dma_mask)
92 card->dev->dma_mask = &pxa2xx_pcm_dmamask; 92 card->dev->dma_mask = &pxa2xx_pcm_dmamask;
93 if (!card->dev->coherent_dma_mask) 93 if (!card->dev->coherent_dma_mask)
94 card->dev->coherent_dma_mask = DMA_32BIT_MASK; 94 card->dev->coherent_dma_mask = DMA_BIT_MASK(32);
95 95
96 if (dai->playback.channels_min) { 96 if (dai->playback.channels_min) {
97 ret = pxa2xx_pcm_preallocate_dma_buffer(pcm, 97 ret = pxa2xx_pcm_preallocate_dma_buffer(pcm,
diff --git a/sound/soc/s3c24xx/s3c24xx-pcm.c b/sound/soc/s3c24xx/s3c24xx-pcm.c
index a9d68fa2b34a..169ddad31575 100644
--- a/sound/soc/s3c24xx/s3c24xx-pcm.c
+++ b/sound/soc/s3c24xx/s3c24xx-pcm.c
@@ -419,7 +419,7 @@ static void s3c24xx_pcm_free_dma_buffers(struct snd_pcm *pcm)
419 } 419 }
420} 420}
421 421
422static u64 s3c24xx_pcm_dmamask = DMA_32BIT_MASK; 422static u64 s3c24xx_pcm_dmamask = DMA_BIT_MASK(32);
423 423
424static int s3c24xx_pcm_new(struct snd_card *card, 424static int s3c24xx_pcm_new(struct snd_card *card,
425 struct snd_soc_dai *dai, struct snd_pcm *pcm) 425 struct snd_soc_dai *dai, struct snd_pcm *pcm)