[U-Boot] [PATCH 34/34] drivers/net/fec: phy_init: remove redundant logic

The phy_connect_dev(...) function from phy.c does all the handling (inclusive catching fixed-link). So we drop here the single steps and call just phy_connect_dev(...). Signed-off-by: Hannes Schmelzer hannes.schmelzer@br-automation.com Acked-by: Joe Hershberger joe.hershberger@ni.com
Applied to u-boot-imx, master, thanks !
Best regards, Stefano Babic

Hi Stefano
On Wed, 2019-03-13 at 08:28 +0000, sbabic@denx.de wrote:
The phy_connect_dev(...) function from phy.c does all the handling (inclusive catching fixed-link). So we drop here the single steps and call just phy_connect_dev(...). Signed-off-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com
Acked-by: Joe Hershberger joe.hershberger@ni.com
Applied to u-boot-imx, master, thanks !
Best regards, Stefano Babic
Unfortunately, this commit broke Ethernet on the Vybrid. When re-basing my Colibri VF50/VF61 clean-up patch set ("colibri vybrid fixes, device tree enablement and driver model conversion") I noticed that Ethernet no longer works giving the following error messages:
Net: Could not get PHY for FEC0: addr -19 eth-1: fec@400d1000 Colibri VFxx # dhcp Could not get PHY for FEC0: addr -19 Could not get PHY for FEC0: addr -19 Could not get PHY for FEC0: addr -19 Could not get PHY for FEC0: addr -19 No ethernet found. Could not get PHY for FEC0: addr -19 Colibri VFxx #
Bisecting points to this commit and reverting it indeed makes it work again.
Has anybody else seen a similar issue (e.g. @Lukasz on pcm052)?
Cheers
Marcel

Hi Marcel,
Hi Stefano
On Wed, 2019-03-13 at 08:28 +0000, sbabic@denx.de wrote:
The phy_connect_dev(...) function from phy.c does all the handling (inclusive catching fixed-link). So we drop here the single steps and call just phy_connect_dev(...). Signed-off-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com
Acked-by: Joe Hershberger joe.hershberger@ni.com
Applied to u-boot-imx, master, thanks !
Best regards, Stefano Babic
Unfortunately, this commit broke Ethernet on the Vybrid. When re-basing my Colibri VF50/VF61 clean-up patch set ("colibri vybrid fixes, device tree enablement and driver model conversion") I noticed that Ethernet no longer works giving the following error messages:
Net: Could not get PHY for FEC0: addr -19 eth-1: fec@400d1000 Colibri VFxx # dhcp Could not get PHY for FEC0: addr -19 Could not get PHY for FEC0: addr -19 Could not get PHY for FEC0: addr -19 Could not get PHY for FEC0: addr -19 No ethernet found. Could not get PHY for FEC0: addr -19 Colibri VFxx #
Bisecting points to this commit and reverting it indeed makes it work again.
Has anybody else seen a similar issue (e.g. @Lukasz on pcm052)?
I did not checked yet - as I was waiting for the code to settle down to mainline (after the v2019.04 u-boot release).
I will check it on bk4.
Cheers
Marcel
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de

Dear Tom, Marcel, Stefano
Hi Marcel,
Hi Stefano
On Wed, 2019-03-13 at 08:28 +0000, sbabic@denx.de wrote:
The phy_connect_dev(...) function from phy.c does all the handling (inclusive catching fixed-link). So we drop here the single steps and call just phy_connect_dev(...). Signed-off-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com
Acked-by: Joe Hershberger joe.hershberger@ni.com
Applied to u-boot-imx, master, thanks !
Best regards, Stefano Babic
Unfortunately, this commit broke Ethernet on the Vybrid. When re-basing my Colibri VF50/VF61 clean-up patch set ("colibri vybrid fixes, device tree enablement and driver model conversion") I noticed that Ethernet no longer works giving the following error messages:
Net: Could not get PHY for FEC0: addr -19 eth-1: fec@400d1000 Colibri VFxx # dhcp Could not get PHY for FEC0: addr -19 Could not get PHY for FEC0: addr -19 Could not get PHY for FEC0: addr -19 Could not get PHY for FEC0: addr -19 No ethernet found. Could not get PHY for FEC0: addr -19 Colibri VFxx #
Bisecting points to this commit and reverting it indeed makes it work again.
Has anybody else seen a similar issue (e.g. @Lukasz on pcm052)?
I did not checked yet - as I was waiting for the code to settle down to mainline (after the v2019.04 u-boot release).
I will check it on bk4.
Maybe not on BK4, but surely on (HSC): CPU: Freescale i.MX53 rev2.1 at 800 MHz
=> dhcp Could not get PHY for FEC0: addr -19 Could not get PHY for FEC0: addr -19 Could not get PHY for FEC0: addr -19 Could not get PHY for FEC0: addr -19 No ethernet found. Could not get PHY for FEC0: addr -19
I can confirm the error.
So I do expect that we have some more IMX boards broken (imx53, vybrid).
I think that it would be best to revert this patch before v2019.04 release and look for clean up opportunities afterwards.
Cheers
Marcel
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de

HI Lukas,
please can you test with this patch:
But i agree, for 2019.04 it would be ok reverting this and then look if the provided patch can be applied.
Joe, what do you mean?
cheers, Hannes
Lukasz Majewski lukma@denx.de schrieb am 28.03.2019 11:47:34:
Von: Lukasz Majewski lukma@denx.de An: Marcel Ziswiler marcel.ziswiler@toradex.com, "sbabic@denx.de" sbabic@denx.de, Tom Rini trini@konsulko.com Kopie: "u-boot@lists.denx.de" u-boot@lists.denx.de,
"hannes.schmelzer@br-
automation.com" hannes.schmelzer@br-automation.com, Joe Hershberger joe.hershberger@ni.com Datum: 28.03.2019 11:47 Betreff: Re: [REGRESSION: PATCH 34/34] drivers/net/fec: phy_init: remove
redundant logic
Dear Tom, Marcel, Stefano
Hi Marcel,
Hi Stefano
On Wed, 2019-03-13 at 08:28 +0000, sbabic@denx.de wrote:
The phy_connect_dev(...) function from phy.c does all the handling (inclusive catching fixed-link). So we drop here the single steps and call just phy_connect_dev(...). Signed-off-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com
Acked-by: Joe Hershberger joe.hershberger@ni.com
Applied to u-boot-imx, master, thanks !
Best regards, Stefano Babic
Unfortunately, this commit broke Ethernet on the Vybrid. When re-basing my Colibri VF50/VF61 clean-up patch set ("colibri vybrid fixes, device tree enablement and driver model conversion") I noticed that Ethernet no longer works giving the following error messages:
Net: Could not get PHY for FEC0: addr -19 eth-1: fec@400d1000 Colibri VFxx # dhcp Could not get PHY for FEC0: addr -19 Could not get PHY for FEC0: addr -19 Could not get PHY for FEC0: addr -19 Could not get PHY for FEC0: addr -19 No ethernet found. Could not get PHY for FEC0: addr -19 Colibri VFxx #
Bisecting points to this commit and reverting it indeed makes it work again.
Has anybody else seen a similar issue (e.g. @Lukasz on pcm052)?
I did not checked yet - as I was waiting for the code to settle down to mainline (after the v2019.04 u-boot release).
I will check it on bk4.
Maybe not on BK4, but surely on (HSC): CPU: Freescale i.MX53 rev2.1 at 800 MHz
=> dhcp Could not get PHY for FEC0: addr -19 Could not get PHY for FEC0: addr -19 Could not get PHY for FEC0: addr -19 Could not get PHY for FEC0: addr -19 No ethernet found. Could not get PHY for FEC0: addr -19
I can confirm the error.
So I do expect that we have some more IMX boards broken (imx53, vybrid).
I think that it would be best to revert this patch before v2019.04 release and look for clean up opportunities afterwards.
Cheers
Marcel
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de [Anhang "att09yen.dat" gelöscht von Hannes Schmelzer/Gilgenberg/AT/B&R]

