RE: [U-Boot-Users] U-boot automatic selection of redundant ethern et interfaces?

Thanks for your reply Wolfgang,
Try what happens when you "#define CONFIG_NET_MULTI" in your board config file. The primary interface can be selected using the "ethprime" environment variable.
Here is a quick snippet of the config file :-
/* * select ethernet configuration */ #undef CONFIG_ETHER_ON_SCC /* define if ethernet on SCC */ #define CONFIG_ETHER_ON_FCC /* define if ethernet on FCC */ #undef CONFIG_ETHER_NONE /* define if ethernet on neither */
#define CONFIG_NET_MULTI
#define CONFIG_ETHER_ON_FCC1 #define CONFIG_ETHER_ON_FCC2
#define CFG_CMXFCR_MASK1 (CMXFCR_FC1|CMXFCR_RF1CS_MSK|CMXFCR_TF1CS_MSK) #define CFG_CMXFCR_VALUE1 (CMXFCR_RF1CS_CLK10|CMXFCR_TF1CS_CLK9) #define CFG_CMXFCR_MASK2 (CMXFCR_FC2|CMXFCR_RF2CS_MSK|CMXFCR_TF2CS_MSK) #define CFG_CMXFCR_VALUE2 (CMXFCR_RF2CS_CLK14|CMXFCR_TF2CS_CLK13)
To be honest this is all I had to change, the addition of the ethprime env variable certainly helps as well, I'm not sure that I understand the intention of the code though. I was expecting the interfaces to be available similtaneously such that I could switch between them, perhaps this is not the case. I'll illustrate by using an example :-
U-Boot 0.4.0 (Oct 27 2003 - 12:28:40)
MPC8260 Reset Status: Software Watchdog, External Soft, External Hard
MPC8260 Clock Configuration - Bus-to-Core Mult 4x, VCO Div 2, 60x Bus Freq 25-75 , Core Freq 100-300 - dfbrg 1, corecnf 0x1a, busdf 5, cpmdf 1, plldf 0, pllmf 2 - vco_out 396000000, scc_clk 99000000, brg_clk 24750000 - cpu_clk 264000000, cpm_clk 198000000, bus_clk 66000000
CPU: MPC8260 (Rev 14, Mask B.1 4K25A) at 264 MHz Board: Arca Technologies 82xx, Revision 0.0 I2C: ready DRAM: 128 MB FLASH: 8 MB In: serial Out: serial Err: serial Net: FCC1 ETHERNET, FCC2 ETHERNET [PRIME] BEDBUG:ready Hit any key to stop autoboot: 0 /******Ping using FCC2*******/ => ping 192.168.0.121 host 192.168.0.121 is alive
/******Now disconnect FCC2*******/ /******Ping using FCC1*******/ => ping 192.168.0.121 ping failed; host 192.168.0.121 is not alive =>
If I switch the ethprime variable to FCC1 then reboot FCC1 works but FCC2 doesn't. Like I mentioned perhaps the problem is my understanding of the intention of the code rather than any misconfiguration on my part.
Any takers?
Me?
And I'm eternally grateful! :) It makes life a lot more bearable knowing that someone out there knows the solution to every problem!
Best wishes
Mark.

Dear Mark,
in message 9901EE1E8F8BD3119109009027A1B5F596AEBC@DIGINET2 you wrote:
Here is a quick snippet of the config file :-
...
To be honest this is all I had to change, the addition of the ethprime env variable certainly helps as well, I'm not sure that I understand the
Fine.
intention of the code though. I was expecting the interfaces to be available similtaneously such that I could switch between them, perhaps this is not the case. I'll illustrate by using an example :-
The intention is to provide redundand ethernet interfaces, so that U-Boot will start using the "primary" interface (as defined by the "ethprime" environment variable), but will automagically switch to the alternative interface(s) if a transfer fails.
BEDBUG:ready Hit any key to stop autoboot: 0 /******Ping using FCC2*******/ => ping 192.168.0.121 host 192.168.0.121 is alive
/******Now disconnect FCC2*******/ /******Ping using FCC1*******/ => ping 192.168.0.121 ping failed; host 192.168.0.121 is not alive =>
If I switch the ethprime variable to FCC1 then reboot FCC1 works but FCC2 doesn't. Like I mentioned perhaps the problem is my understanding of the intention of the code rather than any misconfiguration on my part.
I don't know if the "ping" code takes redundand ethernet interfaces into account, i. e. if it will toggle interfaces. I don't even know if this makes sense - "ping" is intended to test if somebody is responding, and it makes probably no sense here to distinguish between the remote ost being down or cable disconnected or interface broken.
It's a differetn issue with a network boot (dhcp, bootp or tftp command) - you expect these to work, and if they are failingit seems a good idea to try an alternative inteface if there is one.
And I'm eternally grateful! :) It makes life a lot more bearable knowing that someone out there knows the solution to every problem!
Every problem? You must be joking!
Best regards,
Wolfgang Denk
participants (2)
-
Mark Doherty
-
Wolfgang Denk