2018-06-21 11:43:36

by Bas Vermeulen

[permalink] [raw]
Subject: [PATCH] fman: don't set node on dpaa-ethernet platform device

Setting dev->node to the mac_node in dpaa_eth_add_device during probe
causes the mac_probe to be called again for the dpaa-ethernet.* device
that was just added.

Fix this by not setting dev->node, as it is not needed.

Signed-off-by: Bas Vermeulen <[email protected]>
---
drivers/net/ethernet/freescale/fman/mac.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/net/ethernet/freescale/fman/mac.c b/drivers/net/ethernet/freescale/fman/mac.c
index 387eb4a88b72..9a265f862065 100644
--- a/drivers/net/ethernet/freescale/fman/mac.c
+++ b/drivers/net/ethernet/freescale/fman/mac.c
@@ -623,7 +623,6 @@ static struct platform_device *dpaa_eth_add_device(int fman_id,
goto no_mem;
}

- pdev->dev.of_node = node;
pdev->dev.parent = priv->dev;
set_dma_ops(&pdev->dev, get_dma_ops(priv->dev));

--
2.17.1



2018-06-23 01:28:23

by David Miller

[permalink] [raw]
Subject: Re: [PATCH] fman: don't set node on dpaa-ethernet platform device

From: Bas Vermeulen <[email protected]>
Date: Thu, 21 Jun 2018 13:42:22 +0200

> Setting dev->node to the mac_node in dpaa_eth_add_device during probe
> causes the mac_probe to be called again for the dpaa-ethernet.* device
> that was just added.
>
> Fix this by not setting dev->node, as it is not needed.
>
> Signed-off-by: Bas Vermeulen <[email protected]>

This patch doesn't apply to the current sources.

2018-06-26 07:02:30

by Madalin-cristian Bucur

[permalink] [raw]
Subject: RE: [PATCH] fman: don't set node on dpaa-ethernet platform device

> -----Original Message-----
> From: David Miller [mailto:[email protected]]
> Sent: Saturday, June 23, 2018 4:27 AM
> To: [email protected]
> Cc: [email protected]; Madalin-cristian Bucur <[email protected]>;
> [email protected]
> Subject: Re: [PATCH] fman: don't set node on dpaa-ethernet platform device
>
> From: Bas Vermeulen <[email protected]>
> Date: Thu, 21 Jun 2018 13:42:22 +0200
>
> > Setting dev->node to the mac_node in dpaa_eth_add_device during probe
> > causes the mac_probe to be called again for the dpaa-ethernet.* device
> > that was just added.
> >
> > Fix this by not setting dev->node, as it is not needed.
> >
> > Signed-off-by: Bas Vermeulen <[email protected]>
>
> This patch doesn't apply to the current sources.

Hi,

The line the patch is trying to remove was added in this commit

commit a1a50c8e4c241a505b7270e1a3c6e50d94e794b1
Author: Florian Fainelli <[email protected]>
Date: Tue Aug 22 15:24:47 2017 -0700

fsl/man: Inherit parent device and of_node

and was already removed in this commit

commit 48167c9ce0b91c068430345bf039c7be23fa2f3f
Author: Madalin Bucur <[email protected]>
Date: Mon Oct 16 21:36:05 2017 +0300

fsl/fman: remove of_node

Regards,
Madalin