On 3/25/19 5:07 PM, Marcel Ziswiler wrote:
Hi Stefano
On Wed, 2019-03-13 at 08:28 +0000, sbabic@denx.de wrote:
The phy_connect_dev(...) function from phy.c does all the handling (inclusive catching fixed-link). So we drop here the single steps and call just phy_connect_dev(...). Signed-off-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com Acked-by: Joe Hershberger joe.hershberger@ni.com
Applied to u-boot-imx, master, thanks !
Best regards, Stefano Babic
Unfortunately, this commit broke Ethernet on the Vybrid. When re-basing my Colibri VF50/VF61 clean-up patch set ("colibri vybrid fixes, device tree enablement and driver model conversion") I noticed that Ethernet no longer works giving the following error messages:
Net: Could not get PHY for FEC0: addr -19 eth-1: fec@400d1000 Colibri VFxx # dhcp Could not get PHY for FEC0: addr -19 Could not get PHY for FEC0: addr -19 Could not get PHY for FEC0: addr -19 Could not get PHY for FEC0: addr -19 No ethernet found. Could not get PHY for FEC0: addr -19 Colibri VFxx #
Bisecting points to this commit and reverting it indeed makes it work again.
Has anybody else seen a similar issue (e.g. @Lukasz on pcm052)?
Hi, sorry for that issue. I will look into tomorrow, to see what happens there.
cheers, Hannes

On 3/25/19 5:07 PM, Marcel Ziswiler wrote:
Hi Stefano
On Wed, 2019-03-13 at 08:28 +0000, sbabic@denx.de wrote:
The phy_connect_dev(...) function from phy.c does all the handling (inclusive catching fixed-link). So we drop here the single steps and call just phy_connect_dev(...). Signed-off-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com Acked-by: Joe Hershberger joe.hershberger@ni.com
Applied to u-boot-imx, master, thanks !
Best regards, Stefano Babic
Unfortunately, this commit broke Ethernet on the Vybrid. When re-basing my Colibri VF50/VF61 clean-up patch set ("colibri vybrid fixes, device tree enablement and driver model conversion") I noticed that Ethernet no longer works giving the following error messages:
Net: Could not get PHY for FEC0: addr -19 eth-1: fec@400d1000 Colibri VFxx # dhcp Could not get PHY for FEC0: addr -19 Could not get PHY for FEC0: addr -19 Could not get PHY for FEC0: addr -19 Could not get PHY for FEC0: addr -19 No ethernet found. Could not get PHY for FEC0: addr -19 Colibri VFxx #
Bisecting points to this commit and reverting it indeed makes it work again.
Has anybody else seen a similar issue (e.g. @Lukasz on pcm052)?
Cheers
Marcel _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Hi Marcel, does this board use DM ? which defconfig uses the board?
cheers, Hannes

Hi Hannes
On Tue, 2019-03-26 at 10:15 +0100, Hannes Schmelzer wrote:
On 3/25/19 5:07 PM, Marcel Ziswiler wrote:
Hi Stefano
On Wed, 2019-03-13 at 08:28 +0000, sbabic@denx.de wrote:
The phy_connect_dev(...) function from phy.c does all the handling (inclusive catching fixed-link). So we drop here the single steps and call just phy_connect_dev(...). Signed-off-by: Hannes Schmelzer < hannes.schmelzer@br-automation.com Acked-by: Joe Hershberger joe.hershberger@ni.com
Applied to u-boot-imx, master, thanks !
Best regards, Stefano Babic
Unfortunately, this commit broke Ethernet on the Vybrid. When re- basing my Colibri VF50/VF61 clean-up patch set ("colibri vybrid fixes, device tree enablement and driver model conversion") I noticed that Ethernet no longer works giving the following error messages:
Net: Could not get PHY for FEC0: addr -19 eth-1: fec@400d1000 Colibri VFxx # dhcp Could not get PHY for FEC0: addr -19 Could not get PHY for FEC0: addr -19 Could not get PHY for FEC0: addr -19 Could not get PHY for FEC0: addr -19 No ethernet found. Could not get PHY for FEC0: addr -19 Colibri VFxx #
Bisecting points to this commit and reverting it indeed makes it work again.
Has anybody else seen a similar issue (e.g. @Lukasz on pcm052)?
Cheers
Marcel _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Hi Marcel, does this board use DM ?
Yes, I moved it to DM. The latest patch set is the following:
https://patchwork.ozlabs.org/cover/1064570/
Also available on our git server here:
http://git.toradex.com/cgit/u-boot-toradex.git/log/?h=for-next
which defconfig uses the board?
That would be colibri_vf_defconfig.
cheers, Hannes
Cheers
Marcel
participants (5)
-
Hannes Schmelzer
-
Hannes Schmelzer
-
Lukasz Majewski
-
Marcel Ziswiler
-
sbabic@denx.de