diff options
-rw-r--r-- | drivers/net/dl2k.c | 12 | ||||
-rw-r--r-- | include/linux/dma-mapping.h | 1 |
2 files changed, 7 insertions, 6 deletions
diff --git a/drivers/net/dl2k.c b/drivers/net/dl2k.c index 1f3627470c95..1ddefd281213 100644 --- a/drivers/net/dl2k.c +++ b/drivers/net/dl2k.c | |||
@@ -765,7 +765,7 @@ rio_free_tx (struct net_device *dev, int irq) | |||
765 | break; | 765 | break; |
766 | skb = np->tx_skbuff[entry]; | 766 | skb = np->tx_skbuff[entry]; |
767 | pci_unmap_single (np->pdev, | 767 | pci_unmap_single (np->pdev, |
768 | np->tx_ring[entry].fraginfo & 0xffffffffffff, | 768 | np->tx_ring[entry].fraginfo & DMA_48BIT_MASK, |
769 | skb->len, PCI_DMA_TODEVICE); | 769 | skb->len, PCI_DMA_TODEVICE); |
770 | if (irq) | 770 | if (irq) |
771 | dev_kfree_skb_irq (skb); | 771 | dev_kfree_skb_irq (skb); |
@@ -893,7 +893,7 @@ receive_packet (struct net_device *dev) | |||
893 | /* Small skbuffs for short packets */ | 893 | /* Small skbuffs for short packets */ |
894 | if (pkt_len > copy_thresh) { | 894 | if (pkt_len > copy_thresh) { |
895 | pci_unmap_single (np->pdev, | 895 | pci_unmap_single (np->pdev, |
896 | desc->fraginfo & 0xffffffffffff, | 896 | desc->fraginfo & DMA_48BIT_MASK, |
897 | np->rx_buf_sz, | 897 | np->rx_buf_sz, |
898 | PCI_DMA_FROMDEVICE); | 898 | PCI_DMA_FROMDEVICE); |
899 | skb_put (skb = np->rx_skbuff[entry], pkt_len); | 899 | skb_put (skb = np->rx_skbuff[entry], pkt_len); |
@@ -901,7 +901,7 @@ receive_packet (struct net_device *dev) | |||
901 | } else if ((skb = dev_alloc_skb (pkt_len + 2)) != NULL) { | 901 | } else if ((skb = dev_alloc_skb (pkt_len + 2)) != NULL) { |
902 | pci_dma_sync_single_for_cpu(np->pdev, | 902 | pci_dma_sync_single_for_cpu(np->pdev, |
903 | desc->fraginfo & | 903 | desc->fraginfo & |
904 | 0xffffffffffff, | 904 | DMA_48BIT_MASK, |
905 | np->rx_buf_sz, | 905 | np->rx_buf_sz, |
906 | PCI_DMA_FROMDEVICE); | 906 | PCI_DMA_FROMDEVICE); |
907 | skb->dev = dev; | 907 | skb->dev = dev; |
@@ -913,7 +913,7 @@ receive_packet (struct net_device *dev) | |||
913 | skb_put (skb, pkt_len); | 913 | skb_put (skb, pkt_len); |
914 | pci_dma_sync_single_for_device(np->pdev, | 914 | pci_dma_sync_single_for_device(np->pdev, |
915 | desc->fraginfo & | 915 | desc->fraginfo & |
916 | 0xffffffffffff, | 916 | DMA_48BIT_MASK, |
917 | np->rx_buf_sz, | 917 | np->rx_buf_sz, |
918 | PCI_DMA_FROMDEVICE); | 918 | PCI_DMA_FROMDEVICE); |
919 | } | 919 | } |
@@ -1800,7 +1800,7 @@ rio_close (struct net_device *dev) | |||
1800 | skb = np->rx_skbuff[i]; | 1800 | skb = np->rx_skbuff[i]; |
1801 | if (skb) { | 1801 | if (skb) { |
1802 | pci_unmap_single(np->pdev, | 1802 | pci_unmap_single(np->pdev, |
1803 | np->rx_ring[i].fraginfo & 0xffffffffffff, | 1803 | np->rx_ring[i].fraginfo & DMA_48BIT_MASK, |
1804 | skb->len, PCI_DMA_FROMDEVICE); | 1804 | skb->len, PCI_DMA_FROMDEVICE); |
1805 | dev_kfree_skb (skb); | 1805 | dev_kfree_skb (skb); |
1806 | np->rx_skbuff[i] = NULL; | 1806 | np->rx_skbuff[i] = NULL; |
@@ -1810,7 +1810,7 @@ rio_close (struct net_device *dev) | |||
1810 | skb = np->tx_skbuff[i]; | 1810 | skb = np->tx_skbuff[i]; |
1811 | if (skb) { | 1811 | if (skb) { |
1812 | pci_unmap_single(np->pdev, | 1812 | pci_unmap_single(np->pdev, |
1813 | np->tx_ring[i].fraginfo & 0xffffffffffff, | 1813 | np->tx_ring[i].fraginfo & DMA_48BIT_MASK, |
1814 | skb->len, PCI_DMA_TODEVICE); | 1814 | skb->len, PCI_DMA_TODEVICE); |
1815 | dev_kfree_skb (skb); | 1815 | dev_kfree_skb (skb); |
1816 | np->tx_skbuff[i] = NULL; | 1816 | np->tx_skbuff[i] = NULL; |
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index ff61817082fa..635690cf3e3d 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h | |||
@@ -14,6 +14,7 @@ enum dma_data_direction { | |||
14 | }; | 14 | }; |
15 | 15 | ||
16 | #define DMA_64BIT_MASK 0xffffffffffffffffULL | 16 | #define DMA_64BIT_MASK 0xffffffffffffffffULL |
17 | #define DMA_48BIT_MASK 0x0000ffffffffffffULL | ||
17 | #define DMA_40BIT_MASK 0x000000ffffffffffULL | 18 | #define DMA_40BIT_MASK 0x000000ffffffffffULL |
18 | #define DMA_39BIT_MASK 0x0000007fffffffffULL | 19 | #define DMA_39BIT_MASK 0x0000007fffffffffULL |
19 | #define DMA_32BIT_MASK 0x00000000ffffffffULL | 20 | #define DMA_32BIT_MASK 0x00000000ffffffffULL |