[u-boot] net: ftgmac100: Reset FTGMAC100 before setting MAC

Joel Stanley joel at jms.id.au
Tue Feb 13 15:00:49 AEDT 2018


On Tue, Nov 21, 2017 at 3:02 PM, Huy Duong <quochuybk2010 at gmail.com> wrote:
> In ftgmac100_initialize(), FTGMAC100 is reset after MACs are set, hence
> all MACs set before will be erased. This patch moves ftgmac100_reset() to
> before ftgmac100_set_mac_from_env().
>
> Signed-off-by: Huy Duong <qhuyduong at hotmail.com>

Sorry for neglecting you patch.

This makes sense to me. Merged into v2016.07-aspeed-openbmc.

Cheers,

Joel

> ---
>  drivers/net/ftgmac100.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ftgmac100.c b/drivers/net/ftgmac100.c
> index 9d5ba98..5779057 100644
> --- a/drivers/net/ftgmac100.c
> +++ b/drivers/net/ftgmac100.c
> @@ -791,11 +791,11 @@ int ftgmac100_initialize(bd_t *bd)
>                 miiphy_register(dev->name, ftgmac100_reg_read, ftgmac100_reg_write);
>  #endif
>
> +               ftgmac100_reset(dev);
> +
>                 /* set the ethernet address */
>                 ftgmac100_set_mac_from_env(dev);
>
> -               ftgmac100_reset(dev);
> -
>                 card_number++;
>         }
>         return card_number;
> --
> 2.7.4
>


More information about the openbmc mailing list