diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2009-05-27 11:10:42 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-05-29 04:51:22 -0400 |
commit | 5d23a1d2a317e272f171d7818f600fde324eaceb (patch) | |
tree | bc0d938e894464a923eecc719f332eee0cbe2aa3 /drivers/net/mlx4 | |
parent | 108bfa895cacd1a7c1767e85be105b213e5dce50 (diff) |
net: replace dma_sync_single with dma_sync_single_for_cpu
This replaces dma_sync_single() with dma_sync_single_for_cpu() because
dma_sync_single() is an obsolete API; include/linux/dma-mapping.h says:
/* Backwards compat, remove in 2.7.x */
#define dma_sync_single dma_sync_single_for_cpu
#define dma_sync_sg dma_sync_sg_for_cpu
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/mlx4')
-rw-r--r-- | drivers/net/mlx4/mr.c | 7 |
1 files changed, 4 insertions, 3 deletions
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); |