aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-iop13xx/setup.c8
-rw-r--r--arch/arm/mach-iop13xx/tpmi.c10
-rw-r--r--arch/arm/mach-kirkwood/common.c8
-rw-r--r--arch/arm/mach-orion5x/common.c4
-rw-r--r--arch/arm/plat-iop/adma.c6
-rw-r--r--arch/ia64/sn/pci/pci_dma.c2
-rw-r--r--arch/powerpc/platforms/cell/iommu.c2
-rw-r--r--drivers/ata/ahci.c4
-rw-r--r--drivers/ata/sata_mv.c4
-rw-r--r--drivers/ata/sata_qstor.c4
-rw-r--r--drivers/ata/sata_sil24.c4
-rw-r--r--drivers/block/DAC960.c4
-rw-r--r--drivers/block/cciss.c2
-rw-r--r--drivers/block/sx8.c4
-rw-r--r--drivers/block/umem.c2
-rw-r--r--drivers/dma/ioat.c4
-rw-r--r--drivers/idle/i7300_idle.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/message/fusion/mptbase.c4
-rw-r--r--drivers/message/i2o/memory.c4
-rw-r--r--drivers/message/i2o/pci.c2
-rw-r--r--drivers/net/8139cp.c4
-rw-r--r--drivers/net/acenic.c2
-rw-r--r--drivers/net/bnx2.c2
-rw-r--r--drivers/net/bnx2x_main.c4
-rw-r--r--drivers/net/cassini.c4
-rw-r--r--drivers/net/chelsio/cxgb2.c4
-rw-r--r--drivers/net/cxgb3/cxgb3_main.c4
-rw-r--r--drivers/net/e1000/e1000_main.c4
-rw-r--r--drivers/net/e1000e/netdev.c4
-rw-r--r--drivers/net/igb/igb_main.c4
-rw-r--r--drivers/net/ioc3-eth.c4
-rw-r--r--drivers/net/ixgb/ixgb_main.c4
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c4
-rw-r--r--drivers/net/mlx4/main.c4
-rw-r--r--drivers/net/myri10ge/myri10ge.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/r8169.c2
-rw-r--r--drivers/net/s2io.c4
-rw-r--r--drivers/net/skge.c4
-rw-r--r--drivers/net/sky2.c4
-rw-r--r--drivers/net/sungem.c2
-rw-r--r--drivers/net/tehuti.c4
-rw-r--r--drivers/net/tehuti.h5
-rw-r--r--drivers/net/tg3.c4
-rw-r--r--drivers/net/usb/usbnet.c2
-rw-r--r--drivers/net/wireless/b43/dma.c6
-rw-r--r--drivers/net/wireless/b43legacy/dma.c6
-rw-r--r--drivers/pci/intel-iommu.c2
-rw-r--r--drivers/scsi/3w-9xxx.c4
-rw-r--r--drivers/scsi/aacraid/aachba.c4
-rw-r--r--drivers/scsi/aic7xxx/aic79xx_osm_pci.c2
-rw-r--r--drivers/scsi/aic94xx/aic94xx_init.c4
-rw-r--r--drivers/scsi/arcmsr/arcmsr_hba.c2
-rw-r--r--drivers/scsi/dpt_i2o.c2
-rw-r--r--drivers/scsi/gdth.c2
-rw-r--r--drivers/scsi/hptiop.c2
-rw-r--r--drivers/scsi/ips.c2
-rw-r--r--drivers/scsi/lpfc/lpfc_init.c2
-rw-r--r--drivers/scsi/megaraid.c2
-rw-r--r--drivers/scsi/megaraid/megaraid_mbox.c2
-rw-r--r--drivers/scsi/megaraid/megaraid_sas.c2
-rw-r--r--drivers/scsi/mvsas.c4
-rw-r--r--drivers/scsi/qla1280.c2
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c4
-rw-r--r--drivers/scsi/qla4xxx/ql4_os.c4
-rw-r--r--drivers/scsi/stex.c4
-rw-r--r--drivers/scsi/sym53c8xx_2/sym_hipd.h2
-rw-r--r--drivers/sn/ioc3.c4
-rw-r--r--drivers/staging/altpciechdma/altpciechdma.c4
-rw-r--r--drivers/staging/slicoss/slicoss.c4
-rw-r--r--drivers/staging/sxg/sxg.c4
-rw-r--r--drivers/usb/host/ehci-hcd.c2
-rw-r--r--drivers/uwb/whci.c4
79 files changed, 140 insertions, 143 deletions
diff --git a/arch/arm/mach-iop13xx/setup.c b/arch/arm/mach-iop13xx/setup.c
index cfd4d2e6dacd..bee42c609df6 100644
--- a/arch/arm/mach-iop13xx/setup.c
+++ b/arch/arm/mach-iop13xx/setup.c
@@ -307,7 +307,7 @@ static struct resource iop13xx_adma_2_resources[] = {
307 } 307 }
308}; 308};
309 309
310static u64 iop13xx_adma_dmamask = DMA_64BIT_MASK; 310static u64 iop13xx_adma_dmamask = DMA_BIT_MASK(64);
311static struct iop_adma_platform_data iop13xx_adma_0_data = { 311static struct iop_adma_platform_data iop13xx_adma_0_data = {
312 .hw_id = 0, 312 .hw_id = 0,
313 .pool_size = PAGE_SIZE, 313 .pool_size = PAGE_SIZE,
@@ -331,7 +331,7 @@ static struct platform_device iop13xx_adma_0_channel = {
331 .resource = iop13xx_adma_0_resources, 331 .resource = iop13xx_adma_0_resources,
332 .dev = { 332 .dev = {
333 .dma_mask = &iop13xx_adma_dmamask, 333 .dma_mask = &iop13xx_adma_dmamask,
334 .coherent_dma_mask = DMA_64BIT_MASK, 334 .coherent_dma_mask = DMA_BIT_MASK(64),
335 .platform_data = (void *) &iop13xx_adma_0_data, 335 .platform_data = (void *) &iop13xx_adma_0_data,
336 }, 336 },
337}; 337};
@@ -343,7 +343,7 @@ static struct platform_device iop13xx_adma_1_channel = {
343 .resource = iop13xx_adma_1_resources, 343 .resource = iop13xx_adma_1_resources,
344 .dev = { 344 .dev = {
345 .dma_mask = &iop13xx_adma_dmamask, 345 .dma_mask = &iop13xx_adma_dmamask,
346 .coherent_dma_mask = DMA_64BIT_MASK, 346 .coherent_dma_mask = DMA_BIT_MASK(64),
347 .platform_data = (void *) &iop13xx_adma_1_data, 347 .platform_data = (void *) &iop13xx_adma_1_data,
348 }, 348 },
349}; 349};
@@ -355,7 +355,7 @@ static struct platform_device iop13xx_adma_2_channel = {
355 .resource = iop13xx_adma_2_resources, 355 .resource = iop13xx_adma_2_resources,
356 .dev = { 356 .dev = {
357 .dma_mask = &iop13xx_adma_dmamask, 357 .dma_mask = &iop13xx_adma_dmamask,
358 .coherent_dma_mask = DMA_64BIT_MASK, 358 .coherent_dma_mask = DMA_BIT_MASK(64),
359 .platform_data = (void *) &iop13xx_adma_2_data, 359 .platform_data = (void *) &iop13xx_adma_2_data,
360 }, 360 },
361}; 361};
diff --git a/arch/arm/mach-iop13xx/tpmi.c b/arch/arm/mach-iop13xx/tpmi.c
index c6af1e1bee32..6fdad7a0425a 100644
--- a/arch/arm/mach-iop13xx/tpmi.c
+++ b/arch/arm/mach-iop13xx/tpmi.c
@@ -151,7 +151,7 @@ static struct resource iop13xx_tpmi_3_resources[] = {
151 } 151 }
152}; 152};
153 153
154u64 iop13xx_tpmi_mask = DMA_64BIT_MASK; 154u64 iop13xx_tpmi_mask = DMA_BIT_MASK(64);
155static struct platform_device iop13xx_tpmi_0_device = { 155static struct platform_device iop13xx_tpmi_0_device = {
156 .name = "iop-tpmi", 156 .name = "iop-tpmi",
157 .id = 0, 157 .id = 0,
@@ -159,7 +159,7 @@ static struct platform_device iop13xx_tpmi_0_device = {
159 .resource = iop13xx_tpmi_0_resources, 159 .resource = iop13xx_tpmi_0_resources,
160 .dev = { 160 .dev = {
161 .dma_mask = &iop13xx_tpmi_mask, 161 .dma_mask = &iop13xx_tpmi_mask,
162 .coherent_dma_mask = DMA_64BIT_MASK, 162 .coherent_dma_mask = DMA_BIT_MASK(64),
163 }, 163 },
164}; 164};
165 165
@@ -170,7 +170,7 @@ static struct platform_device iop13xx_tpmi_1_device = {
170 .resource = iop13xx_tpmi_1_resources, 170 .resource = iop13xx_tpmi_1_resources,
171 .dev = { 171 .dev = {
172 .dma_mask = &iop13xx_tpmi_mask, 172 .dma_mask = &iop13xx_tpmi_mask,
173 .coherent_dma_mask = DMA_64BIT_MASK, 173 .coherent_dma_mask = DMA_BIT_MASK(64),
174 }, 174 },
175}; 175};
176 176
@@ -181,7 +181,7 @@ static struct platform_device iop13xx_tpmi_2_device = {
181 .resource = iop13xx_tpmi_2_resources, 181 .resource = iop13xx_tpmi_2_resources,
182 .dev = { 182 .dev = {
183 .dma_mask = &iop13xx_tpmi_mask, 183 .dma_mask = &iop13xx_tpmi_mask,
184 .coherent_dma_mask = DMA_64BIT_MASK, 184 .coherent_dma_mask = DMA_BIT_MASK(64),
185 }, 185 },
186}; 186};
187 187
@@ -192,7 +192,7 @@ static struct platform_device iop13xx_tpmi_3_device = {
192 .resource = iop13xx_tpmi_3_resources, 192 .resource = iop13xx_tpmi_3_resources,
193 .dev = { 193 .dev = {
194 .dma_mask = &iop13xx_tpmi_mask, 194 .dma_mask = &iop13xx_tpmi_mask,
195 .coherent_dma_mask = DMA_64BIT_MASK, 195 .coherent_dma_mask = DMA_BIT_MASK(64),
196 }, 196 },
197}; 197};
198 198
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c
index 3d2fae846512..c691848714d9 100644
--- a/arch/arm/mach-kirkwood/common.c
+++ b/arch/arm/mach-kirkwood/common.c
@@ -559,7 +559,7 @@ static struct platform_device kirkwood_xor00_channel = {
559 .resource = kirkwood_xor00_resources, 559 .resource = kirkwood_xor00_resources,
560 .dev = { 560 .dev = {
561 .dma_mask = &kirkwood_xor_dmamask, 561 .dma_mask = &kirkwood_xor_dmamask,
562 .coherent_dma_mask = DMA_64BIT_MASK, 562 .coherent_dma_mask = DMA_BIT_MASK(64),
563 .platform_data = (void *)&kirkwood_xor00_data, 563 .platform_data = (void *)&kirkwood_xor00_data,
564 }, 564 },
565}; 565};
@@ -585,7 +585,7 @@ static struct platform_device kirkwood_xor01_channel = {
585 .resource = kirkwood_xor01_resources, 585 .resource = kirkwood_xor01_resources,
586 .dev = { 586 .dev = {
587 .dma_mask = &kirkwood_xor_dmamask, 587 .dma_mask = &kirkwood_xor_dmamask,
588 .coherent_dma_mask = DMA_64BIT_MASK, 588 .coherent_dma_mask = DMA_BIT_MASK(64),
589 .platform_data = (void *)&kirkwood_xor01_data, 589 .platform_data = (void *)&kirkwood_xor01_data,
590 }, 590 },
591}; 591};
@@ -657,7 +657,7 @@ static struct platform_device kirkwood_xor10_channel = {
657 .resource = kirkwood_xor10_resources, 657 .resource = kirkwood_xor10_resources,
658 .dev = { 658 .dev = {
659 .dma_mask = &kirkwood_xor_dmamask, 659 .dma_mask = &kirkwood_xor_dmamask,
660 .coherent_dma_mask = DMA_64BIT_MASK, 660 .coherent_dma_mask = DMA_BIT_MASK(64),
661 .platform_data = (void *)&kirkwood_xor10_data, 661 .platform_data = (void *)&kirkwood_xor10_data,
662 }, 662 },
663}; 663};
@@ -683,7 +683,7 @@ static struct platform_device kirkwood_xor11_channel = {
683 .resource = kirkwood_xor11_resources, 683 .resource = kirkwood_xor11_resources,
684 .dev = { 684 .dev = {
685 .dma_mask = &kirkwood_xor_dmamask, 685 .dma_mask = &kirkwood_xor_dmamask,
686 .coherent_dma_mask = DMA_64BIT_MASK, 686 .coherent_dma_mask = DMA_BIT_MASK(64),
687 .platform_data = (void *)&kirkwood_xor11_data, 687 .platform_data = (void *)&kirkwood_xor11_data,
688 }, 688 },
689}; 689};
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c
index 68cc3efae567..e8d42e8cb465 100644
--- a/arch/arm/mach-orion5x/common.c
+++ b/arch/arm/mach-orion5x/common.c
@@ -486,7 +486,7 @@ static struct platform_device orion5x_xor0_channel = {
486 .resource = orion5x_xor0_resources, 486 .resource = orion5x_xor0_resources,
487 .dev = { 487 .dev = {
488 .dma_mask = &orion5x_xor_dmamask, 488 .dma_mask = &orion5x_xor_dmamask,
489 .coherent_dma_mask = DMA_64BIT_MASK, 489 .coherent_dma_mask = DMA_BIT_MASK(64),
490 .platform_data = (void *)&orion5x_xor0_data, 490 .platform_data = (void *)&orion5x_xor0_data,
491 }, 491 },
492}; 492};
@@ -512,7 +512,7 @@ static struct platform_device orion5x_xor1_channel = {
512 .resource = orion5x_xor1_resources, 512 .resource = orion5x_xor1_resources,
513 .dev = { 513 .dev = {
514 .dma_mask = &orion5x_xor_dmamask, 514 .dma_mask = &orion5x_xor_dmamask,
515 .coherent_dma_mask = DMA_64BIT_MASK, 515 .coherent_dma_mask = DMA_BIT_MASK(64),
516 .platform_data = (void *)&orion5x_xor1_data, 516 .platform_data = (void *)&orion5x_xor1_data,
517 }, 517 },
518}; 518};
diff --git a/arch/arm/plat-iop/adma.c b/arch/arm/plat-iop/adma.c
index f72420821619..a2a94f6d2e7c 100644
--- a/arch/arm/plat-iop/adma.c
+++ b/arch/arm/plat-iop/adma.c
@@ -143,7 +143,7 @@ struct platform_device iop3xx_dma_0_channel = {
143 .resource = iop3xx_dma_0_resources, 143 .resource = iop3xx_dma_0_resources,
144 .dev = { 144 .dev = {
145 .dma_mask = &iop3xx_adma_dmamask, 145 .dma_mask = &iop3xx_adma_dmamask,
146 .coherent_dma_mask = DMA_64BIT_MASK, 146 .coherent_dma_mask = DMA_BIT_MASK(64),
147 .platform_data = (void *) &iop3xx_dma_0_data, 147 .platform_data = (void *) &iop3xx_dma_0_data,
148 }, 148 },
149}; 149};
@@ -155,7 +155,7 @@ struct platform_device iop3xx_dma_1_channel = {
155 .resource = iop3xx_dma_1_resources, 155 .resource = iop3xx_dma_1_resources,
156 .dev = { 156 .dev = {
157 .dma_mask = &iop3xx_adma_dmamask, 157 .dma_mask = &iop3xx_adma_dmamask,
158 .coherent_dma_mask = DMA_64BIT_MASK, 158 .coherent_dma_mask = DMA_BIT_MASK(64),
159 .platform_data = (void *) &iop3xx_dma_1_data, 159 .platform_data = (void *) &iop3xx_dma_1_data,
160 }, 160 },
161}; 161};
@@ -167,7 +167,7 @@ struct platform_device iop3xx_aau_channel = {
167 .resource = iop3xx_aau_resources, 167 .resource = iop3xx_aau_resources,
168 .dev = { 168 .dev = {
169 .dma_mask = &iop3xx_adma_dmamask, 169 .dma_mask = &iop3xx_adma_dmamask,
170 .coherent_dma_mask = DMA_64BIT_MASK, 170 .coherent_dma_mask = DMA_BIT_MASK(64),
171 .platform_data = (void *) &iop3xx_aau_data, 171 .platform_data = (void *) &iop3xx_aau_data,
172 }, 172 },
173}; 173};
diff --git a/arch/ia64/sn/pci/pci_dma.c b/arch/ia64/sn/pci/pci_dma.c
index 8c130e8f00e1..d876423e4e75 100644
--- a/arch/ia64/sn/pci/pci_dma.c
+++ b/arch/ia64/sn/pci/pci_dma.c
@@ -349,7 +349,7 @@ static int sn_dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
349 349
350u64 sn_dma_get_required_mask(struct device *dev) 350u64 sn_dma_get_required_mask(struct device *dev)
351{ 351{
352 return DMA_64BIT_MASK; 352 return DMA_BIT_MASK(64);
353} 353}
354EXPORT_SYMBOL_GPL(sn_dma_get_required_mask); 354EXPORT_SYMBOL_GPL(sn_dma_get_required_mask);
355 355
diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c
index 5744527a7f2a..bed4690de394 100644
--- a/arch/powerpc/platforms/cell/iommu.c
+++ b/arch/powerpc/platforms/cell/iommu.c
@@ -644,7 +644,7 @@ static void dma_fixed_unmap_sg(struct device *dev, struct scatterlist *sg,
644 644
645static int dma_fixed_dma_supported(struct device *dev, u64 mask) 645static int dma_fixed_dma_supported(struct device *dev, u64 mask)
646{ 646{
647 return mask == DMA_64BIT_MASK; 647 return mask == DMA_BIT_MASK(64);
648} 648}
649 649
650static int dma_set_mask_and_switch(struct device *dev, u64 dma_mask); 650static int dma_set_mask_and_switch(struct device *dev, u64 dma_mask);
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 788bba2b1e17..207d775c3c27 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -2405,8 +2405,8 @@ static int ahci_configure_dma_masks(struct pci_dev *pdev, int using_dac)
2405 int rc; 2405 int rc;
2406 2406
2407 if (using_dac && 2407 if (using_dac &&
2408 !pci_set_dma_mask(pdev, DMA_64BIT_MASK)) { 2408 !pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
2409 rc = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK); 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_32BIT_MASK);
2412 if (rc) { 2412 if (rc) {
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index a377226b81c8..45e0fe191afc 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -3913,8 +3913,8 @@ static int pci_go_64(struct pci_dev *pdev)
3913{ 3913{
3914 int rc; 3914 int rc;
3915 3915
3916 if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) { 3916 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
3917 rc = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK); 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_32BIT_MASK);
3920 if (rc) { 3920 if (rc) {
diff --git a/drivers/ata/sata_qstor.c b/drivers/ata/sata_qstor.c
index c3936d35cdac..7b37c27d7972 100644
--- a/drivers/ata/sata_qstor.c
+++ b/drivers/ata/sata_qstor.c
@@ -584,8 +584,8 @@ static int qs_set_dma_masks(struct pci_dev *pdev, void __iomem *mmio_base)
584 int rc, have_64bit_bus = (bus_info & QS_HPHY_64BIT); 584 int rc, have_64bit_bus = (bus_info & QS_HPHY_64BIT);
585 585
586 if (have_64bit_bus && 586 if (have_64bit_bus &&
587 !pci_set_dma_mask(pdev, DMA_64BIT_MASK)) { 587 !pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
588 rc = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK); 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_32BIT_MASK);
591 if (rc) { 591 if (rc) {
diff --git a/drivers/ata/sata_sil24.c b/drivers/ata/sata_sil24.c
index 0d8990dcdfcd..37730bc2f09f 100644
--- a/drivers/ata/sata_sil24.c
+++ b/drivers/ata/sata_sil24.c
@@ -1297,8 +1297,8 @@ static int sil24_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
1297 host->iomap = iomap; 1297 host->iomap = iomap;
1298 1298
1299 /* configure and activate the device */ 1299 /* configure and activate the device */
1300 if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) { 1300 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
1301 rc = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK); 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_32BIT_MASK);
1304 if (rc) { 1304 if (rc) {
diff --git a/drivers/block/DAC960.c b/drivers/block/DAC960.c
index f6a337c34ac4..5496865b297e 100644
--- a/drivers/block/DAC960.c
+++ b/drivers/block/DAC960.c
@@ -1372,8 +1372,8 @@ static bool DAC960_V2_EnableMemoryMailboxInterface(DAC960_Controller_T
1372 dma_addr_t CommandMailboxDMA; 1372 dma_addr_t CommandMailboxDMA;
1373 DAC960_V2_CommandStatus_T CommandStatus; 1373 DAC960_V2_CommandStatus_T CommandStatus;
1374 1374
1375 if (!pci_set_dma_mask(Controller->PCIDevice, DMA_64BIT_MASK)) 1375 if (!pci_set_dma_mask(Controller->PCIDevice, DMA_BIT_MASK(64)))
1376 Controller->BounceBufferLimit = DMA_64BIT_MASK; 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_32BIT_MASK))
1378 Controller->BounceBufferLimit = DMA_32BIT_MASK; 1378 Controller->BounceBufferLimit = DMA_32BIT_MASK;
1379 else 1379 else
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index 5d0e135824f9..149a611e8fe5 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -3637,7 +3637,7 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
3637 hba[i]->pdev = pdev; 3637 hba[i]->pdev = pdev;
3638 3638
3639 /* configure PCI DMA stuff */ 3639 /* configure PCI DMA stuff */
3640 if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) 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_32BIT_MASK))
3643 dac = 0; 3643 dac = 0;
diff --git a/drivers/block/sx8.c b/drivers/block/sx8.c
index a18e1ca0f761..db5783ace1e4 100644
--- a/drivers/block/sx8.c
+++ b/drivers/block/sx8.c
@@ -1586,9 +1586,9 @@ static int carm_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
1586 goto err_out; 1586 goto err_out;
1587 1587
1588#ifdef IF_64BIT_DMA_IS_POSSIBLE /* grrrr... */ 1588#ifdef IF_64BIT_DMA_IS_POSSIBLE /* grrrr... */
1589 rc = pci_set_dma_mask(pdev, DMA_64BIT_MASK); 1589 rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
1590 if (!rc) { 1590 if (!rc) {
1591 rc = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK); 1591 rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
1592 if (rc) { 1592 if (rc) {
1593 printk(KERN_ERR DRV_NAME "(%s): consistent DMA mask failure\n", 1593 printk(KERN_ERR DRV_NAME "(%s): consistent DMA mask failure\n",
1594 pci_name(pdev)); 1594 pci_name(pdev));
diff --git a/drivers/block/umem.c b/drivers/block/umem.c
index c24e1bdbad43..e93e99c9103c 100644
--- a/drivers/block/umem.c
+++ b/drivers/block/umem.c
@@ -829,7 +829,7 @@ static int __devinit mm_pci_probe(struct pci_dev *dev,
829 dev_printk(KERN_INFO, &dev->dev, 829 dev_printk(KERN_INFO, &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_64BIT_MASK) && 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_32BIT_MASK)) {
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;
diff --git a/drivers/dma/ioat.c b/drivers/dma/ioat.c
index ed83dd9df192..22e9f1911111 100644
--- a/drivers/dma/ioat.c
+++ b/drivers/dma/ioat.c
@@ -98,13 +98,13 @@ static int __devinit ioat_probe(struct pci_dev *pdev,
98 if (err) 98 if (err)
99 goto err_request_regions; 99 goto err_request_regions;
100 100
101 err = pci_set_dma_mask(pdev, DMA_64BIT_MASK); 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_32BIT_MASK);
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_64BIT_MASK); 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_32BIT_MASK);
110 if (err) 110 if (err)
diff --git a/drivers/idle/i7300_idle.c b/drivers/idle/i7300_idle.c
index 17e8ddd01334..bf740394d704 100644
--- a/drivers/idle/i7300_idle.c
+++ b/drivers/idle/i7300_idle.c
@@ -178,7 +178,7 @@ static int __init i7300_idle_ioat_selftest(u8 *ctl,
178 178
179static struct device dummy_dma_dev = { 179static struct device dummy_dma_dev = {
180 .init_name = "fallback device", 180 .init_name = "fallback device",
181 .coherent_dma_mask = DMA_64BIT_MASK, 181 .coherent_dma_mask = DMA_BIT_MASK(64),
182 .dma_mask = &dummy_dma_dev.coherent_dma_mask, 182 .dma_mask = &dummy_dma_dev.coherent_dma_mask,
183}; 183};
184 184
diff --git a/drivers/infiniband/hw/amso1100/c2.c b/drivers/infiniband/hw/amso1100/c2.c
index 7d79aa361e26..54d2e0760abf 100644
--- a/drivers/infiniband/hw/amso1100/c2.c
+++ b/drivers/infiniband/hw/amso1100/c2.c
@@ -989,7 +989,7 @@ static int __devinit c2_probe(struct pci_dev *pcidev,
989 } 989 }
990 990
991 if ((sizeof(dma_addr_t) > 4)) { 991 if ((sizeof(dma_addr_t) > 4)) {
992 ret = pci_set_dma_mask(pcidev, DMA_64BIT_MASK); 992 ret = pci_set_dma_mask(pcidev, DMA_BIT_MASK(64));
993 if (ret < 0) { 993 if (ret < 0) {
994 printk(KERN_ERR PFX "64b DMA configuration failed\n"); 994 printk(KERN_ERR PFX "64b DMA configuration failed\n");
995 goto bail2; 995 goto bail2;
diff --git a/drivers/infiniband/hw/ipath/ipath_driver.c b/drivers/infiniband/hw/ipath/ipath_driver.c
index cb9daa6ac029..77b2fb5b7c35 100644
--- a/drivers/infiniband/hw/ipath/ipath_driver.c
+++ b/drivers/infiniband/hw/ipath/ipath_driver.c
@@ -470,7 +470,7 @@ static int __devinit ipath_init_one(struct pci_dev *pdev,
470 goto bail_disable; 470 goto bail_disable;
471 } 471 }
472 472
473 ret = pci_set_dma_mask(pdev, DMA_64BIT_MASK); 473 ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
474 if (ret) { 474 if (ret) {
475 /* 475 /*
476 * if the 64 bit setup fails, try 32 bit. Some systems 476 * if the 64 bit setup fails, try 32 bit. Some systems
@@ -496,7 +496,7 @@ static int __devinit ipath_init_one(struct pci_dev *pdev,
496 } 496 }
497 } 497 }
498 else { 498 else {
499 ret = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK); 499 ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
500 if (ret) 500 if (ret)
501 dev_info(&pdev->dev, 501 dev_info(&pdev->dev,
502 "Unable to set DMA consistent mask " 502 "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 52f60f4eea00..5d234204f7b7 100644
--- a/drivers/infiniband/hw/mthca/mthca_main.c
+++ b/drivers/infiniband/hw/mthca/mthca_main.c
@@ -1016,7 +1016,7 @@ static int __mthca_init_one(struct pci_dev *pdev, int hca_type)
1016 1016
1017 pci_set_master(pdev); 1017 pci_set_master(pdev);
1018 1018
1019 err = pci_set_dma_mask(pdev, DMA_64BIT_MASK); 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_32BIT_MASK);
@@ -1025,7 +1025,7 @@ static int __mthca_init_one(struct pci_dev *pdev, int hca_type)
1025 goto err_free_res; 1025 goto err_free_res;
1026 } 1026 }
1027 } 1027 }
1028 err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK); 1028 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
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");
diff --git a/drivers/infiniband/hw/nes/nes.c b/drivers/infiniband/hw/nes/nes.c
index ca599767ffbd..7446810446e1 100644
--- a/drivers/infiniband/hw/nes/nes.c
+++ b/drivers/infiniband/hw/nes/nes.c
@@ -478,12 +478,12 @@ static int __devinit nes_probe(struct pci_dev *pcidev, const struct pci_device_i
478 } 478 }
479 479
480 if ((sizeof(dma_addr_t) > 4)) { 480 if ((sizeof(dma_addr_t) > 4)) {
481 ret = pci_set_dma_mask(pcidev, DMA_64BIT_MASK); 481 ret = pci_set_dma_mask(pcidev, DMA_BIT_MASK(64));
482 if (ret < 0) { 482 if (ret < 0) {
483 printk(KERN_ERR PFX "64b DMA mask configuration failed\n"); 483 printk(KERN_ERR PFX "64b DMA mask configuration failed\n");
484 goto bail2; 484 goto bail2;
485 } 485 }
486 ret = pci_set_consistent_dma_mask(pcidev, DMA_64BIT_MASK); 486 ret = pci_set_consistent_dma_mask(pcidev, DMA_BIT_MASK(64));
487 if (ret) { 487 if (ret) {
488 printk(KERN_ERR PFX "64b DMA consistent mask configuration failed\n"); 488 printk(KERN_ERR PFX "64b DMA consistent mask configuration failed\n");
489 goto bail2; 489 goto bail2;
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index ea3aafbbda44..98026016a935 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -1534,8 +1534,8 @@ mpt_mapresources(MPT_ADAPTER *ioc)
1534 1534
1535 pci_read_config_byte(pdev, PCI_CLASS_REVISION, &revision); 1535 pci_read_config_byte(pdev, PCI_CLASS_REVISION, &revision);
1536 1536
1537 if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK) 1537 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))
1538 && !pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK)) { 1538 && !pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64))) {
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));
diff --git a/drivers/message/i2o/memory.c b/drivers/message/i2o/memory.c
index f5cc95c564e2..9a08d8e45516 100644
--- a/drivers/message/i2o/memory.c
+++ b/drivers/message/i2o/memory.c
@@ -185,7 +185,7 @@ int i2o_dma_alloc(struct device *dev, struct i2o_dma *addr, size_t len)
185 int dma_64 = 0; 185 int dma_64 = 0;
186 186
187 mutex_lock(&mem_lock); 187 mutex_lock(&mem_lock);
188 if ((sizeof(dma_addr_t) > 4) && (pdev->dma_mask == DMA_64BIT_MASK)) { 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_32BIT_MASK)) {
191 mutex_unlock(&mem_lock); 191 mutex_unlock(&mem_lock);
@@ -196,7 +196,7 @@ int i2o_dma_alloc(struct device *dev, struct i2o_dma *addr, size_t len)
196 addr->virt = dma_alloc_coherent(dev, len, &addr->phys, GFP_KERNEL); 196 addr->virt = dma_alloc_coherent(dev, len, &addr->phys, GFP_KERNEL);
197 197
198 if ((sizeof(dma_addr_t) > 4) && dma_64) 198 if ((sizeof(dma_addr_t) > 4) && dma_64)
199 if (pci_set_dma_mask(pdev, DMA_64BIT_MASK)) 199 if (pci_set_dma_mask(pdev, DMA_BIT_MASK(64)))
200 printk(KERN_WARNING "i2o: unable to set 64-bit DMA"); 200 printk(KERN_WARNING "i2o: unable to set 64-bit DMA");
201 mutex_unlock(&mem_lock); 201 mutex_unlock(&mem_lock);
202 202
diff --git a/drivers/message/i2o/pci.c b/drivers/message/i2o/pci.c
index 25d6f2341983..ed17ac5af3e0 100644
--- a/drivers/message/i2o/pci.c
+++ b/drivers/message/i2o/pci.c
@@ -397,7 +397,7 @@ static int __devinit i2o_pci_probe(struct pci_dev *pdev,
397 } 397 }
398#ifdef CONFIG_I2O_EXT_ADAPTEC_DMA64 398#ifdef CONFIG_I2O_EXT_ADAPTEC_DMA64
399 if (sizeof(dma_addr_t) > 4) { 399 if (sizeof(dma_addr_t) > 4) {
400 if (pci_set_dma_mask(pdev, DMA_64BIT_MASK)) 400 if (pci_set_dma_mask(pdev, DMA_BIT_MASK(64)))
401 printk(KERN_INFO "%s: 64-bit DMA unavailable\n", 401 printk(KERN_INFO "%s: 64-bit DMA unavailable\n",
402 c->name); 402 c->name);
403 else { 403 else {
diff --git a/drivers/net/8139cp.c b/drivers/net/8139cp.c
index a09e3a7cac4f..d08475a7f676 100644
--- a/drivers/net/8139cp.c
+++ b/drivers/net/8139cp.c
@@ -1929,8 +1929,8 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
1929 1929
1930 /* Configure DMA attributes. */ 1930 /* Configure DMA attributes. */
1931 if ((sizeof(dma_addr_t) > 4) && 1931 if ((sizeof(dma_addr_t) > 4) &&
1932 !pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK) && 1932 !pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)) &&
1933 !pci_set_dma_mask(pdev, DMA_64BIT_MASK)) { 1933 !pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
1934 pci_using_dac = 1; 1934 pci_using_dac = 1;
1935 } else { 1935 } else {
1936 pci_using_dac = 0; 1936 pci_using_dac = 0;
diff --git a/drivers/net/acenic.c b/drivers/net/acenic.c
index 06a9f11669f3..9509c17b3667 100644
--- a/drivers/net/acenic.c
+++ b/drivers/net/acenic.c
@@ -1161,7 +1161,7 @@ static int __devinit ace_init(struct net_device *dev)
1161 /* 1161 /*
1162 * Configure DMA attributes. 1162 * Configure DMA attributes.
1163 */ 1163 */
1164 if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) { 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_32BIT_MASK)) {
1167 ap->pci_using_dac = 0; 1167 ap->pci_using_dac = 0;
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 17cbc8c6be37..aa75a4b96909 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -7527,7 +7527,7 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
7527 if (CHIP_NUM(bp) == CHIP_NUM_5708) 7527 if (CHIP_NUM(bp) == CHIP_NUM_5708)
7528 persist_dma_mask = dma_mask = DMA_40BIT_MASK; 7528 persist_dma_mask = dma_mask = DMA_40BIT_MASK;
7529 else 7529 else
7530 persist_dma_mask = dma_mask = DMA_64BIT_MASK; 7530 persist_dma_mask = dma_mask = DMA_BIT_MASK(64);
7531 7531
7532 /* Configure DMA attributes. */ 7532 /* Configure DMA attributes. */
7533 if (pci_set_dma_mask(pdev, dma_mask) == 0) { 7533 if (pci_set_dma_mask(pdev, dma_mask) == 0) {
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c
index 00a78e8677b0..03e01243b45e 100644
--- a/drivers/net/bnx2x_main.c
+++ b/drivers/net/bnx2x_main.c
@@ -10979,9 +10979,9 @@ static int __devinit bnx2x_init_dev(struct pci_dev *pdev,
10979 goto err_out_release; 10979 goto err_out_release;
10980 } 10980 }
10981 10981
10982 if (pci_set_dma_mask(pdev, DMA_64BIT_MASK) == 0) { 10982 if (pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) == 0) {
10983 bp->flags |= USING_DAC_FLAG; 10983 bp->flags |= USING_DAC_FLAG;
10984 if (pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK) != 0) { 10984 if (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)) != 0) {
10985 printk(KERN_ERR PFX "pci_set_consistent_dma_mask" 10985 printk(KERN_ERR PFX "pci_set_consistent_dma_mask"
10986 " failed, aborting\n"); 10986 " failed, aborting\n");
10987 rc = -EIO; 10987 rc = -EIO;
diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c
index 0effefa1b882..c2895240e467 100644
--- a/drivers/net/cassini.c
+++ b/drivers/net/cassini.c
@@ -5074,10 +5074,10 @@ static int __devinit cas_init_one(struct pci_dev *pdev,
5074 5074
5075 5075
5076 /* Configure DMA attributes. */ 5076 /* Configure DMA attributes. */
5077 if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) { 5077 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
5078 pci_using_dac = 1; 5078 pci_using_dac = 1;
5079 err = pci_set_consistent_dma_mask(pdev, 5079 err = pci_set_consistent_dma_mask(pdev,
5080 DMA_64BIT_MASK); 5080 DMA_BIT_MASK(64));
5081 if (err < 0) { 5081 if (err < 0) {
5082 dev_err(&pdev->dev, "Unable to obtain 64-bit DMA " 5082 dev_err(&pdev->dev, "Unable to obtain 64-bit DMA "
5083 "for consistent allocations\n"); 5083 "for consistent allocations\n");
diff --git a/drivers/net/chelsio/cxgb2.c b/drivers/net/chelsio/cxgb2.c
index 9b6011e7678e..57cfbc369f51 100644
--- a/drivers/net/chelsio/cxgb2.c
+++ b/drivers/net/chelsio/cxgb2.c
@@ -1056,10 +1056,10 @@ static int __devinit init_one(struct pci_dev *pdev,
1056 goto out_disable_pdev; 1056 goto out_disable_pdev;
1057 } 1057 }
1058 1058
1059 if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) { 1059 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
1060 pci_using_dac = 1; 1060 pci_using_dac = 1;
1061 1061
1062 if (pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK)) { 1062 if (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64))) {
1063 CH_ERR("%s: unable to obtain 64-bit DMA for " 1063 CH_ERR("%s: unable to obtain 64-bit DMA for "
1064 "consistent allocations\n", pci_name(pdev)); 1064 "consistent allocations\n", pci_name(pdev));
1065 err = -ENODEV; 1065 err = -ENODEV;
diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c
index 2c2aaa741450..ec35d3b82409 100644
--- a/drivers/net/cxgb3/cxgb3_main.c
+++ b/drivers/net/cxgb3/cxgb3_main.c
@@ -3038,9 +3038,9 @@ static int __devinit init_one(struct pci_dev *pdev,
3038 goto out_release_regions; 3038 goto out_release_regions;
3039 } 3039 }
3040 3040
3041 if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) { 3041 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
3042 pci_using_dac = 1; 3042 pci_using_dac = 1;
3043 err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK); 3043 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
3044 if (err) { 3044 if (err) {
3045 dev_err(&pdev->dev, "unable to obtain 64-bit DMA for " 3045 dev_err(&pdev->dev, "unable to obtain 64-bit DMA for "
3046 "coherent allocations\n"); 3046 "coherent allocations\n");
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index a65023d772cb..caa71dffb3d0 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -962,8 +962,8 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
962 if (err) 962 if (err)
963 return err; 963 return err;
964 964
965 if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK) && 965 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) &&
966 !pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK)) { 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_32BIT_MASK);
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index bfb2d6c85c54..4a61160052a3 100644
--- a/drivers/net/e1000e/netdev.c
+++ b/drivers/net/e1000e/netdev.c
@@ -4763,9 +4763,9 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
4763 return err; 4763 return err;
4764 4764
4765 pci_using_dac = 0; 4765 pci_using_dac = 0;
4766 err = pci_set_dma_mask(pdev, DMA_64BIT_MASK); 4766 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
4767 if (!err) { 4767 if (!err) {
4768 err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK); 4768 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
4769 if (!err) 4769 if (!err)
4770 pci_using_dac = 1; 4770 pci_using_dac = 1;
4771 } else { 4771 } else {
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index 03aa9593dd9e..82278beaac83 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -1154,9 +1154,9 @@ static int __devinit igb_probe(struct pci_dev *pdev,
1154 return err; 1154 return err;
1155 1155
1156 pci_using_dac = 0; 1156 pci_using_dac = 0;
1157 err = pci_set_dma_mask(pdev, DMA_64BIT_MASK); 1157 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
1158 if (!err) { 1158 if (!err) {
1159 err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK); 1159 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
1160 if (!err) 1160 if (!err)
1161 pci_using_dac = 1; 1161 pci_using_dac = 1;
1162 } else { 1162 } else {
diff --git a/drivers/net/ioc3-eth.c b/drivers/net/ioc3-eth.c
index 170b12d1d70e..43be0b01f12c 100644
--- a/drivers/net/ioc3-eth.c
+++ b/drivers/net/ioc3-eth.c
@@ -1226,10 +1226,10 @@ static int __devinit ioc3_probe(struct pci_dev *pdev,
1226 int err, pci_using_dac; 1226 int err, pci_using_dac;
1227 1227
1228 /* Configure DMA attributes. */ 1228 /* Configure DMA attributes. */
1229 err = pci_set_dma_mask(pdev, DMA_64BIT_MASK); 1229 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
1230 if (!err) { 1230 if (!err) {
1231 pci_using_dac = 1; 1231 pci_using_dac = 1;
1232 err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK); 1232 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
1233 if (err < 0) { 1233 if (err < 0) {
1234 printk(KERN_ERR "%s: Unable to obtain 64 bit DMA " 1234 printk(KERN_ERR "%s: Unable to obtain 64 bit DMA "
1235 "for consistent allocations\n", pci_name(pdev)); 1235 "for consistent allocations\n", pci_name(pdev));
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c
index 4b0ea66d7a44..0ac51758bc6c 100644
--- a/drivers/net/ixgb/ixgb_main.c
+++ b/drivers/net/ixgb/ixgb_main.c
@@ -365,8 +365,8 @@ ixgb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
365 if (err) 365 if (err)
366 return err; 366 return err;
367 367
368 if (!(err = pci_set_dma_mask(pdev, DMA_64BIT_MASK)) && 368 if (!(err = pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) &&
369 !(err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK))) { 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_32BIT_MASK)) ||
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 286ecc0e6ab7..126735ca6d7f 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -4509,8 +4509,8 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
4509 if (err) 4509 if (err)
4510 return err; 4510 return err;
4511 4511
4512 if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK) && 4512 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) &&
4513 !pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK)) { 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_32BIT_MASK);
diff --git a/drivers/net/mlx4/main.c b/drivers/net/mlx4/main.c
index a66f5b2fd288..fed53fbaf545 100644
--- a/drivers/net/mlx4/main.c
+++ b/drivers/net/mlx4/main.c
@@ -1076,7 +1076,7 @@ static int __mlx4_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
1076 1076
1077 pci_set_master(pdev); 1077 pci_set_master(pdev);
1078 1078
1079 err = pci_set_dma_mask(pdev, DMA_64BIT_MASK); 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_32BIT_MASK);
@@ -1085,7 +1085,7 @@ static int __mlx4_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
1085 goto err_release_bar2; 1085 goto err_release_bar2;
1086 } 1086 }
1087 } 1087 }
1088 err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK); 1088 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
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");
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c
index aea9fdaa3cd5..27655466dbeb 100644
--- a/drivers/net/myri10ge/myri10ge.c
+++ b/drivers/net/myri10ge/myri10ge.c
@@ -3792,7 +3792,7 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
3792 3792
3793 pci_set_master(pdev); 3793 pci_set_master(pdev);
3794 dac_enabled = 1; 3794 dac_enabled = 1;
3795 status = pci_set_dma_mask(pdev, DMA_64BIT_MASK); 3795 status = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
3796 if (status != 0) { 3796 if (status != 0) {
3797 dac_enabled = 0; 3797 dac_enabled = 0;
3798 dev_err(&pdev->dev, 3798 dev_err(&pdev->dev,
@@ -3804,7 +3804,7 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
3804 dev_err(&pdev->dev, "Error %d setting DMA mask\n", status); 3804 dev_err(&pdev->dev, "Error %d setting DMA mask\n", status);
3805 goto abort_with_enabled; 3805 goto abort_with_enabled;
3806 } 3806 }
3807 (void)pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK); 3807 (void)pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
3808 mgp->cmd = dma_alloc_coherent(&pdev->dev, sizeof(*mgp->cmd), 3808 mgp->cmd = dma_alloc_coherent(&pdev->dev, sizeof(*mgp->cmd),
3809 &mgp->cmd_bus, GFP_KERNEL); 3809 &mgp->cmd_bus, GFP_KERNEL);
3810 if (mgp->cmd == NULL) 3810 if (mgp->cmd == NULL)
diff --git a/drivers/net/ns83820.c b/drivers/net/ns83820.c
index 221b0c4c824a..e30ab06e7103 100644
--- a/drivers/net/ns83820.c
+++ b/drivers/net/ns83820.c
@@ -1973,7 +1973,7 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev,
1973 1973
1974 /* See if we can set the dma mask early on; failure is fatal. */ 1974 /* See if we can set the dma mask early on; failure is fatal. */
1975 if (sizeof(dma_addr_t) == 8 && 1975 if (sizeof(dma_addr_t) == 8 &&
1976 !pci_set_dma_mask(pci_dev, DMA_64BIT_MASK)) { 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_32BIT_MASK)) {
1979 using_dac = 0; 1979 using_dac = 0;
diff --git a/drivers/net/qla3xxx.c b/drivers/net/qla3xxx.c
index 8b2823c8dccf..aef047e4515a 100644
--- a/drivers/net/qla3xxx.c
+++ b/drivers/net/qla3xxx.c
@@ -3934,9 +3934,9 @@ static int __devinit ql3xxx_probe(struct pci_dev *pdev,
3934 3934
3935 pci_set_master(pdev); 3935 pci_set_master(pdev);
3936 3936
3937 if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) { 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_64BIT_MASK); 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_32BIT_MASK))) {
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_32BIT_MASK);
diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c
index 170d3540f9c9..0add30d38d62 100644
--- a/drivers/net/qlge/qlge_main.c
+++ b/drivers/net/qlge/qlge_main.c
@@ -3726,9 +3726,9 @@ static int __devinit ql_init_device(struct pci_dev *pdev,
3726 } 3726 }
3727 3727
3728 pci_set_master(pdev); 3728 pci_set_master(pdev);
3729 if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) { 3729 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
3730 set_bit(QL_DMA64, &qdev->flags); 3730 set_bit(QL_DMA64, &qdev->flags);
3731 err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK); 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_32BIT_MASK);
3734 if (!err) 3734 if (!err)
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index e1a638a05f86..fe676d38d342 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -2046,7 +2046,7 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
2046 tp->cp_cmd = PCIMulRW | RxChkSum; 2046 tp->cp_cmd = PCIMulRW | RxChkSum;
2047 2047
2048 if ((sizeof(dma_addr_t) > 4) && 2048 if ((sizeof(dma_addr_t) > 4) &&
2049 !pci_set_dma_mask(pdev, DMA_64BIT_MASK) && use_dac) { 2049 !pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) && use_dac) {
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 {
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index 16868b7a5d0a..7c8d5613a1da 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -7775,11 +7775,11 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre)
7775 return ret; 7775 return ret;
7776 } 7776 }
7777 7777
7778 if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) { 7778 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
7779 DBG_PRINT(INIT_DBG, "s2io_init_nic: Using 64bit DMA\n"); 7779 DBG_PRINT(INIT_DBG, "s2io_init_nic: Using 64bit DMA\n");
7780 dma_flag = TRUE; 7780 dma_flag = TRUE;
7781 if (pci_set_consistent_dma_mask 7781 if (pci_set_consistent_dma_mask
7782 (pdev, DMA_64BIT_MASK)) { 7782 (pdev, DMA_BIT_MASK(64))) {
7783 DBG_PRINT(ERR_DBG, 7783 DBG_PRINT(ERR_DBG,
7784 "Unable to obtain 64bit DMA for \ 7784 "Unable to obtain 64bit DMA for \
7785 consistent allocations\n"); 7785 consistent allocations\n");
diff --git a/drivers/net/skge.c b/drivers/net/skge.c
index 952d37ffee51..18a7b662aff1 100644
--- a/drivers/net/skge.c
+++ b/drivers/net/skge.c
@@ -3912,9 +3912,9 @@ static int __devinit skge_probe(struct pci_dev *pdev,
3912 3912
3913 pci_set_master(pdev); 3913 pci_set_master(pdev);
3914 3914
3915 if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) { 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_64BIT_MASK); 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_32BIT_MASK))) {
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_32BIT_MASK);
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index d01c56eb9627..da570f44b12b 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -4374,9 +4374,9 @@ static int __devinit sky2_probe(struct pci_dev *pdev,
4374 pci_set_master(pdev); 4374 pci_set_master(pdev);
4375 4375
4376 if (sizeof(dma_addr_t) > sizeof(u32) && 4376 if (sizeof(dma_addr_t) > sizeof(u32) &&
4377 !(err = pci_set_dma_mask(pdev, DMA_64BIT_MASK))) { 4377 !(err = pci_set_dma_mask(pdev, DMA_BIT_MASK(64)))) {
4378 using_dac = 1; 4378 using_dac = 1;
4379 err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK); 4379 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
4380 if (err < 0) { 4380 if (err < 0) {
4381 dev_err(&pdev->dev, "unable to obtain 64 bit DMA " 4381 dev_err(&pdev->dev, "unable to obtain 64 bit DMA "
4382 "for consistent allocations\n"); 4382 "for consistent allocations\n");
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c
index c024352c92fd..2312d10f3b54 100644
--- a/drivers/net/sungem.c
+++ b/drivers/net/sungem.c
@@ -3042,7 +3042,7 @@ static int __devinit gem_init_one(struct pci_dev *pdev,
3042 */ 3042 */
3043 if (pdev->vendor == PCI_VENDOR_ID_SUN && 3043 if (pdev->vendor == PCI_VENDOR_ID_SUN &&
3044 pdev->device == PCI_DEVICE_ID_SUN_GEM && 3044 pdev->device == PCI_DEVICE_ID_SUN_GEM &&
3045 !pci_set_dma_mask(pdev, DMA_64BIT_MASK)) { 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_32BIT_MASK);
diff --git a/drivers/net/tehuti.c b/drivers/net/tehuti.c
index 7debd1e4e1f7..d77a0918a325 100644
--- a/drivers/net/tehuti.c
+++ b/drivers/net/tehuti.c
@@ -1941,8 +1941,8 @@ bdx_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1941 if ((err = pci_enable_device(pdev))) /* it trigers interrupt, dunno why. */ 1941 if ((err = pci_enable_device(pdev))) /* it trigers interrupt, dunno why. */
1942 goto err_pci; /* it's not a problem though */ 1942 goto err_pci; /* it's not a problem though */
1943 1943
1944 if (!(err = pci_set_dma_mask(pdev, DMA_64BIT_MASK)) && 1944 if (!(err = pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) &&
1945 !(err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK))) { 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_32BIT_MASK)) ||
diff --git a/drivers/net/tehuti.h b/drivers/net/tehuti.h
index dec67e0a9ca2..121dda917fdc 100644
--- a/drivers/net/tehuti.h
+++ b/drivers/net/tehuti.h
@@ -31,6 +31,7 @@
31#include <linux/vmalloc.h> 31#include <linux/vmalloc.h>
32#include <linux/firmware.h> 32#include <linux/firmware.h>
33#include <asm/byteorder.h> 33#include <asm/byteorder.h>
34#include <linux/dma-mapping.h>
34 35
35/* Compile Time Switches */ 36/* Compile Time Switches */
36/* start */ 37/* start */
@@ -98,10 +99,6 @@
98#define READ_REG(pp, reg) readl(pp->pBdxRegs + reg) 99#define READ_REG(pp, reg) readl(pp->pBdxRegs + reg)
99#define WRITE_REG(pp, reg, val) writel(val, pp->pBdxRegs + reg) 100#define WRITE_REG(pp, reg, val) writel(val, pp->pBdxRegs + reg)
100 101
101#ifndef DMA_64BIT_MASK
102# define DMA_64BIT_MASK 0xffffffffffffffffULL
103#endif
104
105#ifndef DMA_32BIT_MASK 102#ifndef DMA_32BIT_MASK
106# define DMA_32BIT_MASK 0x00000000ffffffffULL 103# define DMA_32BIT_MASK 0x00000000ffffffffULL
107#endif 104#endif
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 437683aab32c..ec32e5f23548 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -13232,10 +13232,10 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
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_40BIT_MASK; 13233 persist_dma_mask = dma_mask = DMA_40BIT_MASK;
13234#ifdef CONFIG_HIGHMEM 13234#ifdef CONFIG_HIGHMEM
13235 dma_mask = DMA_64BIT_MASK; 13235 dma_mask = DMA_BIT_MASK(64);
13236#endif 13236#endif
13237 } else 13237 } else
13238 persist_dma_mask = dma_mask = DMA_64BIT_MASK; 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_32BIT_MASK) {
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 659654f45880..f3a2fce6166c 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -1180,7 +1180,7 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
1180#if 0 1180#if 0
1181// dma_supported() is deeply broken on almost all architectures 1181// dma_supported() is deeply broken on almost all architectures
1182 // possible with some EHCI controllers 1182 // possible with some EHCI controllers
1183 if (dma_supported (&udev->dev, DMA_64BIT_MASK)) 1183 if (dma_supported (&udev->dev, DMA_BIT_MASK(64)))
1184 net->features |= NETIF_F_HIGHDMA; 1184 net->features |= NETIF_F_HIGHDMA;
1185#endif 1185#endif
1186 1186
diff --git a/drivers/net/wireless/b43/dma.c b/drivers/net/wireless/b43/dma.c
index 0cc804d0a214..461d680d2cec 100644
--- a/drivers/net/wireless/b43/dma.c
+++ b/drivers/net/wireless/b43/dma.c
@@ -772,7 +772,7 @@ static u64 supported_dma_mask(struct b43_wldev *dev)
772 772
773 tmp = b43_read32(dev, SSB_TMSHIGH); 773 tmp = b43_read32(dev, SSB_TMSHIGH);
774 if (tmp & SSB_TMSHIGH_DMA64) 774 if (tmp & SSB_TMSHIGH_DMA64)
775 return DMA_64BIT_MASK; 775 return DMA_BIT_MASK(64);
776 mmio_base = b43_dmacontroller_base(0, 0); 776 mmio_base = b43_dmacontroller_base(0, 0);
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);
@@ -788,7 +788,7 @@ static enum b43_dmatype dma_mask_to_engine_type(u64 dmamask)
788 return B43_DMA_30BIT; 788 return B43_DMA_30BIT;
789 if (dmamask == DMA_32BIT_MASK) 789 if (dmamask == DMA_32BIT_MASK)
790 return B43_DMA_32BIT; 790 return B43_DMA_32BIT;
791 if (dmamask == DMA_64BIT_MASK) 791 if (dmamask == DMA_BIT_MASK(64))
792 return B43_DMA_64BIT; 792 return B43_DMA_64BIT;
793 B43_WARN_ON(1); 793 B43_WARN_ON(1);
794 return B43_DMA_30BIT; 794 return B43_DMA_30BIT;
@@ -999,7 +999,7 @@ static int b43_dma_set_mask(struct b43_wldev *dev, u64 mask)
999 err = ssb_dma_set_mask(dev->dev, mask); 999 err = ssb_dma_set_mask(dev->dev, mask);
1000 if (!err) 1000 if (!err)
1001 break; 1001 break;
1002 if (mask == DMA_64BIT_MASK) { 1002 if (mask == DMA_BIT_MASK(64)) {
1003 mask = DMA_32BIT_MASK; 1003 mask = DMA_32BIT_MASK;
1004 fallback = 1; 1004 fallback = 1;
1005 continue; 1005 continue;
diff --git a/drivers/net/wireless/b43legacy/dma.c b/drivers/net/wireless/b43legacy/dma.c
index 3649fc367098..61bb91266aa8 100644
--- a/drivers/net/wireless/b43legacy/dma.c
+++ b/drivers/net/wireless/b43legacy/dma.c
@@ -846,7 +846,7 @@ static u64 supported_dma_mask(struct b43legacy_wldev *dev)
846 846
847 tmp = b43legacy_read32(dev, SSB_TMSHIGH); 847 tmp = b43legacy_read32(dev, SSB_TMSHIGH);
848 if (tmp & SSB_TMSHIGH_DMA64) 848 if (tmp & SSB_TMSHIGH_DMA64)
849 return DMA_64BIT_MASK; 849 return DMA_BIT_MASK(64);
850 mmio_base = b43legacy_dmacontroller_base(0, 0); 850 mmio_base = b43legacy_dmacontroller_base(0, 0);
851 b43legacy_write32(dev, 851 b43legacy_write32(dev,
852 mmio_base + B43legacy_DMA32_TXCTL, 852 mmio_base + B43legacy_DMA32_TXCTL,
@@ -865,7 +865,7 @@ static enum b43legacy_dmatype dma_mask_to_engine_type(u64 dmamask)
865 return B43legacy_DMA_30BIT; 865 return B43legacy_DMA_30BIT;
866 if (dmamask == DMA_32BIT_MASK) 866 if (dmamask == DMA_32BIT_MASK)
867 return B43legacy_DMA_32BIT; 867 return B43legacy_DMA_32BIT;
868 if (dmamask == DMA_64BIT_MASK) 868 if (dmamask == DMA_BIT_MASK(64))
869 return B43legacy_DMA_64BIT; 869 return B43legacy_DMA_64BIT;
870 B43legacy_WARN_ON(1); 870 B43legacy_WARN_ON(1);
871 return B43legacy_DMA_30BIT; 871 return B43legacy_DMA_30BIT;
@@ -1042,7 +1042,7 @@ static int b43legacy_dma_set_mask(struct b43legacy_wldev *dev, u64 mask)
1042 err = ssb_dma_set_mask(dev->dev, mask); 1042 err = ssb_dma_set_mask(dev->dev, mask);
1043 if (!err) 1043 if (!err)
1044 break; 1044 break;
1045 if (mask == DMA_64BIT_MASK) { 1045 if (mask == DMA_BIT_MASK(64)) {
1046 mask = DMA_32BIT_MASK; 1046 mask = DMA_32BIT_MASK;
1047 fallback = 1; 1047 fallback = 1;
1048 continue; 1048 continue;
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c
index dcda5212f3bb..09dc98b84553 100644
--- a/drivers/pci/intel-iommu.c
+++ b/drivers/pci/intel-iommu.c
@@ -57,7 +57,7 @@
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_32BIT_MASK)
60#define DMA_64BIT_PFN IOVA_PFN(DMA_64BIT_MASK) 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 */
63static struct intel_iommu **g_iommus; 63static struct intel_iommu **g_iommus;
diff --git a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c
index a12783ebb42d..6697652740b8 100644
--- a/drivers/scsi/3w-9xxx.c
+++ b/drivers/scsi/3w-9xxx.c
@@ -2016,8 +2016,8 @@ static int __devinit twa_probe(struct pci_dev *pdev, const struct pci_device_id
2016 pci_set_master(pdev); 2016 pci_set_master(pdev);
2017 pci_try_set_mwi(pdev); 2017 pci_try_set_mwi(pdev);
2018 2018
2019 if (pci_set_dma_mask(pdev, DMA_64BIT_MASK) 2019 if (pci_set_dma_mask(pdev, DMA_BIT_MASK(64))
2020 || pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK)) 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_32BIT_MASK)
2022 || pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK)) { 2022 || pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK)) {
2023 TW_PRINTK(host, TW_DRIVER, 0x23, "Failed to set dma mask"); 2023 TW_PRINTK(host, TW_DRIVER, 0x23, "Failed to set dma mask");
diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c
index 21964aaebca5..e83ef8aaa98c 100644
--- a/drivers/scsi/aacraid/aachba.c
+++ b/drivers/scsi/aacraid/aachba.c
@@ -1402,8 +1402,8 @@ int aac_get_adapter_info(struct aac_dev* dev)
1402 } 1402 }
1403 1403
1404 if(dev->dac_support != 0) { 1404 if(dev->dac_support != 0) {
1405 if (!pci_set_dma_mask(dev->pdev, DMA_64BIT_MASK) && 1405 if (!pci_set_dma_mask(dev->pdev, DMA_BIT_MASK(64)) &&
1406 !pci_set_consistent_dma_mask(dev->pdev, DMA_64BIT_MASK)) { 1406 !pci_set_consistent_dma_mask(dev->pdev, DMA_BIT_MASK(64))) {
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);
diff --git a/drivers/scsi/aic7xxx/aic79xx_osm_pci.c b/drivers/scsi/aic7xxx/aic79xx_osm_pci.c
index 6593056867f6..032e2b120b32 100644
--- a/drivers/scsi/aic7xxx/aic79xx_osm_pci.c
+++ b/drivers/scsi/aic7xxx/aic79xx_osm_pci.c
@@ -195,7 +195,7 @@ ahd_linux_pci_dev_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
195 const u64 required_mask = dma_get_required_mask(dev); 195 const u64 required_mask = dma_get_required_mask(dev);
196 196
197 if (required_mask > DMA_39BIT_MASK && 197 if (required_mask > DMA_39BIT_MASK &&
198 dma_set_mask(dev, DMA_64BIT_MASK) == 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_32BIT_MASK &&
201 dma_set_mask(dev, DMA_39BIT_MASK) == 0) 201 dma_set_mask(dev, DMA_39BIT_MASK) == 0)
diff --git a/drivers/scsi/aic94xx/aic94xx_init.c b/drivers/scsi/aic94xx/aic94xx_init.c
index 2a730c470f62..7edbe4309c61 100644
--- a/drivers/scsi/aic94xx/aic94xx_init.c
+++ b/drivers/scsi/aic94xx/aic94xx_init.c
@@ -790,8 +790,8 @@ static int __devinit asd_pci_probe(struct pci_dev *dev,
790 goto Err_remove; 790 goto Err_remove;
791 791
792 err = -ENODEV; 792 err = -ENODEV;
793 if (!pci_set_dma_mask(dev, DMA_64BIT_MASK) 793 if (!pci_set_dma_mask(dev, DMA_BIT_MASK(64))
794 && !pci_set_consistent_dma_mask(dev, DMA_64BIT_MASK)) 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_32BIT_MASK)
797 && !pci_set_consistent_dma_mask(dev, DMA_32BIT_MASK)) 797 && !pci_set_consistent_dma_mask(dev, DMA_32BIT_MASK))
diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c
index 106c04d2d793..e95b72dd34b1 100644
--- a/drivers/scsi/arcmsr/arcmsr_hba.c
+++ b/drivers/scsi/arcmsr/arcmsr_hba.c
@@ -393,7 +393,7 @@ static int arcmsr_probe(struct pci_dev *pdev,
393 acb = (struct AdapterControlBlock *)host->hostdata; 393 acb = (struct AdapterControlBlock *)host->hostdata;
394 memset(acb, 0, sizeof (struct AdapterControlBlock)); 394 memset(acb, 0, sizeof (struct AdapterControlBlock));
395 395
396 error = pci_set_dma_mask(pdev, DMA_64BIT_MASK); 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_32BIT_MASK);
399 if (error) { 399 if (error) {
diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c
index 6194ed5d02c4..75a94e438fa5 100644
--- a/drivers/scsi/dpt_i2o.c
+++ b/drivers/scsi/dpt_i2o.c
@@ -1014,7 +1014,7 @@ static int adpt_install_hba(struct scsi_host_template* sht, struct pci_dev* pDev
1014 * See if we should enable dma64 mode. 1014 * See if we should enable dma64 mode.
1015 */ 1015 */
1016 if (sizeof(dma_addr_t) > 4 && 1016 if (sizeof(dma_addr_t) > 4 &&
1017 pci_set_dma_mask(pDev, DMA_64BIT_MASK) == 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_32BIT_MASK)
1019 dma64 = 1; 1019 dma64 = 1;
1020 } 1020 }
diff --git a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c
index fb247fdfa2bd..4982344f1f09 100644
--- a/drivers/scsi/gdth.c
+++ b/drivers/scsi/gdth.c
@@ -5030,7 +5030,7 @@ static int __devinit gdth_pci_probe_one(gdth_pci_str *pcistr,
5030 } 5030 }
5031 } else { 5031 } else {
5032 shp->max_cmd_len = 16; 5032 shp->max_cmd_len = 16;
5033 if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) { 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_32BIT_MASK)) {
5036 printk(KERN_WARNING "GDT-PCI %d: " 5036 printk(KERN_WARNING "GDT-PCI %d: "
diff --git a/drivers/scsi/hptiop.c b/drivers/scsi/hptiop.c
index af1f0af0c5ac..a13d78150cb5 100644
--- a/drivers/scsi/hptiop.c
+++ b/drivers/scsi/hptiop.c
@@ -958,7 +958,7 @@ static int __devinit hptiop_probe(struct pci_dev *pcidev,
958 pci_set_master(pcidev); 958 pci_set_master(pcidev);
959 959
960 /* Enable 64bit DMA if possible */ 960 /* Enable 64bit DMA if possible */
961 if (pci_set_dma_mask(pcidev, DMA_64BIT_MASK)) { 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_32BIT_MASK)) {
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;
diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c
index 457d76a4cfe5..45296a975f8b 100644
--- a/drivers/scsi/ips.c
+++ b/drivers/scsi/ips.c
@@ -7048,7 +7048,7 @@ ips_init_phase1(struct pci_dev *pci_dev, int *indexPtr)
7048 * are guaranteed to be < 4G. 7048 * are guaranteed to be < 4G.
7049 */ 7049 */
7050 if (IPS_ENABLE_DMA64 && IPS_HAS_ENH_SGLIST(ha) && 7050 if (IPS_ENABLE_DMA64 && IPS_HAS_ENH_SGLIST(ha) &&
7051 !pci_set_dma_mask(ha->pcidev, DMA_64BIT_MASK)) { 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_32BIT_MASK) != 0) {
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 6c867311cef1..c255b4d94b1b 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -2660,7 +2660,7 @@ lpfc_pci_probe_one(struct pci_dev *pdev, const struct pci_device_id *pid)
2660 pci_save_state(pdev); 2660 pci_save_state(pdev);
2661 pci_try_set_mwi(pdev); 2661 pci_try_set_mwi(pdev);
2662 2662
2663 if (pci_set_dma_mask(phba->pcidev, DMA_64BIT_MASK) != 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_32BIT_MASK) != 0)
2665 goto out_idr_remove; 2665 goto out_idr_remove;
2666 2666
diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c
index 9fdcd60c5493..112991d46d95 100644
--- a/drivers/scsi/megaraid.c
+++ b/drivers/scsi/megaraid.c
@@ -4793,7 +4793,7 @@ megaraid_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
4793 4793
4794 /* Set the Mode of addressing to 64 bit if we can */ 4794 /* Set the Mode of addressing to 64 bit if we can */
4795 if ((adapter->flag & BOARD_64BIT) && (sizeof(dma_addr_t) == 8)) { 4795 if ((adapter->flag & BOARD_64BIT) && (sizeof(dma_addr_t) == 8)) {
4796 pci_set_dma_mask(pdev, DMA_64BIT_MASK); 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_32BIT_MASK);
diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c
index 805bb61dde18..b2c19449119d 100644
--- a/drivers/scsi/megaraid/megaraid_mbox.c
+++ b/drivers/scsi/megaraid/megaraid_mbox.c
@@ -900,7 +900,7 @@ megaraid_init_mbox(adapter_t *adapter)
900 adapter->pdev->device == PCI_DEVICE_ID_PERC4_DI_EVERGLADES) || 900 adapter->pdev->device == PCI_DEVICE_ID_PERC4_DI_EVERGLADES) ||
901 (adapter->pdev->vendor == PCI_VENDOR_ID_DELL && 901 (adapter->pdev->vendor == PCI_VENDOR_ID_DELL &&
902 adapter->pdev->device == PCI_DEVICE_ID_PERC4E_DI_KOBUK)) { 902 adapter->pdev->device == PCI_DEVICE_ID_PERC4E_DI_KOBUK)) {
903 if (pci_set_dma_mask(adapter->pdev, DMA_64BIT_MASK)) { 903 if (pci_set_dma_mask(adapter->pdev, DMA_BIT_MASK(64))) {
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
diff --git a/drivers/scsi/megaraid/megaraid_sas.c b/drivers/scsi/megaraid/megaraid_sas.c
index 17ce7abe17ee..713de85771f3 100644
--- a/drivers/scsi/megaraid/megaraid_sas.c
+++ b/drivers/scsi/megaraid/megaraid_sas.c
@@ -2497,7 +2497,7 @@ megasas_set_dma_mask(struct pci_dev *pdev)
2497 * All our contollers are capable of performing 64-bit DMA 2497 * All our contollers are capable of performing 64-bit DMA
2498 */ 2498 */
2499 if (IS_DMA64) { 2499 if (IS_DMA64) {
2500 if (pci_set_dma_mask(pdev, DMA_64BIT_MASK) != 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_32BIT_MASK) != 0)
2503 goto fail_set_dma_mask; 2503 goto fail_set_dma_mask;
diff --git a/drivers/scsi/mvsas.c b/drivers/scsi/mvsas.c
index 23e5a876bb10..d8093a288438 100644
--- a/drivers/scsi/mvsas.c
+++ b/drivers/scsi/mvsas.c
@@ -875,8 +875,8 @@ static int pci_go_64(struct pci_dev *pdev)
875{ 875{
876 int rc; 876 int rc;
877 877
878 if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) { 878 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
879 rc = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK); 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_32BIT_MASK);
882 if (rc) { 882 if (rc) {
diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c
index 351b56ced925..18f7f98ba571 100644
--- a/drivers/scsi/qla1280.c
+++ b/drivers/scsi/qla1280.c
@@ -4275,7 +4275,7 @@ qla1280_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
4275 ha->devnum = devnum; /* specifies microcode load address */ 4275 ha->devnum = devnum; /* specifies microcode load address */
4276 4276
4277#ifdef QLA_64BIT_PTR 4277#ifdef QLA_64BIT_PTR
4278 if (pci_set_dma_mask(ha->pdev, DMA_64BIT_MASK)) { 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_32BIT_MASK)) {
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);
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index efe29924e058..f60e136b5e1b 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -1176,10 +1176,10 @@ qla2x00_config_dma_addressing(struct qla_hw_data *ha)
1176 /* Assume a 32bit DMA mask. */ 1176 /* Assume a 32bit DMA mask. */
1177 ha->flags.enable_64bit_addressing = 0; 1177 ha->flags.enable_64bit_addressing = 0;
1178 1178
1179 if (!dma_set_mask(&ha->pdev->dev, DMA_64BIT_MASK)) { 1179 if (!dma_set_mask(&ha->pdev->dev, DMA_BIT_MASK(64))) {
1180 /* Any upper-dword bits set? */ 1180 /* Any upper-dword bits set? */
1181 if (MSD(dma_get_required_mask(&ha->pdev->dev)) && 1181 if (MSD(dma_get_required_mask(&ha->pdev->dev)) &&
1182 !pci_set_consistent_dma_mask(ha->pdev, DMA_64BIT_MASK)) { 1182 !pci_set_consistent_dma_mask(ha->pdev, DMA_BIT_MASK(64))) {
1183 /* Ok, a 64bit DMA mask is applicable. */ 1183 /* Ok, a 64bit DMA mask is applicable. */
1184 ha->flags.enable_64bit_addressing = 1; 1184 ha->flags.enable_64bit_addressing = 1;
1185 ha->isp_ops->calc_req_entries = qla2x00_calc_iocbs_64; 1185 ha->isp_ops->calc_req_entries = qla2x00_calc_iocbs_64;
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index eb3a414b189a..d427fab7a183 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -1369,8 +1369,8 @@ static void qla4xxx_config_dma_addressing(struct scsi_qla_host *ha)
1369 int retval; 1369 int retval;
1370 1370
1371 /* Update our PCI device dma_mask for full 64 bit mask */ 1371 /* Update our PCI device dma_mask for full 64 bit mask */
1372 if (pci_set_dma_mask(ha->pdev, DMA_64BIT_MASK) == 0) { 1372 if (pci_set_dma_mask(ha->pdev, DMA_BIT_MASK(64)) == 0) {
1373 if (pci_set_consistent_dma_mask(ha->pdev, DMA_64BIT_MASK)) { 1373 if (pci_set_consistent_dma_mask(ha->pdev, DMA_BIT_MASK(64))) {
1374 dev_dbg(&ha->pdev->dev, 1374 dev_dbg(&ha->pdev->dev,
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");
diff --git a/drivers/scsi/stex.c b/drivers/scsi/stex.c
index df7f96caa1ca..7cb8063c4355 100644
--- a/drivers/scsi/stex.c
+++ b/drivers/scsi/stex.c
@@ -1395,8 +1395,8 @@ static int stex_set_dma_mask(struct pci_dev * pdev)
1395{ 1395{
1396 int ret; 1396 int ret;
1397 1397
1398 if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK) 1398 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))
1399 && !pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK)) 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_32BIT_MASK);
1402 if (!ret) 1402 if (!ret)
diff --git a/drivers/scsi/sym53c8xx_2/sym_hipd.h b/drivers/scsi/sym53c8xx_2/sym_hipd.h
index 1588c90518d4..76f6295ee881 100644
--- a/drivers/scsi/sym53c8xx_2/sym_hipd.h
+++ b/drivers/scsi/sym53c8xx_2/sym_hipd.h
@@ -1094,7 +1094,7 @@ do { \
1094 (data)->size = cpu_to_scr((((badd) >> 8) & 0xff000000) + len); \ 1094 (data)->size = cpu_to_scr((((badd) >> 8) & 0xff000000) + len); \
1095} while (0) 1095} while (0)
1096#elif SYM_CONF_DMA_ADDRESSING_MODE == 2 1096#elif SYM_CONF_DMA_ADDRESSING_MODE == 2
1097#define DMA_DAC_MASK DMA_64BIT_MASK 1097#define DMA_DAC_MASK DMA_BIT_MASK(64)
1098int sym_lookup_dmap(struct sym_hcb *np, u32 h, int s); 1098int sym_lookup_dmap(struct sym_hcb *np, u32 h, int s);
1099static inline void 1099static inline void
1100sym_build_sge(struct sym_hcb *np, struct sym_tblmove *data, u64 badd, int len) 1100sym_build_sge(struct sym_hcb *np, struct sym_tblmove *data, u64 badd, int len)
diff --git a/drivers/sn/ioc3.c b/drivers/sn/ioc3.c
index a0aa33dde0a4..816d4c592a3c 100644
--- a/drivers/sn/ioc3.c
+++ b/drivers/sn/ioc3.c
@@ -617,9 +617,9 @@ static int ioc3_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id)
617 pci_set_master(pdev); 617 pci_set_master(pdev);
618 618
619#ifdef USE_64BIT_DMA 619#ifdef USE_64BIT_DMA
620 ret = pci_set_dma_mask(pdev, DMA_64BIT_MASK); 620 ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
621 if (!ret) { 621 if (!ret) {
622 ret = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK); 622 ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
623 if (ret < 0) { 623 if (ret < 0) {
624 printk(KERN_WARNING "%s: Unable to obtain 64 bit DMA " 624 printk(KERN_WARNING "%s: Unable to obtain 64 bit DMA "
625 "for consistent allocations\n", 625 "for consistent allocations\n",
diff --git a/drivers/staging/altpciechdma/altpciechdma.c b/drivers/staging/altpciechdma/altpciechdma.c
index 3e41e0861481..6a4d0b8e0960 100644
--- a/drivers/staging/altpciechdma/altpciechdma.c
+++ b/drivers/staging/altpciechdma/altpciechdma.c
@@ -849,8 +849,8 @@ static int __devinit probe(struct pci_dev *dev, const struct pci_device_id *id)
849#if 1 /* @todo For now, disable 64-bit, because I do not understand the implications (DAC!) */ 849#if 1 /* @todo For now, disable 64-bit, because I do not understand the implications (DAC!) */
850 /* query for DMA transfer */ 850 /* query for DMA transfer */
851 /* @see Documentation/PCI/PCI-DMA-mapping.txt */ 851 /* @see Documentation/PCI/PCI-DMA-mapping.txt */
852 if (!pci_set_dma_mask(dev, DMA_64BIT_MASK)) { 852 if (!pci_set_dma_mask(dev, DMA_BIT_MASK(64))) {
853 pci_set_consistent_dma_mask(dev, DMA_64BIT_MASK); 853 pci_set_consistent_dma_mask(dev, DMA_BIT_MASK(64));
854 /* use 64-bit DMA */ 854 /* use 64-bit DMA */
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
diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c
index 953684f729da..948156348478 100644
--- a/drivers/staging/slicoss/slicoss.c
+++ b/drivers/staging/slicoss/slicoss.c
@@ -371,9 +371,9 @@ static int __devinit slic_entry_probe(struct pci_dev *pcidev,
371 printk(KERN_DEBUG "%s\n", slic_proc_version); 371 printk(KERN_DEBUG "%s\n", slic_proc_version);
372 } 372 }
373 373
374 err = pci_set_dma_mask(pcidev, DMA_64BIT_MASK); 374 err = pci_set_dma_mask(pcidev, DMA_BIT_MASK(64));
375 if (err) { 375 if (err) {
376 err = pci_set_dma_mask(pcidev, DMA_32BIT_MASK); 376 err = pci_set_dma_mask(pcidev, DMA_BIT_MASK(32));
377 if (err) 377 if (err)
378 goto err_out_disable_pci; 378 goto err_out_disable_pci;
379 } 379 }
diff --git a/drivers/staging/sxg/sxg.c b/drivers/staging/sxg/sxg.c
index 0050a022010f..a77e1eee5693 100644
--- a/drivers/staging/sxg/sxg.c
+++ b/drivers/staging/sxg/sxg.c
@@ -934,8 +934,8 @@ static int sxg_entry_probe(struct pci_dev *pcidev,
934 934
935 pci_read_config_byte(pcidev, PCI_REVISION_ID, &revision_id); 935 pci_read_config_byte(pcidev, PCI_REVISION_ID, &revision_id);
936 936
937 if (!(err = pci_set_dma_mask(pcidev, DMA_64BIT_MASK))) { 937 if (!(err = pci_set_dma_mask(pcidev, DMA_BIT_MASK(64)))) {
938 DBG_ERROR("pci_set_dma_mask(DMA_64BIT_MASK) 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_32BIT_MASK))) {
941 DBG_ERROR 941 DBG_ERROR
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index f2618d17710d..c637207a1c80 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -622,7 +622,7 @@ static int ehci_run (struct usb_hcd *hcd)
622 ehci_writel(ehci, 0, &ehci->regs->segment); 622 ehci_writel(ehci, 0, &ehci->regs->segment);
623#if 0 623#if 0
624// this is deeply broken on almost all architectures 624// this is deeply broken on almost all architectures
625 if (!dma_set_mask(hcd->self.controller, DMA_64BIT_MASK)) 625 if (!dma_set_mask(hcd->self.controller, DMA_BIT_MASK(64)))
626 ehci_info(ehci, "enabled 64bit DMA\n"); 626 ehci_info(ehci, "enabled 64bit DMA\n");
627#endif 627#endif
628 } 628 }
diff --git a/drivers/uwb/whci.c b/drivers/uwb/whci.c
index 1f8964ed9882..79bb06c7a76b 100644
--- a/drivers/uwb/whci.c
+++ b/drivers/uwb/whci.c
@@ -160,8 +160,8 @@ static int whci_probe(struct pci_dev *pci, const struct pci_device_id *id)
160 pci_enable_msi(pci); 160 pci_enable_msi(pci);
161 pci_set_master(pci); 161 pci_set_master(pci);
162 err = -ENXIO; 162 err = -ENXIO;
163 if (!pci_set_dma_mask(pci, DMA_64BIT_MASK)) 163 if (!pci_set_dma_mask(pci, DMA_BIT_MASK(64)))
164 pci_set_consistent_dma_mask(pci, DMA_64BIT_MASK); 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_32BIT_MASK))
166 pci_set_consistent_dma_mask(pci, DMA_32BIT_MASK); 166 pci_set_consistent_dma_mask(pci, DMA_32BIT_MASK);
167 else 167 else