diff options
-rw-r--r-- | drivers/net/arm/ep93xx_eth.c | 4 | ||||
-rw-r--r-- | drivers/net/arm/ixp4xx_eth.c | 4 | ||||
-rw-r--r-- | drivers/net/mlx4/mr.c | 7 | ||||
-rw-r--r-- | drivers/net/wan/ixp4xx_hss.c | 4 |
4 files changed, 10 insertions, 9 deletions
diff --git a/drivers/net/arm/ep93xx_eth.c b/drivers/net/arm/ep93xx_eth.c index b72b3d639f6e..fbf4645417d4 100644 --- a/drivers/net/arm/ep93xx_eth.c +++ b/drivers/net/arm/ep93xx_eth.c | |||
@@ -253,7 +253,7 @@ static int ep93xx_rx(struct net_device *dev, int processed, int budget) | |||
253 | skb = dev_alloc_skb(length + 2); | 253 | skb = dev_alloc_skb(length + 2); |
254 | if (likely(skb != NULL)) { | 254 | if (likely(skb != NULL)) { |
255 | skb_reserve(skb, 2); | 255 | skb_reserve(skb, 2); |
256 | dma_sync_single(NULL, ep->descs->rdesc[entry].buf_addr, | 256 | dma_sync_single_for_cpu(NULL, ep->descs->rdesc[entry].buf_addr, |
257 | length, DMA_FROM_DEVICE); | 257 | length, DMA_FROM_DEVICE); |
258 | skb_copy_to_linear_data(skb, ep->rx_buf[entry], length); | 258 | skb_copy_to_linear_data(skb, ep->rx_buf[entry], length); |
259 | skb_put(skb, length); | 259 | skb_put(skb, length); |
@@ -331,7 +331,7 @@ static int ep93xx_xmit(struct sk_buff *skb, struct net_device *dev) | |||
331 | ep->descs->tdesc[entry].tdesc1 = | 331 | ep->descs->tdesc[entry].tdesc1 = |
332 | TDESC1_EOF | (entry << 16) | (skb->len & 0xfff); | 332 | TDESC1_EOF | (entry << 16) | (skb->len & 0xfff); |
333 | skb_copy_and_csum_dev(skb, ep->tx_buf[entry]); | 333 | skb_copy_and_csum_dev(skb, ep->tx_buf[entry]); |
334 | dma_sync_single(NULL, ep->descs->tdesc[entry].buf_addr, | 334 | dma_sync_single_for_cpu(NULL, ep->descs->tdesc[entry].buf_addr, |
335 | skb->len, DMA_TO_DEVICE); | 335 | skb->len, DMA_TO_DEVICE); |
336 | dev_kfree_skb(skb); | 336 | dev_kfree_skb(skb); |
337 | 337 | ||
diff --git a/drivers/net/arm/ixp4xx_eth.c b/drivers/net/arm/ixp4xx_eth.c index 322c49b908dc..1fcf8388b1c8 100644 --- a/drivers/net/arm/ixp4xx_eth.c +++ b/drivers/net/arm/ixp4xx_eth.c | |||
@@ -561,8 +561,8 @@ static int eth_poll(struct napi_struct *napi, int budget) | |||
561 | dma_unmap_single(&dev->dev, desc->data - NET_IP_ALIGN, | 561 | dma_unmap_single(&dev->dev, desc->data - NET_IP_ALIGN, |
562 | RX_BUFF_SIZE, DMA_FROM_DEVICE); | 562 | RX_BUFF_SIZE, DMA_FROM_DEVICE); |
563 | #else | 563 | #else |
564 | dma_sync_single(&dev->dev, desc->data - NET_IP_ALIGN, | 564 | dma_sync_single_for_cpu(&dev->dev, desc->data - NET_IP_ALIGN, |
565 | RX_BUFF_SIZE, DMA_FROM_DEVICE); | 565 | RX_BUFF_SIZE, DMA_FROM_DEVICE); |
566 | memcpy_swab32((u32 *)skb->data, (u32 *)port->rx_buff_tab[n], | 566 | memcpy_swab32((u32 *)skb->data, (u32 *)port->rx_buff_tab[n], |
567 | ALIGN(NET_IP_ALIGN + desc->pkt_len, 4) / 4); | 567 | ALIGN(NET_IP_ALIGN + desc->pkt_len, 4) / 4); |
568 | #endif | 568 | #endif |
diff --git a/drivers/net/mlx4/mr.c b/drivers/net/mlx4/mr.c index 0caf74cae8bc..0a467785f065 100644 --- a/drivers/net/mlx4/mr.c +++ b/drivers/net/mlx4/mr.c | |||
@@ -402,7 +402,8 @@ static int mlx4_write_mtt_chunk(struct mlx4_dev *dev, struct mlx4_mtt *mtt, | |||
402 | for (i = 0; i < npages; ++i) | 402 | for (i = 0; i < npages; ++i) |
403 | mtts[i] = cpu_to_be64(page_list[i] | MLX4_MTT_FLAG_PRESENT); | 403 | mtts[i] = cpu_to_be64(page_list[i] | MLX4_MTT_FLAG_PRESENT); |
404 | 404 | ||
405 | dma_sync_single(&dev->pdev->dev, dma_handle, npages * sizeof (u64), DMA_TO_DEVICE); | 405 | dma_sync_single_for_cpu(&dev->pdev->dev, dma_handle, |
406 | npages * sizeof (u64), DMA_TO_DEVICE); | ||
406 | 407 | ||
407 | return 0; | 408 | return 0; |
408 | } | 409 | } |
@@ -549,8 +550,8 @@ int mlx4_map_phys_fmr(struct mlx4_dev *dev, struct mlx4_fmr *fmr, u64 *page_list | |||
549 | for (i = 0; i < npages; ++i) | 550 | for (i = 0; i < npages; ++i) |
550 | fmr->mtts[i] = cpu_to_be64(page_list[i] | MLX4_MTT_FLAG_PRESENT); | 551 | fmr->mtts[i] = cpu_to_be64(page_list[i] | MLX4_MTT_FLAG_PRESENT); |
551 | 552 | ||
552 | dma_sync_single(&dev->pdev->dev, fmr->dma_handle, | 553 | dma_sync_single_for_cpu(&dev->pdev->dev, fmr->dma_handle, |
553 | npages * sizeof(u64), DMA_TO_DEVICE); | 554 | npages * sizeof(u64), DMA_TO_DEVICE); |
554 | 555 | ||
555 | fmr->mpt->key = cpu_to_be32(key); | 556 | fmr->mpt->key = cpu_to_be32(key); |
556 | fmr->mpt->lkey = cpu_to_be32(key); | 557 | fmr->mpt->lkey = cpu_to_be32(key); |
diff --git a/drivers/net/wan/ixp4xx_hss.c b/drivers/net/wan/ixp4xx_hss.c index 765a7f5d6aa4..08b1a284b690 100644 --- a/drivers/net/wan/ixp4xx_hss.c +++ b/drivers/net/wan/ixp4xx_hss.c | |||
@@ -731,8 +731,8 @@ static int hss_hdlc_poll(struct napi_struct *napi, int budget) | |||
731 | dma_unmap_single(&dev->dev, desc->data, | 731 | dma_unmap_single(&dev->dev, desc->data, |
732 | RX_SIZE, DMA_FROM_DEVICE); | 732 | RX_SIZE, DMA_FROM_DEVICE); |
733 | #else | 733 | #else |
734 | dma_sync_single(&dev->dev, desc->data, | 734 | dma_sync_single_for_cpu(&dev->dev, desc->data, |
735 | RX_SIZE, DMA_FROM_DEVICE); | 735 | RX_SIZE, DMA_FROM_DEVICE); |
736 | memcpy_swab32((u32 *)skb->data, (u32 *)port->rx_buff_tab[n], | 736 | memcpy_swab32((u32 *)skb->data, (u32 *)port->rx_buff_tab[n], |
737 | ALIGN(desc->pkt_len, 4) / 4); | 737 | ALIGN(desc->pkt_len, 4) / 4); |
738 | #endif | 738 | #endif |