net: add 'ethrotate' environment variable
[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> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>utp
parent
7f52fa3c2d
commit
e169257732
4
README
4
README
|
@ -2691,6 +2691,10 @@ Some configuration options can be set using Environment Variables:
|
||||||
=> setenv ethact SCC ETHERNET
|
=> setenv ethact SCC ETHERNET
|
||||||
=> ping 10.0.0.1 # traffic sent on 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
|
netretry - When set to "no" each network operation will
|
||||||
either succeed or fail without retrying.
|
either succeed or fail without retrying.
|
||||||
When set to "once" the network operation will
|
When set to "once" the network operation will
|
||||||
|
|
|
@ -525,6 +525,15 @@ int eth_receive(volatile void *packet, int length)
|
||||||
void eth_try_another(int first_restart)
|
void eth_try_another(int first_restart)
|
||||||
{
|
{
|
||||||
static struct eth_device *first_failed = NULL;
|
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)
|
if (!eth_current)
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue