]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
b44: replace define
authorGary Zambrano <zambrano@broadcom.com>
Fri, 16 Feb 2007 21:27:23 +0000 (13:27 -0800)
committerJeff Garzik <jeff@garzik.org>
Sat, 17 Feb 2007 20:37:14 +0000 (15:37 -0500)
Replaced B44_DMA_MASK with DMA_30BIT_MASK.

Signed-off by: Gary Zambrano <zambrano@broadcom.com>

Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/b44.c

index 5ff7882297d66910c15db46406eda5e8a4a33e50..9332f4c2dc6f310948813b0812c00a5c24c3affd 100644 (file)
@@ -59,7 +59,6 @@
 #define B44_DEF_TX_RING_PENDING                (B44_TX_RING_SIZE - 1)
 #define B44_TX_RING_BYTES      (sizeof(struct dma_desc) * \
                                 B44_TX_RING_SIZE)
-#define B44_DMA_MASK 0x3fffffff
 
 #define TX_RING_GAP(BP)        \
        (B44_TX_RING_SIZE - (BP)->tx_pending)
@@ -665,7 +664,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 (dma_mapping_error(mapping) ||
-               mapping + RX_PKT_BUF_SZ > B44_DMA_MASK) {
+               mapping + RX_PKT_BUF_SZ > DMA_30BIT_MASK) {
                /* Sigh... */
                if (!dma_mapping_error(mapping))
                        pci_unmap_single(bp->pdev, mapping, RX_PKT_BUF_SZ,PCI_DMA_FROMDEVICE);
@@ -677,7 +676,7 @@ static int b44_alloc_rx_skb(struct b44 *bp, int src_idx, u32 dest_idx_unmasked)
                                         RX_PKT_BUF_SZ,
                                         PCI_DMA_FROMDEVICE);
                if (dma_mapping_error(mapping) ||
-                       mapping + RX_PKT_BUF_SZ > B44_DMA_MASK) {
+                       mapping + RX_PKT_BUF_SZ > DMA_30BIT_MASK) {
                        if (!dma_mapping_error(mapping))
                                pci_unmap_single(bp->pdev, mapping, RX_PKT_BUF_SZ,PCI_DMA_FROMDEVICE);
                        dev_kfree_skb_any(skb);
@@ -988,7 +987,7 @@ static int b44_start_xmit(struct sk_buff *skb, struct net_device *dev)
        }
 
        mapping = pci_map_single(bp->pdev, skb->data, len, PCI_DMA_TODEVICE);
-       if (dma_mapping_error(mapping) || mapping + len > B44_DMA_MASK) {
+       if (dma_mapping_error(mapping) || mapping + len > DMA_30BIT_MASK) {
                /* Chip can't handle DMA to/from >1GB, use bounce buffer */
                if (!dma_mapping_error(mapping))
                        pci_unmap_single(bp->pdev, mapping, len, PCI_DMA_TODEVICE);
@@ -1000,7 +999,7 @@ static int b44_start_xmit(struct sk_buff *skb, struct net_device *dev)
 
                mapping = pci_map_single(bp->pdev, bounce_skb->data,
                                         len, PCI_DMA_TODEVICE);
-               if (dma_mapping_error(mapping) || mapping + len > B44_DMA_MASK) {
+               if (dma_mapping_error(mapping) || mapping + len > DMA_30BIT_MASK) {
                        if (!dma_mapping_error(mapping))
                                pci_unmap_single(bp->pdev, mapping,
                                         len, PCI_DMA_TODEVICE);
@@ -1227,7 +1226,7 @@ static int b44_alloc_consistent(struct b44 *bp)
                                             DMA_BIDIRECTIONAL);
 
                if (dma_mapping_error(rx_ring_dma) ||
-                       rx_ring_dma + size > B44_DMA_MASK) {
+                       rx_ring_dma + size > DMA_30BIT_MASK) {
                        kfree(rx_ring);
                        goto out_err;
                }
@@ -1254,7 +1253,7 @@ static int b44_alloc_consistent(struct b44 *bp)
                                             DMA_TO_DEVICE);
 
                if (dma_mapping_error(tx_ring_dma) ||
-                       tx_ring_dma + size > B44_DMA_MASK) {
+                       tx_ring_dma + size > DMA_30BIT_MASK) {
                        kfree(tx_ring);
                        goto out_err;
                }
@@ -2151,13 +2150,13 @@ static int __devinit b44_init_one(struct pci_dev *pdev,
 
        pci_set_master(pdev);
 
-       err = pci_set_dma_mask(pdev, (u64) B44_DMA_MASK);
+       err = pci_set_dma_mask(pdev, (u64) DMA_30BIT_MASK);
        if (err) {
                dev_err(&pdev->dev, "No usable DMA configuration, aborting.\n");
                goto err_out_free_res;
        }
 
-       err = pci_set_consistent_dma_mask(pdev, (u64) B44_DMA_MASK);
+       err = pci_set_consistent_dma_mask(pdev, (u64) DMA_30BIT_MASK);
        if (err) {
                dev_err(&pdev->dev, "No usable DMA configuration, aborting.\n");
                goto err_out_free_res;