aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYang Hongyang <yanghy@cn.fujitsu.com>2009-04-13 17:40:14 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-13 18:04:33 -0400
commite930438c42e744ef1f8bfdbb338253c9f384df42 (patch)
tree9fd71b732916dc8ccbf985461b4cd1bfd00137a6
parent316cb4ef3eb2ad6e35e15cc56d39c6cda58c093a (diff)
Replace all DMA_nBIT_MASK macro with DMA_BIT_MASK(n)
This is the second go through of the old DMA_nBIT_MASK macro,and there're not so many of them left,so I put them into one patch.I hope this is the last round. After this the definition of the old DMA_nBIT_MASK macro could be removed. Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com> Cc: Russell King <rmk@arm.linux.org.uk> Cc: Tony Lindgren <tony@atomide.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Cc: Greg KH <greg@kroah.com> Cc: Takashi Iwai <tiwai@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--arch/arm/mach-omap2/usb-musb.c8
-rw-r--r--arch/ia64/kernel/pci-swiotlb.c2
-rw-r--r--drivers/atm/solos-pci.c2
-rw-r--r--drivers/block/cciss.c2
-rw-r--r--drivers/net/atl1c/atl1c_main.c4
-rw-r--r--drivers/net/benet/be_main.c4
-rw-r--r--drivers/net/jme.c8
-rw-r--r--drivers/net/wireless/ath9k/pci.c4
-rw-r--r--drivers/net/wireless/p54/p54pci.c4
-rw-r--r--drivers/scsi/3w-9xxx.c8
-rw-r--r--drivers/scsi/aacraid/aachba.c2
-rw-r--r--drivers/scsi/mpt2sas/mpt2sas_base.c10
-rw-r--r--drivers/staging/b3dfg/b3dfg.c2
-rw-r--r--drivers/usb/otg/nop-usb-xceiv.c4
-rw-r--r--sound/pci/hda/hda_intel.c8
15 files changed, 36 insertions, 36 deletions
diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c
index fc74e913c41..34a56a136ef 100644
--- a/arch/arm/mach-omap2/usb-musb.c
+++ b/arch/arm/mach-omap2/usb-musb.c
@@ -131,14 +131,14 @@ static struct musb_hdrc_platform_data musb_plat = {
131 .power = 50, /* up to 100 mA */ 131 .power = 50, /* up to 100 mA */
132}; 132};
133 133
134static u64 musb_dmamask = DMA_32BIT_MASK; 134static u64 musb_dmamask = DMA_BIT_MASK(32);
135 135
136static struct platform_device musb_device = { 136static struct platform_device musb_device = {
137 .name = "musb_hdrc", 137 .name = "musb_hdrc",
138 .id = -1, 138 .id = -1,
139 .dev = { 139 .dev = {
140 .dma_mask = &musb_dmamask, 140 .dma_mask = &musb_dmamask,
141 .coherent_dma_mask = DMA_32BIT_MASK, 141 .coherent_dma_mask = DMA_BIT_MASK(32),
142 .platform_data = &musb_plat, 142 .platform_data = &musb_plat,
143 }, 143 },
144 .num_resources = ARRAY_SIZE(musb_resources), 144 .num_resources = ARRAY_SIZE(musb_resources),
@@ -146,14 +146,14 @@ static struct platform_device musb_device = {
146}; 146};
147 147
148#ifdef CONFIG_NOP_USB_XCEIV 148#ifdef CONFIG_NOP_USB_XCEIV
149static u64 nop_xceiv_dmamask = DMA_32BIT_MASK; 149static u64 nop_xceiv_dmamask = DMA_BIT_MASK(32);
150 150
151static struct platform_device nop_xceiv_device = { 151static struct platform_device nop_xceiv_device = {
152 .name = "nop_usb_xceiv", 152 .name = "nop_usb_xceiv",
153 .id = -1, 153 .id = -1,
154 .dev = { 154 .dev = {
155 .dma_mask = &nop_xceiv_dmamask, 155 .dma_mask = &nop_xceiv_dmamask,
156 .coherent_dma_mask = DMA_32BIT_MASK, 156 .coherent_dma_mask = DMA_BIT_MASK(32),
157 .platform_data = NULL, 157 .platform_data = NULL,
158 }, 158 },
159}; 159};
diff --git a/arch/ia64/kernel/pci-swiotlb.c b/arch/ia64/kernel/pci-swiotlb.c
index 573f02c39a0..285aae8431c 100644
--- a/arch/ia64/kernel/pci-swiotlb.c
+++ b/arch/ia64/kernel/pci-swiotlb.c
@@ -16,7 +16,7 @@ EXPORT_SYMBOL(swiotlb);
16static void *ia64_swiotlb_alloc_coherent(struct device *dev, size_t size, 16static void *ia64_swiotlb_alloc_coherent(struct device *dev, size_t size,
17 dma_addr_t *dma_handle, gfp_t gfp) 17 dma_addr_t *dma_handle, gfp_t gfp)
18{ 18{
19 if (dev->coherent_dma_mask != DMA_64BIT_MASK) 19 if (dev->coherent_dma_mask != DMA_BIT_MASK(64))
20 gfp |= GFP_DMA; 20 gfp |= GFP_DMA;
21 return swiotlb_alloc_coherent(dev, size, dma_handle, gfp); 21 return swiotlb_alloc_coherent(dev, size, dma_handle, gfp);
22} 22}
diff --git a/drivers/atm/solos-pci.c b/drivers/atm/solos-pci.c
index be204308cc1..9359613addc 100644
--- a/drivers/atm/solos-pci.c
+++ b/drivers/atm/solos-pci.c
@@ -1059,7 +1059,7 @@ static int fpga_probe(struct pci_dev *dev, const struct pci_device_id *id)
1059 goto out; 1059 goto out;
1060 } 1060 }
1061 1061
1062 err = pci_set_dma_mask(dev, DMA_32BIT_MASK); 1062 err = pci_set_dma_mask(dev, DMA_BIT_MASK(32));
1063 if (err) { 1063 if (err) {
1064 dev_warn(&dev->dev, "Failed to set 32-bit DMA mask\n"); 1064 dev_warn(&dev->dev, "Failed to set 32-bit DMA mask\n");
1065 goto out; 1065 goto out;
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index 0ef6f08aa6e..4d4d5e0d3fa 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -3505,7 +3505,7 @@ static __devinit int cciss_message(struct pci_dev *pdev, unsigned char opcode, u
3505 /* The Inbound Post Queue only accepts 32-bit physical addresses for the 3505 /* The Inbound Post Queue only accepts 32-bit physical addresses for the
3506 CCISS commands, so they must be allocated from the lower 4GiB of 3506 CCISS commands, so they must be allocated from the lower 4GiB of
3507 memory. */ 3507 memory. */
3508 err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); 3508 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
3509 if (err) { 3509 if (err) {
3510 iounmap(vaddr); 3510 iounmap(vaddr);
3511 return -ENOMEM; 3511 return -ENOMEM;
diff --git a/drivers/net/atl1c/atl1c_main.c b/drivers/net/atl1c/atl1c_main.c
index deb7b53167e..83a12125b94 100644
--- a/drivers/net/atl1c/atl1c_main.c
+++ b/drivers/net/atl1c/atl1c_main.c
@@ -2532,8 +2532,8 @@ static int __devinit atl1c_probe(struct pci_dev *pdev,
2532 * various kernel subsystems to support the mechanics required by a 2532 * various kernel subsystems to support the mechanics required by a
2533 * fixed-high-32-bit system. 2533 * fixed-high-32-bit system.
2534 */ 2534 */
2535 if ((pci_set_dma_mask(pdev, DMA_32BIT_MASK) != 0) || 2535 if ((pci_set_dma_mask(pdev, DMA_BIT_MASK(32)) != 0) ||
2536 (pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK) != 0)) { 2536 (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)) != 0)) {
2537 dev_err(&pdev->dev, "No usable DMA configuration,aborting\n"); 2537 dev_err(&pdev->dev, "No usable DMA configuration,aborting\n");
2538 goto err_dma; 2538 goto err_dma;
2539 } 2539 }
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index 9b75aa63006..30d0c81c989 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -1821,11 +1821,11 @@ static int __devinit be_probe(struct pci_dev *pdev,
1821 1821
1822 be_msix_enable(adapter); 1822 be_msix_enable(adapter);
1823 1823
1824 status = pci_set_dma_mask(pdev, DMA_64BIT_MASK); 1824 status = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
1825 if (!status) { 1825 if (!status) {
1826 netdev->features |= NETIF_F_HIGHDMA; 1826 netdev->features |= NETIF_F_HIGHDMA;
1827 } else { 1827 } else {
1828 status = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 1828 status = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
1829 if (status) { 1829 if (status) {
1830 dev_err(&pdev->dev, "Could not set PCI DMA Mask\n"); 1830 dev_err(&pdev->dev, "Could not set PCI DMA Mask\n");
1831 goto free_netdev; 1831 goto free_netdev;
diff --git a/drivers/net/jme.c b/drivers/net/jme.c
index ece35040288..621a7c0c46b 100644
--- a/drivers/net/jme.c
+++ b/drivers/net/jme.c
@@ -2591,13 +2591,13 @@ static int
2591jme_pci_dma64(struct pci_dev *pdev) 2591jme_pci_dma64(struct pci_dev *pdev)
2592{ 2592{
2593 if (pdev->device == PCI_DEVICE_ID_JMICRON_JMC250 && 2593 if (pdev->device == PCI_DEVICE_ID_JMICRON_JMC250 &&
2594 !pci_set_dma_mask(pdev, DMA_64BIT_MASK)) 2594 !pci_set_dma_mask(pdev, DMA_BIT_MASK(64)))
2595 if (!pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK)) 2595 if (!pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)))
2596 return 1; 2596 return 1;
2597 2597
2598 if (pdev->device == PCI_DEVICE_ID_JMICRON_JMC250 && 2598 if (pdev->device == PCI_DEVICE_ID_JMICRON_JMC250 &&
2599 !pci_set_dma_mask(pdev, DMA_40BIT_MASK)) 2599 !pci_set_dma_mask(pdev, DMA_BIT_MASK(40)))
2600 if (!pci_set_consistent_dma_mask(pdev, DMA_40BIT_MASK)) 2600 if (!pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(40)))
2601 return 1; 2601 return 1;
2602 2602
2603 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) 2603 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(32)))
diff --git a/drivers/net/wireless/ath9k/pci.c b/drivers/net/wireless/ath9k/pci.c
index 6dbc58580ab..168411d322a 100644
--- a/drivers/net/wireless/ath9k/pci.c
+++ b/drivers/net/wireless/ath9k/pci.c
@@ -93,14 +93,14 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
93 if (pci_enable_device(pdev)) 93 if (pci_enable_device(pdev))
94 return -EIO; 94 return -EIO;
95 95
96 ret = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 96 ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
97 97
98 if (ret) { 98 if (ret) {
99 printk(KERN_ERR "ath9k: 32-bit DMA not available\n"); 99 printk(KERN_ERR "ath9k: 32-bit DMA not available\n");
100 goto bad; 100 goto bad;
101 } 101 }
102 102
103 ret = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); 103 ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
104 104
105 if (ret) { 105 if (ret) {
106 printk(KERN_ERR "ath9k: 32-bit DMA consistent " 106 printk(KERN_ERR "ath9k: 32-bit DMA consistent "
diff --git a/drivers/net/wireless/p54/p54pci.c b/drivers/net/wireless/p54/p54pci.c
index e3569a0a952..b1610ea4bb3 100644
--- a/drivers/net/wireless/p54/p54pci.c
+++ b/drivers/net/wireless/p54/p54pci.c
@@ -492,8 +492,8 @@ static int __devinit p54p_probe(struct pci_dev *pdev,
492 goto err_disable_dev; 492 goto err_disable_dev;
493 } 493 }
494 494
495 if (pci_set_dma_mask(pdev, DMA_32BIT_MASK) || 495 if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32)) ||
496 pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK)) { 496 pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32))) {
497 dev_err(&pdev->dev, "No suitable DMA available\n"); 497 dev_err(&pdev->dev, "No suitable DMA available\n");
498 goto err_free_reg; 498 goto err_free_reg;
499 } 499 }
diff --git a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c
index fdb14ec4fd4..8b7983aba8f 100644
--- a/drivers/scsi/3w-9xxx.c
+++ b/drivers/scsi/3w-9xxx.c
@@ -2234,10 +2234,10 @@ static int twa_resume(struct pci_dev *pdev)
2234 pci_set_master(pdev); 2234 pci_set_master(pdev);
2235 pci_try_set_mwi(pdev); 2235 pci_try_set_mwi(pdev);
2236 2236
2237 if (pci_set_dma_mask(pdev, DMA_64BIT_MASK) 2237 if (pci_set_dma_mask(pdev, DMA_BIT_MASK(64))
2238 || pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK)) 2238 || pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)))
2239 if (pci_set_dma_mask(pdev, DMA_32BIT_MASK) 2239 if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))
2240 || pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK)) { 2240 || pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32))) {
2241 TW_PRINTK(host, TW_DRIVER, 0x40, "Failed to set dma mask during resume"); 2241 TW_PRINTK(host, TW_DRIVER, 0x40, "Failed to set dma mask during resume");
2242 retval = -ENODEV; 2242 retval = -ENODEV;
2243 goto out_disable_device; 2243 goto out_disable_device;
diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c
index 280261c451d..2a889853a10 100644
--- a/drivers/scsi/aacraid/aachba.c
+++ b/drivers/scsi/aacraid/aachba.c
@@ -1378,7 +1378,7 @@ int aac_get_adapter_info(struct aac_dev* dev)
1378 if (dev->nondasd_support && !dev->in_reset) 1378 if (dev->nondasd_support && !dev->in_reset)
1379 printk(KERN_INFO "%s%d: Non-DASD support enabled.\n",dev->name, dev->id); 1379 printk(KERN_INFO "%s%d: Non-DASD support enabled.\n",dev->name, dev->id);
1380 1380
1381 if (dma_get_required_mask(&dev->pdev->dev) > DMA_32BIT_MASK) 1381 if (dma_get_required_mask(&dev->pdev->dev) > DMA_BIT_MASK(32))
1382 dev->needs_dac = 1; 1382 dev->needs_dac = 1;
1383 dev->dac_support = 0; 1383 dev->dac_support = 0;
1384 if ((sizeof(dma_addr_t) > 4) && dev->needs_dac && 1384 if ((sizeof(dma_addr_t) > 4) && dev->needs_dac &&
diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c
index 52427a8324f..a91f5143cea 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_base.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_base.c
@@ -855,9 +855,9 @@ _base_config_dma_addressing(struct MPT2SAS_ADAPTER *ioc, struct pci_dev *pdev)
855 if (sizeof(dma_addr_t) > 4) { 855 if (sizeof(dma_addr_t) > 4) {
856 const uint64_t required_mask = 856 const uint64_t required_mask =
857 dma_get_required_mask(&pdev->dev); 857 dma_get_required_mask(&pdev->dev);
858 if ((required_mask > DMA_32BIT_MASK) && !pci_set_dma_mask(pdev, 858 if ((required_mask > DMA_BIT_MASK(32)) && !pci_set_dma_mask(pdev,
859 DMA_64BIT_MASK) && !pci_set_consistent_dma_mask(pdev, 859 DMA_BIT_MASK(64)) && !pci_set_consistent_dma_mask(pdev,
860 DMA_64BIT_MASK)) { 860 DMA_BIT_MASK(64))) {
861 ioc->base_add_sg_single = &_base_add_sg_single_64; 861 ioc->base_add_sg_single = &_base_add_sg_single_64;
862 ioc->sge_size = sizeof(Mpi2SGESimple64_t); 862 ioc->sge_size = sizeof(Mpi2SGESimple64_t);
863 desc = "64"; 863 desc = "64";
@@ -865,8 +865,8 @@ _base_config_dma_addressing(struct MPT2SAS_ADAPTER *ioc, struct pci_dev *pdev)
865 } 865 }
866 } 866 }
867 867
868 if (!pci_set_dma_mask(pdev, DMA_32BIT_MASK) 868 if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(32))
869 && !pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK)) { 869 && !pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32))) {
870 ioc->base_add_sg_single = &_base_add_sg_single_32; 870 ioc->base_add_sg_single = &_base_add_sg_single_32;
871 ioc->sge_size = sizeof(Mpi2SGESimple32_t); 871 ioc->sge_size = sizeof(Mpi2SGESimple32_t);
872 desc = "32"; 872 desc = "32";
diff --git a/drivers/staging/b3dfg/b3dfg.c b/drivers/staging/b3dfg/b3dfg.c
index 0348072b3ab..75ebe338c6f 100644
--- a/drivers/staging/b3dfg/b3dfg.c
+++ b/drivers/staging/b3dfg/b3dfg.c
@@ -1000,7 +1000,7 @@ static int __devinit b3dfg_probe(struct pci_dev *pdev,
1000 1000
1001 pci_set_master(pdev); 1001 pci_set_master(pdev);
1002 1002
1003 r = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 1003 r = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
1004 if (r) { 1004 if (r) {
1005 dev_err(&pdev->dev, "no usable DMA configuration\n"); 1005 dev_err(&pdev->dev, "no usable DMA configuration\n");
1006 goto err_free_res; 1006 goto err_free_res;
diff --git a/drivers/usb/otg/nop-usb-xceiv.c b/drivers/usb/otg/nop-usb-xceiv.c
index 4b933f646f2..c567168f89a 100644
--- a/drivers/usb/otg/nop-usb-xceiv.c
+++ b/drivers/usb/otg/nop-usb-xceiv.c
@@ -36,14 +36,14 @@ struct nop_usb_xceiv {
36 struct device *dev; 36 struct device *dev;
37}; 37};
38 38
39static u64 nop_xceiv_dmamask = DMA_32BIT_MASK; 39static u64 nop_xceiv_dmamask = DMA_BIT_MASK(32);
40 40
41static struct platform_device nop_xceiv_device = { 41static struct platform_device nop_xceiv_device = {
42 .name = "nop_usb_xceiv", 42 .name = "nop_usb_xceiv",
43 .id = -1, 43 .id = -1,
44 .dev = { 44 .dev = {
45 .dma_mask = &nop_xceiv_dmamask, 45 .dma_mask = &nop_xceiv_dmamask,
46 .coherent_dma_mask = DMA_32BIT_MASK, 46 .coherent_dma_mask = DMA_BIT_MASK(32),
47 .platform_data = NULL, 47 .platform_data = NULL,
48 }, 48 },
49}; 49};
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 30829ee920c..7ba8db5d4c4 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -2260,11 +2260,11 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci,
2260 gcap &= ~0x01; 2260 gcap &= ~0x01;
2261 2261
2262 /* allow 64bit DMA address if supported by H/W */ 2262 /* allow 64bit DMA address if supported by H/W */
2263 if ((gcap & 0x01) && !pci_set_dma_mask(pci, DMA_64BIT_MASK)) 2263 if ((gcap & 0x01) && !pci_set_dma_mask(pci, DMA_BIT_MASK(64)))
2264 pci_set_consistent_dma_mask(pci, DMA_64BIT_MASK); 2264 pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(64));
2265 else { 2265 else {
2266 pci_set_dma_mask(pci, DMA_32BIT_MASK); 2266 pci_set_dma_mask(pci, DMA_BIT_MASK(32));
2267 pci_set_consistent_dma_mask(pci, DMA_32BIT_MASK); 2267 pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(32));
2268 } 2268 }
2269 2269
2270 /* read number of streams from GCAP register instead of using 2270 /* read number of streams from GCAP register instead of using