All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Hershberger <joe.hershberger@ni.com>
To: u-boot@lists.denx.de
Subject: [PATCH] net: eth-uclass: Do not return error when no MAC is found
Date: Wed, 11 Mar 2020 12:14:54 -0500	[thread overview]
Message-ID: <CANr=Z=Y+J0SGf36hYYn=0ym2Vd9L=j8toE=UxXgLrWXTBKKg_g@mail.gmail.com> (raw)
In-Reply-To: <CAOMZO5COpzD0PVH3O1qy99psMod=68NOO8j1383Y49N+CJs0QQ@mail.gmail.com>

On Tue, Mar 10, 2020 at 1:34 PM Fabio Estevam <festevam@gmail.com> wrote:
>
> Hi Joe,
>
> On Tue, Mar 10, 2020 at 2:45 PM Joe Hershberger <joe.hershberger@ni.com> wrote:
>
> > I tried to apply this but it breaks the unit tests. I guess you didn't
> > try "ut dm" in sandbox?
> >
> > https://travis-ci.org/jhershbe/u-boot/builds/660395782
> >
> > Please test those and update the tests to pass with your change.
>
> Ok, I will revisit this patch after 2020.04.
>
> I think we should probably let net_random_ethaddr() run unconditionally:

That may be a better solution... with the warning of course.

Cheers,
-Joe

> --- a/net/eth-uclass.c
> +++ b/net/eth-uclass.c
> @@ -547,15 +547,9 @@ static int eth_post_probe(struct udevice *dev)
>                        dev->name);
>         } else if (is_zero_ethaddr(pdata->enetaddr) ||
>                    !is_valid_ethaddr(pdata->enetaddr)) {
> -#ifdef CONFIG_NET_RANDOM_ETHADDR
>                 net_random_ethaddr(pdata->enetaddr);
>                 printf("\nWarning: %s (eth%d) using random MAC address - %pM\n",
>                        dev->name, dev->seq, pdata->enetaddr);
> -#else
> -               printf("\nError: %s address not set.\n",
> -                      dev->name);
> -               return -EINVAL;
> -#endif
>         }
>
>         eth_write_hwaddr(dev);
>
> Thanks

  reply	other threads:[~2020-03-11 17:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-09 18:28 [PATCH] net: eth-uclass: Do not return error when no MAC is found Fabio Estevam
2020-02-13 18:42 ` Fabio Estevam
2020-03-05 23:21 ` Joe Hershberger
2020-03-10 17:44 ` Joe Hershberger
2020-03-10 18:34   ` Fabio Estevam
2020-03-11 17:14     ` Joe Hershberger [this message]
2020-03-11 17:19       ` Fabio Estevam

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='CANr=Z=Y+J0SGf36hYYn=0ym2Vd9L=j8toE=UxXgLrWXTBKKg_g@mail.gmail.com' \
    --to=joe.hershberger@ni.com \
    --cc=u-boot@lists.denx.de \
    /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.