All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Sriram Dash" <sriram.dash@samsung.com>
To: "'Florian Fainelli'" <f.fainelli@gmail.com>, <netdev@vger.kernel.org>
Cc: 'Jose Abreu' <Jose.Abreu@synopsys.com>,
	'Jayati Sahu' <jayati.sahu@samsung.com>,
	'Alexandre Torgue' <alexandre.torgue@st.com>,
	tomeu.vizoso@collabora.com, rcsekar@samsung.com,
	khilman@baylibre.com, mgalka@collabora.com,
	linux-kernel@vger.kernel.org,
	'Padmanabhan Rajanbabu' <p.rajanbabu@samsung.com>,
	linux-stm32@st-md-mailman.stormreply.com, broonie@kernel.org,
	pankaj.dubey@samsung.com,
	'Maxime Coquelin' <mcoquelin.stm32@gmail.com>,
	guillaume.tucker@collabora.com, enric.balletbo@collabora.com,
	'Giuseppe Cavallaro' <peppe.cavallaro@st.com>,
	"'David S. Miller'" <davem@davemloft.net>,
	linux-arm-kernel@lists.infradead.org, heiko@sntech.de
Subject: RE: [PATCH net] Revert "net: stmmac: platform: Fix MDIO init for platforms without PHY"
Date: Tue, 7 Jan 2020 11:16:36 +0530	[thread overview]
Message-ID: <011a01d5c51d$d7482290$85d867b0$@samsung.com> (raw)
In-Reply-To: <20200107050846.16838-1-f.fainelli@gmail.com>

