aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/skge.c
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2010-04-27 10:57:04 -0400
committerDavid S. Miller <davem@davemloft.net>2010-05-16 02:29:31 -0400
commit10fc51b9953112ade61e33ff2f6f005f005a2361 (patch)
tree47d268ef493f5d7dab138c775c05d37f3c25bf65 /drivers/net/skge.c
parente3826f1e946e7d2354943232f1457be1455a29e2 (diff)
skge: use the DMA state API instead of the pci equivalents
This replace the PCI DMA state API (include/linux/pci-dma.h) with the DMA equivalents since the PCI DMA state API will be obsolete. No functional change. For further information about the background: http://marc.info/?l=linux-netdev&m=127037540020276&w=2 Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Acked-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/skge.c')
-rw-r--r--drivers/net/skge.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/net/skge.c b/drivers/net/skge.c
index 96eee8666877..40e5c46e7571 100644
--- a/drivers/net/skge.c
+++ b/drivers/net/skge.c
@@ -984,8 +984,8 @@ static void skge_rx_setup(struct skge_port *skge, struct skge_element *e,
984 wmb(); 984 wmb();
985 985
986 rd->control = BMU_OWN | BMU_STF | BMU_IRQ_EOF | BMU_TCP_CHECK | bufsize; 986 rd->control = BMU_OWN | BMU_STF | BMU_IRQ_EOF | BMU_TCP_CHECK | bufsize;
987 pci_unmap_addr_set(e, mapaddr, map); 987 dma_unmap_addr_set(e, mapaddr, map);
988 pci_unmap_len_set(e, maplen, bufsize); 988 dma_unmap_len_set(e, maplen, bufsize);
989} 989}
990 990
991/* Resume receiving using existing skb, 991/* Resume receiving using existing skb,
@@ -1018,8 +1018,8 @@ static void skge_rx_clean(struct skge_port *skge)
1018 rd->control = 0; 1018 rd->control = 0;
1019 if (e->skb) { 1019 if (e->skb) {
1020 pci_unmap_single(hw->pdev, 1020 pci_unmap_single(hw->pdev,
1021 pci_unmap_addr(e, mapaddr), 1021 dma_unmap_addr(e, mapaddr),
1022 pci_unmap_len(e, maplen), 1022 dma_unmap_len(e, maplen),
1023 PCI_DMA_FROMDEVICE); 1023 PCI_DMA_FROMDEVICE);
1024 dev_kfree_skb(e->skb); 1024 dev_kfree_skb(e->skb);
1025 e->skb = NULL; 1025 e->skb = NULL;
@@ -2756,8 +2756,8 @@ static netdev_tx_t skge_xmit_frame(struct sk_buff *skb,
2756 e->skb = skb; 2756 e->skb = skb;
2757 len = skb_headlen(skb); 2757 len = skb_headlen(skb);
2758 map = pci_map_single(hw->pdev, skb->data, len, PCI_DMA_TODEVICE); 2758 map = pci_map_single(hw->pdev, skb->data, len, PCI_DMA_TODEVICE);
2759 pci_unmap_addr_set(e, mapaddr, map); 2759 dma_unmap_addr_set(e, mapaddr, map);
2760 pci_unmap_len_set(e, maplen, len); 2760 dma_unmap_len_set(e, maplen, len);
2761 2761
2762 td->dma_lo = map; 2762 td->dma_lo = map;
2763 td->dma_hi = map >> 32; 2763 td->dma_hi = map >> 32;
@@ -2799,8 +2799,8 @@ static netdev_tx_t skge_xmit_frame(struct sk_buff *skb,
2799 2799
2800 tf->dma_lo = map; 2800 tf->dma_lo = map;
2801 tf->dma_hi = (u64) map >> 32; 2801 tf->dma_hi = (u64) map >> 32;
2802 pci_unmap_addr_set(e, mapaddr, map); 2802 dma_unmap_addr_set(e, mapaddr, map);
2803 pci_unmap_len_set(e, maplen, frag->size); 2803 dma_unmap_len_set(e, maplen, frag->size);
2804 2804
2805 tf->control = BMU_OWN | BMU_SW | control | frag->size; 2805 tf->control = BMU_OWN | BMU_SW | control | frag->size;
2806 } 2806 }
@@ -2837,12 +2837,12 @@ static void skge_tx_free(struct skge_port *skge, struct skge_element *e,
2837 2837
2838 /* skb header vs. fragment */ 2838 /* skb header vs. fragment */
2839 if (control & BMU_STF) 2839 if (control & BMU_STF)
2840 pci_unmap_single(pdev, pci_unmap_addr(e, mapaddr), 2840 pci_unmap_single(pdev, dma_unmap_addr(e, mapaddr),
2841 pci_unmap_len(e, maplen), 2841 dma_unmap_len(e, maplen),
2842 PCI_DMA_TODEVICE); 2842 PCI_DMA_TODEVICE);
2843 else 2843 else
2844 pci_unmap_page(pdev, pci_unmap_addr(e, mapaddr), 2844 pci_unmap_page(pdev, dma_unmap_addr(e, mapaddr),
2845 pci_unmap_len(e, maplen), 2845 dma_unmap_len(e, maplen),
2846 PCI_DMA_TODEVICE); 2846 PCI_DMA_TODEVICE);
2847 2847
2848 if (control & BMU_EOF) { 2848 if (control & BMU_EOF) {
@@ -3060,11 +3060,11 @@ static struct sk_buff *skge_rx_get(struct net_device *dev,
3060 goto resubmit; 3060 goto resubmit;
3061 3061
3062 pci_dma_sync_single_for_cpu(skge->hw->pdev, 3062 pci_dma_sync_single_for_cpu(skge->hw->pdev,
3063 pci_unmap_addr(e, mapaddr), 3063 dma_unmap_addr(e, mapaddr),
3064 len, PCI_DMA_FROMDEVICE); 3064 len, PCI_DMA_FROMDEVICE);
3065 skb_copy_from_linear_data(e->skb, skb->data, len); 3065 skb_copy_from_linear_data(e->skb, skb->data, len);
3066 pci_dma_sync_single_for_device(skge->hw->pdev, 3066 pci_dma_sync_single_for_device(skge->hw->pdev,
3067 pci_unmap_addr(e, mapaddr), 3067 dma_unmap_addr(e, mapaddr),
3068 len, PCI_DMA_FROMDEVICE); 3068 len, PCI_DMA_FROMDEVICE);
3069 skge_rx_reuse(e, skge->rx_buf_size); 3069 skge_rx_reuse(e, skge->rx_buf_size);
3070 } else { 3070 } else {
@@ -3075,8 +3075,8 @@ static struct sk_buff *skge_rx_get(struct net_device *dev,
3075 goto resubmit; 3075 goto resubmit;
3076 3076
3077 pci_unmap_single(skge->hw->pdev, 3077 pci_unmap_single(skge->hw->pdev,
3078 pci_unmap_addr(e, mapaddr), 3078 dma_unmap_addr(e, mapaddr),
3079 pci_unmap_len(e, maplen), 3079 dma_unmap_len(e, maplen),
3080 PCI_DMA_FROMDEVICE); 3080 PCI_DMA_FROMDEVICE);
3081 skb = e->skb; 3081 skb = e->skb;
3082 prefetch(skb->data); 3082 prefetch(skb->data);