diff mbox series

[v3,07/14] net: smc911x: remove the dmaengine compat need

Message ID 20180617170217.24177-8-robert.jarzmik@free.fr
State Not Applicable, archived
Delegated to: David Miller
Headers show
Series ARM: pxa: switch to DMA slave maps | expand

Commit Message

Robert Jarzmik June 17, 2018, 5:02 p.m. UTC
As the pxa architecture switched towards the dmaengine slave map, the
old compatibility mechanism to acquire the dma requestor line number and
priority are not needed anymore.

This patch simplifies the dma resource acquisition, using the more
generic function dma_request_slave_channel().

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
---
Since v2: converted to NULL filter function and NULL dma parameter call
---
 drivers/net/ethernet/smsc/smc911x.c | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

Comments

Robert Jarzmik June 20, 2018, 5:17 p.m. UTC | #1
Hi David,

I have converted all the pxa related drivers to DMA slave maps, the only 2 that
remain in my queue are touching your tree, ie. smc911x and smc91x (see [1]).

Once these 2 are done, I have my last dependency on the dma filter function
removed, and can queue the remaining cleanup patches.

Could you (or somebody from netdev) review it and either ack it (and I'll take
it through the pxa tree), or take it for v4.19 please ?

Cheers.

--
Robert

[1] Submission
Robert Jarzmik <robert.jarzmik@free.fr> writes:

> As the pxa architecture switched towards the dmaengine slave map, the
> old compatibility mechanism to acquire the dma requestor line number and
> priority are not needed anymore.
>
> This patch simplifies the dma resource acquisition, using the more
> generic function dma_request_slave_channel().
>
> Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
> ---
> Since v2: converted to NULL filter function and NULL dma parameter call
> ---
>  drivers/net/ethernet/smsc/smc911x.c | 13 ++-----------
>  1 file changed, 2 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/net/ethernet/smsc/smc911x.c b/drivers/net/ethernet/smsc/smc911x.c
> index 05157442a980..b1b53f6c452f 100644
> --- a/drivers/net/ethernet/smsc/smc911x.c
> +++ b/drivers/net/ethernet/smsc/smc911x.c
> @@ -74,7 +74,6 @@ static const char version[] =
>  #include <linux/skbuff.h>
>  
>  #include <linux/dmaengine.h>
> -#include <linux/dma/pxa-dma.h>
>  
>  #include <asm/io.h>
>  
> @@ -1795,7 +1794,6 @@ static int smc911x_probe(struct net_device *dev)
>  #ifdef SMC_USE_DMA
>  	struct dma_slave_config	config;
>  	dma_cap_mask_t mask;
> -	struct pxad_param param;
>  #endif
>  
>  	DBG(SMC_DEBUG_FUNC, dev, "--> %s\n", __func__);
> @@ -1971,15 +1969,8 @@ static int smc911x_probe(struct net_device *dev)
>  
>  	dma_cap_zero(mask);
>  	dma_cap_set(DMA_SLAVE, mask);
> -	param.prio = PXAD_PRIO_LOWEST;
> -	param.drcmr = -1UL;
> -
> -	lp->rxdma =
> -		dma_request_slave_channel_compat(mask, pxad_filter_fn,
> -						 &param, &dev->dev, "rx");
> -	lp->txdma =
> -		dma_request_slave_channel_compat(mask, pxad_filter_fn,
> -						 &param, &dev->dev, "tx");
> +	lp->rxdma = dma_request_channel(mask, NULL, NULL);
> +	lp->txdma = dma_request_channel(mask, NULL, NULL);
>  	lp->rxdma_active = 0;
>  	lp->txdma_active = 0;
David Miller June 20, 2018, 11:39 p.m. UTC | #2
From: Robert Jarzmik <robert.jarzmik@free.fr>
Date: Wed, 20 Jun 2018 19:17:43 +0200

> Could you (or somebody from netdev) review it and either ack it (and I'll take
> it through the pxa tree), or take it for v4.19 please ?

Acked-by: David S. Miller <davem@davemloft.net>
Robert Jarzmik June 21, 2018, 8:43 a.m. UTC | #3
David Miller <davem@davemloft.net> writes:

> From: Robert Jarzmik <robert.jarzmik@free.fr>
> Date: Wed, 20 Jun 2018 19:17:43 +0200
>
>> Could you (or somebody from netdev) review it and either ack it (and I'll take
>> it through the pxa tree), or take it for v4.19 please ?
>
> Acked-by: David S. Miller <davem@davemloft.net>
Thanks David.

Queued to pxa/for-next.

Cheers.
diff mbox series

Patch

diff --git a/drivers/net/ethernet/smsc/smc911x.c b/drivers/net/ethernet/smsc/smc911x.c
index 05157442a980..b1b53f6c452f 100644
--- a/drivers/net/ethernet/smsc/smc911x.c
+++ b/drivers/net/ethernet/smsc/smc911x.c
@@ -74,7 +74,6 @@  static const char version[] =
 #include <linux/skbuff.h>
 
 #include <linux/dmaengine.h>
-#include <linux/dma/pxa-dma.h>
 
 #include <asm/io.h>
 
@@ -1795,7 +1794,6 @@  static int smc911x_probe(struct net_device *dev)
 #ifdef SMC_USE_DMA
 	struct dma_slave_config	config;
 	dma_cap_mask_t mask;
-	struct pxad_param param;
 #endif
 
 	DBG(SMC_DEBUG_FUNC, dev, "--> %s\n", __func__);
@@ -1971,15 +1969,8 @@  static int smc911x_probe(struct net_device *dev)
 
 	dma_cap_zero(mask);
 	dma_cap_set(DMA_SLAVE, mask);
-	param.prio = PXAD_PRIO_LOWEST;
-	param.drcmr = -1UL;
-
-	lp->rxdma =
-		dma_request_slave_channel_compat(mask, pxad_filter_fn,
-						 &param, &dev->dev, "rx");
-	lp->txdma =
-		dma_request_slave_channel_compat(mask, pxad_filter_fn,
-						 &param, &dev->dev, "tx");
+	lp->rxdma = dma_request_channel(mask, NULL, NULL);
+	lp->txdma = dma_request_channel(mask, NULL, NULL);
 	lp->rxdma_active = 0;
 	lp->txdma_active = 0;