> From: Florian Fainelli <f.fainelli@gmail.com>
> Subject: [PATCH net] Revert "net: stmmac: platform: Fix MDIO init for
platforms
> without PHY"
> 
> This reverts commit d3e014ec7d5ebe9644b5486bc530b91e62bbf624 ("net:
> stmmac: platform: Fix MDIO init for platforms without PHY") because it
breaks
> existing systems with stmmac which do not have a MDIO bus sub-node nor a
> 'phy-handle' property declared in their Device Tree. On those systems, the
> stmmac MDIO bus is expected to be created and then scanned by
> of_mdiobus_register() to create PHY devices.
> 
> While these systems should arguably make use of a more accurate Device
Tree
> reprensentation with the use of the MDIO bus sub-node an appropriate 'phy-
> handle', we cannot break them, therefore restore the behavior prior to the
said
> commit.
> 
> Fixes: d3e014ec7d5e ("net: stmmac: platform: Fix MDIO init for platforms
> without PHY")
> Reported-by: Heiko Stuebner <heiko@sntech.de>
> Reported-by: kernelci.org bot <bot@kernelci.org>
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Nacked-by: Sriram Dash <Sriram.dash@samsung.com>

> ---
> Heiko,
> 
> I did not add the Tested-by because the patch is a little bit different
from what
> you tested, even if you most likely were not hitting the other part that I
was
> changing. Thanks!
> 
>  drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> index cc8d7e7bf9ac..bedaff0c13bd 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> @@ -320,7 +320,7 @@ static int stmmac_mtl_setup(struct platform_device
> *pdev,  static int stmmac_dt_phy(struct plat_stmmacenet_data *plat,
>  			 struct device_node *np, struct device *dev)  {
> -	bool mdio = false;
> +	bool mdio = true;


This is breaking for the platforms with fixed-link.
stih418-b2199.dts and 169445.dts to name a few.

For the newer platforms, they should provide the mdio/ snps,dwmac-mdio
property in the device tree as we are checking the mdio/ snps,dwmac-mdio
property in the stmmac_platform driver for the mdio bus memory allocation.
For existing platforms, I agree we should not break them, but we should make
the code correct. And make the existing platforms adapt to the proper code.
There is a proposed solution. 
https://lkml.org/lkml/2020/1/7/14

What do you think?

>  	static const struct of_device_id need_mdio_ids[] = {
>  		{ .compatible = "snps,dwc-qos-ethernet-4.10" },
>  		{},
> --
> 2.19.1



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: "Sriram Dash" <sriram.dash@samsung.com>
To: "'Florian Fainelli'" <f.fainelli@gmail.com>, <netdev@vger.kernel.org>
Cc: <tomeu.vizoso@collabora.com>, <khilman@baylibre.com>,
	"'David S. Miller'" <davem@davemloft.net>, <mgalka@collabora.com>,
	<guillaume.tucker@collabora.com>, <broonie@kernel.org>,
	"'Jayati Sahu'" <jayati.sahu@samsung.com>,
	"'Padmanabhan Rajanbabu'" <p.rajanbabu@samsung.com>,
	<enric.balletbo@collabora.com>,
	"'Jose Abreu'" <Jose.Abreu@synopsys.com>,
	"'Alexandre Torgue'" <alexandre.torgue@st.com>,
	<linux-kernel@vger.kernel.org>,
	"'Maxime Coquelin'" <mcoquelin.stm32@gmail.com>,
	"'Giuseppe Cavallaro'" <peppe.cavallaro@st.com>,
	<linux-stm32@st-md-mailman.stormreply.com>,
	<linux-arm-kernel@lists.infradead.org>, <heiko@sntech.de>,
	<pankaj.dubey@samsung.com>, <rcsekar@samsung.com>
Subject: RE: [PATCH net] Revert "net: stmmac: platform: Fix MDIO init for platforms without PHY"
Date: Tue, 7 Jan 2020 11:16:36 +0530	[thread overview]
Message-ID: <011a01d5c51d$d7482290$85d867b0$@samsung.com> (raw)
In-Reply-To: <20200107050846.16838-1-f.fainelli@gmail.com>

> From: Florian Fainelli <f.fainelli@gmail.com>
> Subject: [PATCH net] Revert "net: stmmac: platform: Fix MDIO init for
platforms
> without PHY"
> 
> This reverts commit d3e014ec7d5ebe9644b5486bc530b91e62bbf624 ("net:
> stmmac: platform: Fix MDIO init for platforms without PHY") because it
breaks
> existing systems with stmmac which do not have a MDIO bus sub-node nor a
> 'phy-handle' property declared in their Device Tree. On those systems, the
> stmmac MDIO bus is expected to be created and then scanned by
> of_mdiobus_register() to create PHY devices.
> 
> While these systems should arguably make use of a more accurate Device
Tree
> reprensentation with the use of the MDIO bus sub-node an appropriate 'phy-
> handle', we cannot break them, therefore restore the behavior prior to the
said
> commit.
> 
> Fixes: d3e014ec7d5e ("net: stmmac: platform: Fix MDIO init for platforms
> without PHY")
> Reported-by: Heiko Stuebner <heiko@sntech.de>
> Reported-by: kernelci.org bot <bot@kernelci.org>
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Nacked-by: Sriram Dash <Sriram.dash@samsung.com>

> ---
> Heiko,
> 
> I did not add the Tested-by because the patch is a little bit different
from what
> you tested, even if you most likely were not hitting the other part that I
was
> changing. Thanks!
> 
>  drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> index cc8d7e7bf9ac..bedaff0c13bd 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> @@ -320,7 +320,7 @@ static int stmmac_mtl_setup(struct platform_device
> *pdev,  static int stmmac_dt_phy(struct plat_stmmacenet_data *plat,
>  			 struct device_node *np, struct device *dev)  {
> -	bool mdio = false;
> +	bool mdio = true;


This is breaking for the platforms with fixed-link.
stih418-b2199.dts and 169445.dts to name a few.

For the newer platforms, they should provide the mdio/ snps,dwmac-mdio
property in the device tree as we are checking the mdio/ snps,dwmac-mdio
property in the stmmac_platform driver for the mdio bus memory allocation.
For existing platforms, I agree we should not break them, but we should make
the code correct. And make the existing platforms adapt to the proper code.
There is a proposed solution. 
https://lkml.org/lkml/2020/1/7/14

What do you think?

>  	static const struct of_device_id need_mdio_ids[] = {
>  		{ .compatible = "snps,dwc-qos-ethernet-4.10" },
>  		{},
> --
> 2.19.1



  reply	other threads:[~2020-01-07  5:47 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20200107050854epcas1p3c1a66e67f14802322063f6c9747f1986@epcas1p3.samsung.com>
2020-01-07  5:08 ` [PATCH net] Revert "net: stmmac: platform: Fix MDIO init for platforms without PHY" Florian Fainelli
2020-01-07  5:08   ` Florian Fainelli
2020-01-07  5:46   ` Sriram Dash [this message]
2020-01-07  5:46     ` Sriram Dash
2020-01-07 10:46     ` Neil Armstrong
2020-01-07 10:46       ` Neil Armstrong
2020-01-07 10:56     ` Robin Murphy
2020-01-07 10:56       ` Robin Murphy
2020-01-07 12:14       ` Sriram Dash
2020-01-07 12:14         ` Sriram Dash
2020-01-07 12:36         ` Robin Murphy
2020-01-07 12:36           ` Robin Murphy
2020-01-07 12:36         ` Jose Abreu
2020-01-07 12:36           ` Jose Abreu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='011a01d5c51d$d7482290$85d867b0$@samsung.com' \
    --to=sriram.dash@samsung.com \
    --cc=Jose.Abreu@synopsys.com \
    --cc=alexandre.torgue@st.com \
    --cc=broonie@kernel.org \
    --cc=davem@davemloft.net \
    --cc=enric.balletbo@collabora.com \
    --cc=f.fainelli@gmail.com \
    --cc=guillaume.tucker@collabora.com \
    --cc=heiko@sntech.de \
    --cc=jayati.sahu@samsung.com \
    --cc=khilman@baylibre.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=mgalka@collabora.com \
    --cc=netdev@vger.kernel.org \
    --cc=p.rajanbabu@samsung.com \
    --cc=pankaj.dubey@samsung.com \
    --cc=peppe.cavallaro@st.com \
    --cc=rcsekar@samsung.com \
    --cc=tomeu.vizoso@collabora.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.