]> err.no Git - linux-2.6/commitdiff
dl2k: use DMA_48BIT_MASK constant
authorFrancois Romieu <romieu@fr.zoreil.com>
Wed, 10 May 2006 19:48:57 +0000 (12:48 -0700)
committerStephen Hemminger <shemminger@osdl.org>
Wed, 10 May 2006 21:04:22 +0000 (14:04 -0700)
Typo will be harder with this one.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
drivers/net/dl2k.c
include/linux/dma-mapping.h

index 1f3627470c958972da00dcba432fe27fd893788c..1ddefd281213d613462f05a583795921d5d3acd4 100644 (file)
@@ -765,7 +765,7 @@ rio_free_tx (struct net_device *dev, int irq)
                        break;
                skb = np->tx_skbuff[entry];
                pci_unmap_single (np->pdev,
-                                 np->tx_ring[entry].fraginfo & 0xffffffffffff,
+                                 np->tx_ring[entry].fraginfo & DMA_48BIT_MASK,
                                  skb->len, PCI_DMA_TODEVICE);
                if (irq)
                        dev_kfree_skb_irq (skb);
@@ -893,7 +893,7 @@ receive_packet (struct net_device *dev)
                        /* Small skbuffs for short packets */
                        if (pkt_len > copy_thresh) {
                                pci_unmap_single (np->pdev,
-                                                 desc->fraginfo & 0xffffffffffff,
+                                                 desc->fraginfo & DMA_48BIT_MASK,
                                                  np->rx_buf_sz,
                                                  PCI_DMA_FROMDEVICE);
                                skb_put (skb = np->rx_skbuff[entry], pkt_len);
@@ -901,7 +901,7 @@ receive_packet (struct net_device *dev)
                        } else if ((skb = dev_alloc_skb (pkt_len + 2)) != NULL) {
                                pci_dma_sync_single_for_cpu(np->pdev,
                                                            desc->fraginfo & 
-                                                               0xffffffffffff,
+                                                               DMA_48BIT_MASK,
                                                            np->rx_buf_sz,
                                                            PCI_DMA_FROMDEVICE);
                                skb->dev = dev;
@@ -913,7 +913,7 @@ receive_packet (struct net_device *dev)
                                skb_put (skb, pkt_len);
                                pci_dma_sync_single_for_device(np->pdev,
                                                               desc->fraginfo &
-                                                                0xffffffffffff,
+                                                                DMA_48BIT_MASK,
                                                               np->rx_buf_sz,
                                                               PCI_DMA_FROMDEVICE);
                        }
@@ -1800,7 +1800,7 @@ rio_close (struct net_device *dev)
                skb = np->rx_skbuff[i];
                if (skb) {
                        pci_unmap_single(np->pdev, 
-                                        np->rx_ring[i].fraginfo & 0xffffffffffff,
+                                        np->rx_ring[i].fraginfo & DMA_48BIT_MASK,
                                         skb->len, PCI_DMA_FROMDEVICE);
                        dev_kfree_skb (skb);
                        np->rx_skbuff[i] = NULL;
@@ -1810,7 +1810,7 @@ rio_close (struct net_device *dev)
                skb = np->tx_skbuff[i];
                if (skb) {
                        pci_unmap_single(np->pdev, 
-                                        np->tx_ring[i].fraginfo & 0xffffffffffff,
+                                        np->tx_ring[i].fraginfo & DMA_48BIT_MASK,
                                         skb->len, PCI_DMA_TODEVICE);
                        dev_kfree_skb (skb);
                        np->tx_skbuff[i] = NULL;
index ff61817082fa80271a24f4b2ad70623c013dfc26..635690cf3e3dc77ff54f8d07555da2ffc4dff165 100644 (file)
@@ -14,6 +14,7 @@ enum dma_data_direction {
 };
 
 #define DMA_64BIT_MASK 0xffffffffffffffffULL
+#define DMA_48BIT_MASK 0x0000ffffffffffffULL
 #define DMA_40BIT_MASK 0x000000ffffffffffULL
 #define DMA_39BIT_MASK 0x0000007fffffffffULL
 #define DMA_32BIT_MASK 0x00000000ffffffffULL