diff options
Diffstat (limited to 'drivers/net/dl2k.c')
-rw-r--r-- | drivers/net/dl2k.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/net/dl2k.c b/drivers/net/dl2k.c index 1f3627470c95..038447fb5c5e 100644 --- a/drivers/net/dl2k.c +++ b/drivers/net/dl2k.c | |||
@@ -53,6 +53,7 @@ | |||
53 | #define DRV_VERSION "v1.17b" | 53 | #define DRV_VERSION "v1.17b" |
54 | #define DRV_RELDATE "2006/03/10" | 54 | #define DRV_RELDATE "2006/03/10" |
55 | #include "dl2k.h" | 55 | #include "dl2k.h" |
56 | #include <linux/dma-mapping.h> | ||
56 | 57 | ||
57 | static char version[] __devinitdata = | 58 | static char version[] __devinitdata = |
58 | KERN_INFO DRV_NAME " " DRV_VERSION " " DRV_RELDATE "\n"; | 59 | KERN_INFO DRV_NAME " " DRV_VERSION " " DRV_RELDATE "\n"; |
@@ -765,7 +766,7 @@ rio_free_tx (struct net_device *dev, int irq) | |||
765 | break; | 766 | break; |
766 | skb = np->tx_skbuff[entry]; | 767 | skb = np->tx_skbuff[entry]; |
767 | pci_unmap_single (np->pdev, | 768 | pci_unmap_single (np->pdev, |
768 | np->tx_ring[entry].fraginfo & 0xffffffffffff, | 769 | np->tx_ring[entry].fraginfo & DMA_48BIT_MASK, |
769 | skb->len, PCI_DMA_TODEVICE); | 770 | skb->len, PCI_DMA_TODEVICE); |
770 | if (irq) | 771 | if (irq) |
771 | dev_kfree_skb_irq (skb); | 772 | dev_kfree_skb_irq (skb); |
@@ -893,7 +894,7 @@ receive_packet (struct net_device *dev) | |||
893 | /* Small skbuffs for short packets */ | 894 | /* Small skbuffs for short packets */ |
894 | if (pkt_len > copy_thresh) { | 895 | if (pkt_len > copy_thresh) { |
895 | pci_unmap_single (np->pdev, | 896 | pci_unmap_single (np->pdev, |
896 | desc->fraginfo & 0xffffffffffff, | 897 | desc->fraginfo & DMA_48BIT_MASK, |
897 | np->rx_buf_sz, | 898 | np->rx_buf_sz, |
898 | PCI_DMA_FROMDEVICE); | 899 | PCI_DMA_FROMDEVICE); |
899 | skb_put (skb = np->rx_skbuff[entry], pkt_len); | 900 | skb_put (skb = np->rx_skbuff[entry], pkt_len); |
@@ -901,7 +902,7 @@ receive_packet (struct net_device *dev) | |||
901 | } else if ((skb = dev_alloc_skb (pkt_len + 2)) != NULL) { | 902 | } else if ((skb = dev_alloc_skb (pkt_len + 2)) != NULL) { |
902 | pci_dma_sync_single_for_cpu(np->pdev, | 903 | pci_dma_sync_single_for_cpu(np->pdev, |
903 | desc->fraginfo & | 904 | desc->fraginfo & |
904 | 0xffffffffffff, | 905 | DMA_48BIT_MASK, |
905 | np->rx_buf_sz, | 906 | np->rx_buf_sz, |
906 | PCI_DMA_FROMDEVICE); | 907 | PCI_DMA_FROMDEVICE); |
907 | skb->dev = dev; | 908 | skb->dev = dev; |
@@ -913,7 +914,7 @@ receive_packet (struct net_device *dev) | |||
913 | skb_put (skb, pkt_len); | 914 | skb_put (skb, pkt_len); |
914 | pci_dma_sync_single_for_device(np->pdev, | 915 | pci_dma_sync_single_for_device(np->pdev, |
915 | desc->fraginfo & | 916 | desc->fraginfo & |
916 | 0xffffffffffff, | 917 | DMA_48BIT_MASK, |
917 | np->rx_buf_sz, | 918 | np->rx_buf_sz, |
918 | PCI_DMA_FROMDEVICE); | 919 | PCI_DMA_FROMDEVICE); |
919 | } | 920 | } |
@@ -1800,7 +1801,7 @@ rio_close (struct net_device *dev) | |||
1800 | skb = np->rx_skbuff[i]; | 1801 | skb = np->rx_skbuff[i]; |
1801 | if (skb) { | 1802 | if (skb) { |
1802 | pci_unmap_single(np->pdev, | 1803 | pci_unmap_single(np->pdev, |
1803 | np->rx_ring[i].fraginfo & 0xffffffffffff, | 1804 | np->rx_ring[i].fraginfo & DMA_48BIT_MASK, |
1804 | skb->len, PCI_DMA_FROMDEVICE); | 1805 | skb->len, PCI_DMA_FROMDEVICE); |
1805 | dev_kfree_skb (skb); | 1806 | dev_kfree_skb (skb); |
1806 | np->rx_skbuff[i] = NULL; | 1807 | np->rx_skbuff[i] = NULL; |
@@ -1810,7 +1811,7 @@ rio_close (struct net_device *dev) | |||
1810 | skb = np->tx_skbuff[i]; | 1811 | skb = np->tx_skbuff[i]; |
1811 | if (skb) { | 1812 | if (skb) { |
1812 | pci_unmap_single(np->pdev, | 1813 | pci_unmap_single(np->pdev, |
1813 | np->tx_ring[i].fraginfo & 0xffffffffffff, | 1814 | np->tx_ring[i].fraginfo & DMA_48BIT_MASK, |
1814 | skb->len, PCI_DMA_TODEVICE); | 1815 | skb->len, PCI_DMA_TODEVICE); |
1815 | dev_kfree_skb (skb); | 1816 | dev_kfree_skb (skb); |
1816 | np->tx_skbuff[i] = NULL; | 1817 | np->tx_skbuff[i] = NULL; |