From: Ben Warren <biggerbadderben@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH V2] net: add 'ethrotate' environment variable
Date: Thu, 17 Jan 2008 09:48:25 -0500 [thread overview]
Message-ID: <478F6AB9.6080201@gmail.com> (raw)
In-Reply-To: <200801170745.06033.matthias.fuchs@esd-electronics.com>
Matthias Fuchs wrote:
> [PATCH] net: add 'ethrotate' environment variable
>
> This patch replaces the buildtime configuration option
> CONFIG_NET_DO_NOT_TRY_ANOTHER through the 'ethrotate' runtime
> configuration veriable. See README.
>
> Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
> ---
> README | 4 ++++
> net/eth.c | 9 +++++++++
> 2 files changed, 13 insertions(+), 0 deletions(-)
>
> diff --git a/README b/README
> index f2a4914..d9c2ee2 100644
> --- a/README
> +++ b/README
> @@ -2691,6 +2691,10 @@ Some configuration options can be set using Environment Variables:
> => setenv ethact SCC ETHERNET
> => ping 10.0.0.1 # traffic sent on SCC ETHERNET
>
> + ethrotate - When set to "no" U-Boot does not go through all
> + available network interfaces.
> + It just stays at the currently selected interface.
> +
> netretry - When set to "no" each network operation will
> either succeed or fail without retrying.
> When set to "once" the network operation will
> diff --git a/net/eth.c b/net/eth.c
> index 5d9e9c1..d55fd7e 100644
> --- a/net/eth.c
> +++ b/net/eth.c
> @@ -522,6 +522,15 @@ int eth_receive(volatile void *packet, int length)
> void eth_try_another(int first_restart)
> {
> static struct eth_device *first_failed = NULL;
> + char *ethrotate;
> +
> + /*
> + * Do not rotate between network interfaces when
> + * 'ethrotate' variable is set to 'no'.
> + */
> + if (((ethrotate = getenv ("ethrotate")) != NULL) &&
> + (strcmp(ethrotate, "no") == 0))
> + return;
>
> if (!eth_current)
> return;
>
Excellent! Applied.
thanks,
Ben
next prev parent reply other threads:[~2008-01-17 14:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-16 11:32 [U-Boot-Users] [PATCH] net: fix handling of 'ethrotate' environment variable Matthias Fuchs
2008-01-16 22:35 ` Ben Warren
2008-01-17 6:45 ` [U-Boot-Users] [PATCH V2] net: add " Matthias Fuchs
2008-01-17 14:48 ` Ben Warren [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-01-09 21:51 [U-Boot-Users] [PATCH] net: add 'ethtoggle' " Wolfgang Denk
2008-01-10 9:03 ` [U-Boot-Users] [PATCH V2] net: add 'ethrotate' " Matthias Fuchs
2008-01-10 16:21 ` Ben Warren
2008-01-12 2:49 ` Ben Warren
2008-01-16 11:31 ` Matthias Fuchs
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=478F6AB9.6080201@gmail.com \
--to=biggerbadderben@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.