...
Demo board V3 consists of two Ethernet ports, you can choose to run set the two Ethernet ports in “An NIC with Daisy-chain” mode or “Dual NIC” mode. Refer to picture below:
...
where “Dual NIC Mode” is selected. You will have two Ethernet ports, eth0 and eth1, in Linux.
4. Save settings of ‘menuconfig' and go to top folder to run 'make all’ to build image.
5. Appendix
Besides selecting mode in ‘menuconfig’, Sunplus Ethernet driver also supports dynamic (run-time) mode-switching. That’s, even after Linux boots up, you can use ‘sysfs’ to switch operation mode. Just simply write a ‘mode’ character to ‘sysfs’. ‘mode’ character is defined as:
...
/ # echo 1 > /sys/devices/platform/soc@B/9c108000.l2sw/mode
Current operation mode of mode Ethernet driver can also be read out from ‘sysfs’. For example, issue the shell command as:
...
Dynamic mode-switching function can be turned off by simply disable the menu item “Support Dynamic Mode-switching by sysfs”. Refer the screen picture below:
...
4. Appendix: Three operation modes of Sunplus Ethernet driverSunplus Ethernet driver supports 3 operation modes:
...
In “Dual NIC mode”, Ethernet driver creates two net-device interfaces (eg: eth0 and eth1). Each has its dedicated LAN port. Packets will not be forwarded between two ports, unless you run some bridge utilities manually in Linux. Refer to diagram below, packets from eth0 will be always forwarded to LAN port 0 and packets from LAN port 0 will be always forwarded to eth0. The same theory is applied for eth1 and LAN port 1.
...