[PATCH 0/2] fix loadable module for DPAA Ethernet

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[PATCH 0/2] fix loadable module for DPAA Ethernet

Madalin Bucur-2
The DPAA Ethernet makes use of a symbol that is not exported.
Address the issue by propagating the dma_ops rather than calling
arch_setup_dma_ops().

Madalin Bucur (2):
  fsl/fman: propagate dma_ops
  dpaa_eth: reuse the dma_ops provided by the FMan MAC device

 drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 2 +-
 drivers/net/ethernet/freescale/fman/mac.c      | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

--
2.1.0

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[PATCH 1/2] fsl/fman: propagate dma_ops

Madalin Bucur-2
Make sure dma_ops are set, to be later used by the Ethernet driver.

Signed-off-by: Madalin Bucur <[hidden email]>
---
 drivers/net/ethernet/freescale/fman/mac.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/freescale/fman/mac.c b/drivers/net/ethernet/freescale/fman/mac.c
index 0b31f85..6e67d22f 100644
--- a/drivers/net/ethernet/freescale/fman/mac.c
+++ b/drivers/net/ethernet/freescale/fman/mac.c
@@ -623,6 +623,8 @@ static struct platform_device *dpaa_eth_add_device(int fman_id,
  goto no_mem;
  }
 
+ set_dma_ops(&pdev->dev, get_dma_ops(priv->dev));
+
  ret = platform_device_add_data(pdev, &data, sizeof(data));
  if (ret)
  goto err;
--
2.1.0

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[PATCH 2/2] dpaa_eth: reuse the dma_ops provided by the FMan MAC device

Madalin Bucur-2
In reply to this post by Madalin Bucur-2
Remove the use of arch_setup_dma_ops() that was not exported
and was breaking loadable module compilation.

Signed-off-by: Madalin Bucur <[hidden email]>
---
 drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
index 9a520e4..290ad05 100644
--- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
+++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
@@ -2647,7 +2647,7 @@ static int dpaa_eth_probe(struct platform_device *pdev)
  priv->buf_layout[TX].priv_data_size = DPAA_TX_PRIV_DATA_SIZE; /* Tx */
 
  /* device used for DMA mapping */
- arch_setup_dma_ops(dev, 0, 0, NULL, false);
+ set_dma_ops(dev, get_dma_ops(&pdev->dev));
  err = dma_coerce_mask_and_coherent(dev, DMA_BIT_MASK(40));
  if (err) {
  dev_err(dev, "dma_coerce_mask_and_coherent() failed\n");
--
2.1.0

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH 0/2] fix loadable module for DPAA Ethernet

David Miller-13
In reply to this post by Madalin Bucur-2
From: Madalin Bucur <[hidden email]>
Date: Mon, 19 Jun 2017 18:04:15 +0300

> The DPAA Ethernet makes use of a symbol that is not exported.
> Address the issue by propagating the dma_ops rather than calling
> arch_setup_dma_ops().

Series applied, thanks.
Loading...