[U-Boot] [U-boot] [PATCH 2/2] NET: QE: UEC: Allow uec re-initialization based on netretry environment variable.

richardretanubun richardretanubun at ruggedcom.com
Tue Aug 19 01:03:17 CEST 2008


Hi Ben,

Ben Warren wrote:
> richardretanubun wrote:
>> Allow uec_init to run more than once, based on the netretry 
>> environment variable.
>> This allows for manual (back and forth) switching between network 
>> interfaces.
>>
>>   
> Can't you do this by changing the 'ethactive' environment variable?
You are correct,  changing 'ethact' environment variable works if you 
are actually changing the network interface (say from "FSL UEC0" to "FSL 
UEC1")

I'm sorry for not adding this earlier.

The scenario I am trying to handle is if switching network interface fails.
I am trying to switch and activate specific network interfaces for 
testing and
often times the interface will fail to initialize and will have to be 
reinitialized

I am using these function call sequence to do activate the specific eth 
interface repeatedly:

void net_set_eth(char *newEthDev)
{
    ....
    setenv("ethact", newEthDev);
    eth_set_current();
    eth_init(gd->bd);
    ....
}

By adding the patch, I can just keep trying the same eth interface. The 
'ethrotate' environment variable will also work,
but only for rotating once, once a failure occur, there is no way to 
retry the same ethernet connection.

>
> regards,
> Ben

Hope this does not confuse more :)

- Richard.



More information about the U-Boot mailing list