From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Warren Date: Wed, 16 Jan 2008 17:35:49 -0500 Subject: [U-Boot-Users] [PATCH] net: fix handling of 'ethrotate' environment variable In-Reply-To: <200801161232.51971.matthias.fuchs@esd-electronics.com> References: <200801161232.51971.matthias.fuchs@esd-electronics.com> Message-ID: <478E86C5.1070405@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Matthias, Matthias Fuchs wrote: > Signed-off-by: Matthias Fuchs > --- > net/eth.c | 9 +++++++++ > net/net.c | 9 +-------- > 2 files changed, 10 insertions(+), 8 deletions(-) > > 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; > diff --git a/net/net.c b/net/net.c > index e1b71a9..522c54d 100644 > --- a/net/net.c > +++ b/net/net.c > @@ -581,7 +581,6 @@ void NetStartAgain (void) > { > char *nretry; > int noretry = 0, once = 0; > - char *ethrotate; > > if ((nretry = getenv ("netretry")) != NULL) { > noretry = (strcmp (nretry, "no") == 0); > @@ -598,13 +597,7 @@ void NetStartAgain (void) > #else /* !CONFIG_NET_MULTI*/ > eth_halt (); > > - /* > - * Do not rotate between network interfaces when > - * 'ethrotate' variable is set to 'no'. > - */ > - if (((ethrotate = getenv ("ethrotate")) == NULL) || > - (strcmp(ethrotate, "no") != 0)) > - eth_try_another (!NetRestarted); > + eth_try_another (!NetRestarted); > > eth_init (gd->bd); > if (NetRestartWrap) { > Sorry, but this patch implies application of the previous patch, which was rejected. Please re-base against TOT. I tried to patch things manually but it wasn't cooperating and I have other things I need to do. regards, Ben