All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Hershberger <joe.hershberger@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4] net: allow setting env enetaddr from net device setting
Date: Wed, 4 Apr 2012 10:06:12 -0500	[thread overview]
Message-ID: <CANr=Z=Z-79dARYLywCgsRmcBammfN1vhxWAqdcZHG3Wo=4RLuw@mail.gmail.com> (raw)
In-Reply-To: <1331089414-15080-1-git-send-email-robherring2@gmail.com>

Hi Rob,

On Tue, Mar 6, 2012 at 9:03 PM, Rob Herring <robherring2@gmail.com> wrote:
> From: Rob Herring <rob.herring@calxeda.com>
>
> If the net driver has setup a valid ethernet address and an ethernet
> address is not set in the environment already, then set the environment
> variables from the net driver setting.
>
> This enables pxe booting on boards which don't set ethaddr env variable.
>
> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
> ---
> v4:
> - rewrite of documentation from Wolfgang
>
> v3:
> - print a warning if using mac address from the net device
>
> v2:
> - Re-wrote to always setup ethaddr env variables
>
> ?doc/README.enetaddr | ? ?6 +++++-
> ?net/eth.c ? ? ? ? ? | ? 21 ++++++++++++++++++---
> ?2 files changed, 23 insertions(+), 4 deletions(-)

checkpatch.pl failures:

-------------------------------------

ERROR: trailing whitespace
#48: FILE: doc/README.enetaddr:38:
+   If the environment variable is not set, it will be initialized from $

WARNING: line over 80 characters
#80: FILE: net/eth.c:184:
+       if (!eth_getenv_enetaddr_by_index(base_name, eth_number,
env_enetaddr)) {

total: 1 errors, 1 warnings, 45 lines checked

NOTE: whitespace errors detected, you may wish to use scripts/cleanpatch or
      scripts/cleanfile

NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX
MULTISTATEMENT_MACRO_USE_DO_WHILE

U-Boot-v4-net-allow-setting-env-enetaddr-from-net-device-setting.patch
has style problems, please review.

----------------------

Also, it seems that just because the enetaddr was read from dev
(possibly from an eeprom or elsewhere) doesn't mean that the MAC
doesn't need you to call write_hwaddr().  I think you shouldn't return
0 if you use the net device's addr, but rather should make the if
(memcmp... into an else if.

-Joe

  reply	other threads:[~2012-04-04 15:06 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-06  0:04 [U-Boot] [PATCH] pxe: get ethaddr from the current device instead of env Rob Herring
2011-12-06  3:50 ` Mike Frysinger
2011-12-06 10:41 ` Wolfgang Denk
2011-12-06 19:24 ` [U-Boot] [PATCH v2] net: allow setting env enetaddr from net device setting Rob Herring
2012-01-13 20:36   ` Wolfgang Denk
2012-02-01 23:27   ` [U-Boot] [PATCH v3] " Rob Herring
2012-03-06 13:37     ` Rob Herring
2012-03-06 19:30     ` Wolfgang Denk
2012-03-06 20:01       ` Rob Herring
2012-03-06 20:33         ` Wolfgang Denk
2012-03-07  3:03     ` [U-Boot] [PATCH v4] " Rob Herring
2012-04-04 15:06       ` Joe Hershberger [this message]
2012-04-15  4:06 ` [U-Boot] [PATCH v5] " Rob Herring
2012-07-11 18:30   ` Joe Hershberger

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=Z-79dARYLywCgsRmcBammfN1vhxWAqdcZHG3Wo=4RLuw@mail.gmail.com' \
    --to=joe.hershberger@gmail.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.