Hi André,

Sorry for the delay on this.

> The Raspberry Pi firmware supports netbooting via tftp.
> When U-Boot is run this way as the kernel, the network in U-Boot
> is unstable resulting in multiple DHCP retries (sometimes no IP at all)
> and timeouts during U-Boots tftp transfers.
>
> It seems that the firmware does not completely reset the PHY and when
> U-Boot configures it, some settings are not correct.
> Reset the phy via phy_reset() during the bcmgenet_phy_init() call.

You've also sent a different patch [1] which appears to achieve the
same thing. Are the both needed? Is one better than the other? It
seems this is the cleaner mechanism but some more details would be
useful.

Peter

[1] 
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

> Signed-off-by: AndrĂ© Althaus <[email protected]>
>
> ---
> I tested it on a Raspberry Pi 4B. When booting U-Boot from an SD card,
> the network is stable, booting with the same files over the network
> and it is unstable. After appling the patch the network is also
> stable after netbooting.
> ---
>   drivers/net/bcmgenet.c | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/drivers/net/bcmgenet.c b/drivers/net/bcmgenet.c
> index a0264dc386d..f2253b25bc1 100644
> --- a/drivers/net/bcmgenet.c
> +++ b/drivers/net/bcmgenet.c
> @@ -522,6 +522,10 @@ static int bcmgenet_phy_init(struct
> bcmgenet_eth_priv *priv, void *dev)
>         if (!phydev)
>                 return -ENODEV;
>
> +       ret = phy_reset(phydev);
> +       if (ret)
> +               return ret;
> +
>         phydev->supported &= PHY_GBIT_FEATURES;
>         if (priv->speed) {
>                 ret = phy_set_supported(priv->phydev, priv->speed);
> --
> 2.55.0
>

Reply via email to