]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
dma-mapping: replace all DMA_30BIT_MASK macro with DMA_BIT_MASK(30)
authorYang Hongyang <yanghy@cn.fujitsu.com>
Tue, 7 Apr 2009 02:01:17 +0000 (19:01 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 7 Apr 2009 15:31:11 +0000 (08:31 -0700)
Replace all DMA_30BIT_MASK macro with DMA_BIT_MASK(30)

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>
drivers/net/b44.c
drivers/net/wireless/b43/dma.c
drivers/net/wireless/b43legacy/dma.c
sound/pci/sis7019.c
sound/pci/trident/trident_main.c

index 17b2750d21ded42ab79966a10e355f5ffbecccd2..b70b81ec34c386f0520437f8cd96199cebc9e611 100644 (file)
@@ -660,7 +660,7 @@ static int b44_alloc_rx_skb(struct b44 *bp, int src_idx, u32 dest_idx_unmasked)
        /* Hardware bug work-around, the chip is unable to do PCI DMA
           to/from anything above 1GB :-( */
        if (ssb_dma_mapping_error(bp->sdev, mapping) ||
-               mapping + RX_PKT_BUF_SZ > DMA_30BIT_MASK) {
+               mapping + RX_PKT_BUF_SZ > DMA_BIT_MASK(30)) {
                /* Sigh... */
                if (!ssb_dma_mapping_error(bp->sdev, mapping))
                        ssb_dma_unmap_single(bp->sdev, mapping,
@@ -673,7 +673,7 @@ static int b44_alloc_rx_skb(struct b44 *bp, int src_idx, u32 dest_idx_unmasked)
                                             RX_PKT_BUF_SZ,
                                             DMA_FROM_DEVICE);
                if (ssb_dma_mapping_error(bp->sdev, mapping) ||
-                       mapping + RX_PKT_BUF_SZ > DMA_30BIT_MASK) {
+                       mapping + RX_PKT_BUF_SZ > DMA_BIT_MASK(30)) {
                        if (!ssb_dma_mapping_error(bp->sdev, mapping))
                                ssb_dma_unmap_single(bp->sdev, mapping, RX_PKT_BUF_SZ,DMA_FROM_DEVICE);
                        dev_kfree_skb_any(skb);
@@ -965,7 +965,7 @@ static int b44_start_xmit(struct sk_buff *skb, struct net_device *dev)
        }
 
        mapping = ssb_dma_map_single(bp->sdev, skb->data, len, DMA_TO_DEVICE);
-       if (ssb_dma_mapping_error(bp->sdev, mapping) || mapping + len > DMA_30BIT_MASK) {
+       if (ssb_dma_mapping_error(bp->sdev, mapping) || mapping + len > DMA_BIT_MASK(30)) {
                struct sk_buff *bounce_skb;
 
                /* Chip can't handle DMA to/from >1GB, use bounce buffer */
@@ -979,7 +979,7 @@ static int b44_start_xmit(struct sk_buff *skb, struct net_device *dev)
 
                mapping = ssb_dma_map_single(bp->sdev, bounce_skb->data,
                                             len, DMA_TO_DEVICE);
-               if (ssb_dma_mapping_error(bp->sdev, mapping) || mapping + len > DMA_30BIT_MASK) {
+               if (ssb_dma_mapping_error(bp->sdev, mapping) || mapping + len > DMA_BIT_MASK(30)) {
                        if (!ssb_dma_mapping_error(bp->sdev, mapping))
                                ssb_dma_unmap_single(bp->sdev, mapping,
                                                     len, DMA_TO_DEVICE);
@@ -1204,7 +1204,7 @@ static int b44_alloc_consistent(struct b44 *bp, gfp_t gfp)
                                                 DMA_BIDIRECTIONAL);
 
                if (ssb_dma_mapping_error(bp->sdev, rx_ring_dma) ||
-                       rx_ring_dma + size > DMA_30BIT_MASK) {
+                       rx_ring_dma + size > DMA_BIT_MASK(30)) {
                        kfree(rx_ring);
                        goto out_err;
                }
@@ -1231,7 +1231,7 @@ static int b44_alloc_consistent(struct b44 *bp, gfp_t gfp)
                                            DMA_TO_DEVICE);
 
                if (ssb_dma_mapping_error(bp->sdev, tx_ring_dma) ||
-                       tx_ring_dma + size > DMA_30BIT_MASK) {
+                       tx_ring_dma + size > DMA_BIT_MASK(30)) {
                        kfree(tx_ring);
                        goto out_err;
                }
@@ -2180,7 +2180,7 @@ static int __devinit b44_init_one(struct ssb_device *sdev,
                        "Failed to powerup the bus\n");
                goto err_out_free_dev;
        }
-       err = ssb_dma_set_mask(sdev, DMA_30BIT_MASK);
+       err = ssb_dma_set_mask(sdev, DMA_BIT_MASK(30));
        if (err) {
                dev_err(sdev->dev,
                        "Required 30BIT DMA mask unsupported by the system.\n");
index de1964f7d9e00f0c08322da9a2581044d94a58e1..e228c1de6e1153bd8556ed16ce0226442e2942f1 100644 (file)
@@ -779,12 +779,12 @@ static u64 supported_dma_mask(struct b43_wldev *dev)
        if (tmp & B43_DMA32_TXADDREXT_MASK)
                return DMA_BIT_MASK(32);
 
-       return DMA_30BIT_MASK;
+       return DMA_BIT_MASK(30);
 }
 
 static enum b43_dmatype dma_mask_to_engine_type(u64 dmamask)
 {
-       if (dmamask == DMA_30BIT_MASK)
+       if (dmamask == DMA_BIT_MASK(30))
                return B43_DMA_30BIT;
        if (dmamask == DMA_BIT_MASK(32))
                return B43_DMA_32BIT;
@@ -1005,7 +1005,7 @@ static int b43_dma_set_mask(struct b43_wldev *dev, u64 mask)
                        continue;
                }
                if (mask == DMA_BIT_MASK(32)) {
-                       mask = DMA_30BIT_MASK;
+                       mask = DMA_BIT_MASK(30);
                        fallback = 1;
                        continue;
                }
index 1d3e0d239314cb96ecd266d76fb2ba429aec57ef..2f90fb9f5367fb9126cc8298f2194015e5bfa8dc 100644 (file)
@@ -856,12 +856,12 @@ static u64 supported_dma_mask(struct b43legacy_wldev *dev)
        if (tmp & B43legacy_DMA32_TXADDREXT_MASK)
                return DMA_BIT_MASK(32);
 
-       return DMA_30BIT_MASK;
+       return DMA_BIT_MASK(30);
 }
 
 static enum b43legacy_dmatype dma_mask_to_engine_type(u64 dmamask)
 {
-       if (dmamask == DMA_30BIT_MASK)
+       if (dmamask == DMA_BIT_MASK(30))
                return B43legacy_DMA_30BIT;
        if (dmamask == DMA_BIT_MASK(32))
                return B43legacy_DMA_32BIT;
@@ -1048,7 +1048,7 @@ static int b43legacy_dma_set_mask(struct b43legacy_wldev *dev, u64 mask)
                        continue;
                }
                if (mask == DMA_BIT_MASK(32)) {
-                       mask = DMA_30BIT_MASK;
+                       mask = DMA_BIT_MASK(30);
                        fallback = 1;
                        continue;
                }
index baf6d8e3dabc3e703f21337c79f5c25fceb6926c..1a5ff06110725ef407e1d82f83b05ceddfc70b01 100644 (file)
@@ -1300,7 +1300,7 @@ static int __devinit sis_chip_create(struct snd_card *card,
        if (rc)
                goto error_out;
 
-       if (pci_set_dma_mask(pci, DMA_30BIT_MASK) < 0) {
+       if (pci_set_dma_mask(pci, DMA_BIT_MASK(30)) < 0) {
                printk(KERN_ERR "sis7019: architecture does not support "
                                        "30-bit PCI busmaster DMA");
                goto error_out_enabled;
index a9da9c184660cf25d8c1748ceba8b4475e83167e..6d943f6f6b7042aabda0095f284adfb9033bdbf7 100644 (file)
@@ -3559,8 +3559,8 @@ int __devinit snd_trident_create(struct snd_card *card,
        if ((err = pci_enable_device(pci)) < 0)
                return err;
        /* check, if we can restrict PCI DMA transfers to 30 bits */
-       if (pci_set_dma_mask(pci, DMA_30BIT_MASK) < 0 ||
-           pci_set_consistent_dma_mask(pci, DMA_30BIT_MASK) < 0) {
+       if (pci_set_dma_mask(pci, DMA_BIT_MASK(30)) < 0 ||
+           pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(30)) < 0) {
                snd_printk(KERN_ERR "architecture does not support 30bit PCI busmaster DMA\n");
                pci_disable_device(pci);
                return -ENXIO;