2020-01-07 12:37:19

by Jose Abreu

[permalink] [raw]
Subject: [PATCH net] net: stmmac: Fixed link does not need MDIO Bus

When using fixed link we don't need the MDIO bus support.

Reported-by: Heiko Stuebner <[email protected]>
Reported-by: kernelci.org bot <[email protected]>
Fixes: d3e014ec7d5e ("net: stmmac: platform: Fix MDIO init for platforms without PHY")
Signed-off-by: Jose Abreu <[email protected]>

---
Cc: Giuseppe Cavallaro <[email protected]>
Cc: Alexandre Torgue <[email protected]>
Cc: Jose Abreu <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Maxime Coquelin <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: Heiko Stuebner <[email protected]>
Cc: kernelci.org bot <[email protected]>
Cc: Florian Fainelli <[email protected]>
Cc: Sriram Dash <[email protected]>
---
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..4775f49d7f3b 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 = !of_phy_is_fixed_link(np);
static const struct of_device_id need_mdio_ids[] = {
{ .compatible = "snps,dwc-qos-ethernet-4.10" },
{},
--
2.7.4


2020-01-07 12:54:24

by Sriram Dash

[permalink] [raw]
Subject: RE: [PATCH net] net: stmmac: Fixed link does not need MDIO Bus

> From: Jose Abreu <[email protected]>
> Subject: [PATCH net] net: stmmac: Fixed link does not need MDIO Bus
>
> When using fixed link we don't need the MDIO bus support.
>
> Reported-by: Heiko Stuebner <[email protected]>
> Reported-by: kernelci.org bot <[email protected]>
> Fixes: d3e014ec7d5e ("net: stmmac: platform: Fix MDIO init for platforms
> without PHY")
> Signed-off-by: Jose Abreu <[email protected]>

Acked-by: Sriram Dash <[email protected]>

>
> ---
> Cc: Giuseppe Cavallaro <[email protected]>
> Cc: Alexandre Torgue <[email protected]>
> Cc: Jose Abreu <[email protected]>
> Cc: "David S. Miller" <[email protected]>
> Cc: Maxime Coquelin <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Cc: Heiko Stuebner <[email protected]>
> Cc: kernelci.org bot <[email protected]>
> Cc: Florian Fainelli <[email protected]>
> Cc: Sriram Dash <[email protected]>
> ---
> 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..4775f49d7f3b 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 = !of_phy_is_fixed_link(np);
> static const struct of_device_id need_mdio_ids[] = {
> { .compatible = "snps,dwc-qos-ethernet-4.10" },
> {},
> --
> 2.7.4


2020-01-07 13:31:47

by Patrice CHOTARD

[permalink] [raw]
Subject: Re: [Linux-stm32] [PATCH net] net: stmmac: Fixed link does not need MDIO Bus

Hi All

On 1/7/20 1:51 PM, Sriram Dash wrote:
>> From: Jose Abreu <[email protected]>
>> Subject: [PATCH net] net: stmmac: Fixed link does not need MDIO Bus
>>
>> When using fixed link we don't need the MDIO bus support.
>>
>> Reported-by: Heiko Stuebner <[email protected]>
>> Reported-by: kernelci.org bot <[email protected]>
>> Fixes: d3e014ec7d5e ("net: stmmac: platform: Fix MDIO init for platforms
>> without PHY")
>> Signed-off-by: Jose Abreu <[email protected]>
> Acked-by: Sriram Dash <[email protected]>

Tested on STiH410-B2260 board

Tested-by: Patrice Chotard <[email protected]>

Thanks

>> ---
>> Cc: Giuseppe Cavallaro <[email protected]>
>> Cc: Alexandre Torgue <[email protected]>
>> Cc: Jose Abreu <[email protected]>
>> Cc: "David S. Miller" <[email protected]>
>> Cc: Maxime Coquelin <[email protected]>
>> Cc: [email protected]
>> Cc: [email protected]
>> Cc: [email protected]
>> Cc: [email protected]
>> Cc: Heiko Stuebner <[email protected]>
>> Cc: kernelci.org bot <[email protected]>
>> Cc: Florian Fainelli <[email protected]>
>> Cc: Sriram Dash <[email protected]>
>> ---
>> 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..4775f49d7f3b 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 = !of_phy_is_fixed_link(np);
>> static const struct of_device_id need_mdio_ids[] = {
>> { .compatible = "snps,dwc-qos-ethernet-4.10" },
>> {},
>> --
>> 2.7.4
>
> _______________________________________________
> Linux-stm32 mailing list
> [email protected]
> https://st-md-mailman.stormreply.com/mailman/listinfo/linux-stm32

2020-01-07 14:26:08

by Neil Armstrong

[permalink] [raw]
Subject: Re: [PATCH net] net: stmmac: Fixed link does not need MDIO Bus

On 07/01/2020 13:35, Jose Abreu wrote:
> When using fixed link we don't need the MDIO bus support.
>
> Reported-by: Heiko Stuebner <[email protected]>
> Reported-by: kernelci.org bot <[email protected]>
> Fixes: d3e014ec7d5e ("net: stmmac: platform: Fix MDIO init for platforms without PHY")
> Signed-off-by: Jose Abreu <[email protected]>
>
> ---
> Cc: Giuseppe Cavallaro <[email protected]>
> Cc: Alexandre Torgue <[email protected]>
> Cc: Jose Abreu <[email protected]>
> Cc: "David S. Miller" <[email protected]>
> Cc: Maxime Coquelin <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Cc: Heiko Stuebner <[email protected]>
> Cc: kernelci.org bot <[email protected]>
> Cc: Florian Fainelli <[email protected]>
> Cc: Sriram Dash <[email protected]>
> ---
> 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..4775f49d7f3b 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 = !of_phy_is_fixed_link(np);
> static const struct of_device_id need_mdio_ids[] = {
> { .compatible = "snps,dwc-qos-ethernet-4.10" },
> {},
>

Acked-by: Neil Armstrong <[email protected]>

2020-01-07 14:42:44

by Heiko Stuebner

[permalink] [raw]
Subject: Re: [PATCH net] net: stmmac: Fixed link does not need MDIO Bus

Am Dienstag, 7. Januar 2020, 13:35:42 CET schrieb Jose Abreu:
> When using fixed link we don't need the MDIO bus support.
>
> Reported-by: Heiko Stuebner <[email protected]>
> Reported-by: kernelci.org bot <[email protected]>
> Fixes: d3e014ec7d5e ("net: stmmac: platform: Fix MDIO init for platforms without PHY")
> Signed-off-by: Jose Abreu <[email protected]>

On px30
Tested-by: Heiko Stuebner <[email protected]>


2020-01-07 19:06:52

by Florian Fainelli

[permalink] [raw]
Subject: Re: [PATCH net] net: stmmac: Fixed link does not need MDIO Bus

On 1/7/20 4:35 AM, Jose Abreu wrote:
> When using fixed link we don't need the MDIO bus support.
>
> Reported-by: Heiko Stuebner <[email protected]>
> Reported-by: kernelci.org bot <[email protected]>
> Fixes: d3e014ec7d5e ("net: stmmac: platform: Fix MDIO init for platforms without PHY")
> Signed-off-by: Jose Abreu <[email protected]>

Reviewed-by: Florian Fainelli <[email protected]>
Tested-by: Florian Fainelli <f.fainelli@gmail> # Lamobo R1 (fixed-link +
MDIO sub node for roboswitch).
--
Florian

2020-01-07 21:43:42

by David Miller

[permalink] [raw]
Subject: Re: [PATCH net] net: stmmac: Fixed link does not need MDIO Bus

From: Jose Abreu <[email protected]>
Date: Tue, 7 Jan 2020 13:35:42 +0100

> When using fixed link we don't need the MDIO bus support.
>
> Reported-by: Heiko Stuebner <[email protected]>
> Reported-by: kernelci.org bot <[email protected]>
> Fixes: d3e014ec7d5e ("net: stmmac: platform: Fix MDIO init for platforms without PHY")
> Signed-off-by: Jose Abreu <[email protected]>

Applied.

2020-01-07 21:44:34

by David Miller

[permalink] [raw]
Subject: Re: [PATCH net] net: stmmac: Fixed link does not need MDIO Bus

From: Florian Fainelli <[email protected]>
Date: Tue, 7 Jan 2020 11:05:07 -0800

> Reviewed-by: Florian Fainelli <[email protected]>
> Tested-by: Florian Fainelli <f.fainelli@gmail> # Lamobo R1 (fixed-link +
> MDIO sub node for roboswitch).

Florian please be careful not to let individual tags split into
multiple lines, I had to hand edit the second part of the Tested-by:
tag into the commit message.