diff mbox

mlx4: replace the dma_sync_single_range_for_cpu/device API

Message ID 20100205135626G.fujita.tomonori@lab.ntt.co.jp
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

FUJITA Tomonori Feb. 5, 2010, 4:57 a.m. UTC
There are only two users of the dma_sync_single_range_for_cpu/device
API in mainline (mlx4 and ssb). The
dma_sync_single_range_for_cpu/device API has never been documented and
the dma_sync_single_for_cpu/device API also support a partial sync.

This converts mlx4 to use the dma_sync_single_for_cpu/device API
(preparations for the removal of the dma_sync_single_range_for_cpu/device API).

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
---
 drivers/net/mlx4/en_rx.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

Comments

David Miller Feb. 5, 2010, 5:09 a.m. UTC | #1
From: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Date: Fri, 5 Feb 2010 13:57:42 +0900

> There are only two users of the dma_sync_single_range_for_cpu/device
> API in mainline (mlx4 and ssb). The
> dma_sync_single_range_for_cpu/device API has never been documented and
> the dma_sync_single_for_cpu/device API also support a partial sync.
> 
> This converts mlx4 to use the dma_sync_single_for_cpu/device API
> (preparations for the removal of the dma_sync_single_range_for_cpu/device API).
> 
> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>

Acked-by: David S. Miller <davem@davemloft.net>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Roland Dreier Feb. 11, 2010, 10:31 p.m. UTC | #2
> > There are only two users of the dma_sync_single_range_for_cpu/device
 > > API in mainline (mlx4 and ssb). The
 > > dma_sync_single_range_for_cpu/device API has never been documented and
 > > the dma_sync_single_for_cpu/device API also support a partial sync.
 > > 
 > > This converts mlx4 to use the dma_sync_single_for_cpu/device API
 > > (preparations for the removal of the dma_sync_single_range_for_cpu/device API).
 > > 
 > > Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
 > 
 > Acked-by: David S. Miller <davem@davemloft.net>

Dave, please go ahead and merge this -- this affects the mlx4 ethernet
driver, so it's your area anyway.
FUJITA Tomonori Feb. 19, 2010, 7:44 a.m. UTC | #3
On Thu, 11 Feb 2010 14:31:22 -0800
Roland Dreier <rdreier@cisco.com> wrote:

>  > > There are only two users of the dma_sync_single_range_for_cpu/device
>  > > API in mainline (mlx4 and ssb). The
>  > > dma_sync_single_range_for_cpu/device API has never been documented and
>  > > the dma_sync_single_for_cpu/device API also support a partial sync.
>  > > 
>  > > This converts mlx4 to use the dma_sync_single_for_cpu/device API
>  > > (preparations for the removal of the dma_sync_single_range_for_cpu/device API).
>  > > 
>  > > Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
>  > 
>  > Acked-by: David S. Miller <davem@davemloft.net>
> 
> Dave, please go ahead and merge this -- this affects the mlx4 ethernet
> driver, so it's your area anyway.

Seems that net-next still doesn't have this. Can you please merge
this?

Thanks,
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller Feb. 19, 2010, 8:39 p.m. UTC | #4
From: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Date: Fri, 19 Feb 2010 16:44:29 +0900

> On Thu, 11 Feb 2010 14:31:22 -0800
> Roland Dreier <rdreier@cisco.com> wrote:
> 
>>  > > There are only two users of the dma_sync_single_range_for_cpu/device
>>  > > API in mainline (mlx4 and ssb). The
>>  > > dma_sync_single_range_for_cpu/device API has never been documented and
>>  > > the dma_sync_single_for_cpu/device API also support a partial sync.
>>  > > 
>>  > > This converts mlx4 to use the dma_sync_single_for_cpu/device API
>>  > > (preparations for the removal of the dma_sync_single_range_for_cpu/device API).
>>  > > 
>>  > > Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
>>  > 
>>  > Acked-by: David S. Miller <davem@davemloft.net>
>> 
>> Dave, please go ahead and merge this -- this affects the mlx4 ethernet
>> driver, so it's your area anyway.
> 
> Seems that net-next still doesn't have this. Can you please merge
> this?

I'll take care of this later today.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/mlx4/en_rx.c b/drivers/net/mlx4/en_rx.c
index 829b9ec..6439464 100644
--- a/drivers/net/mlx4/en_rx.c
+++ b/drivers/net/mlx4/en_rx.c
@@ -508,11 +508,11 @@  static struct sk_buff *mlx4_en_rx_skb(struct mlx4_en_priv *priv,
 		/* We are copying all relevant data to the skb - temporarily
 		 * synch buffers for the copy */
 		dma = be64_to_cpu(rx_desc->data[0].addr);
-		dma_sync_single_range_for_cpu(&mdev->pdev->dev, dma, 0,
-					      length, DMA_FROM_DEVICE);
+		dma_sync_single_for_cpu(&mdev->pdev->dev, dma, length,
+					DMA_FROM_DEVICE);
 		skb_copy_to_linear_data(skb, va, length);
-		dma_sync_single_range_for_device(&mdev->pdev->dev, dma, 0,
-						 length, DMA_FROM_DEVICE);
+		dma_sync_single_for_device(&mdev->pdev->dev, dma, length,
+					   DMA_FROM_DEVICE);
 		skb->tail += length;
 	} else {