Re: [PATCH 0/3] Dual EMAC mode implementation of CPSW
On 18/04/13 17:01, Mark Jackson wrote: On 15/04/13 18:34, Mugunthan V N wrote: On 4/15/2013 10:58 PM, Mark Jackson wrote: On 15/04/13 18:07, Mugunthan V N wrote: On 4/15/2013 12:46 AM, Mark Jackson wrote: snip Notice that at the end, the nfs link appears to come back ok, but the ps command never completes. Any ideas of what's going on ? I have tried ping on both the interface fine. Will verify with ps again later in this week. Can you provide below details details - Are you using EVMsk or custom build EVM? This is a custom board (based on the BeagleBone design) with dual Ethernet, NAND, NOR and FRAM. The dual emac thing is (one of) the last things to get signed off, so I'm willing to assist in tracking this down. After testing the scenario i may be able to send you an update later in this week. I have made some progress ... I realised I was missing a (clearly rather important !!) item in my .config file, namely CONFIG_TI_DAVINCI_EMAC. I am now able to ping from our board to other systems on the network (again, I've only tested eth0 at the moment). However, I am unable to ping everything I should be able to !! snip When the pings fail, I am unable to see *any* activity on the network (using wireshark). Is there anything else I should try ? Mugunthan Can you confirm that I'm actually trying to achieve the right thing ? I have all along assumed that Dual EMAC mode would simply provide the kernel will a pair of independent Ethernet ports. All I am trying to do is to get both Ethernet ports working so I can have one port on (say) 10.0.x.x and the other on (say) 10.1.x.x But there is all this reference to VLANs(in the source code and the TRM) ... I have not setup any VLANs. Do I need to ? If so, how ? Cheers Mark J. -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/3] Dual EMAC mode implementation of CPSW
On 4/22/2013 7:37 PM, Mark Jackson wrote: Mugunthan Can you confirm that I'm actually trying to achieve the right thing ? I have all along assumed that Dual EMAC mode would simply provide the kernel will a pair of independent Ethernet ports. Yes, it will provide two network interfaces for ex eth0 and eth1 All I am trying to do is to get both Ethernet ports working so I can have one port on (say) 10.0.x.x and the other on (say) 10.1.x.x This is perfectly correct But there is all this reference to VLANs(in the source code and the TRM) ... I have not setup any VLANs. Do I need to ? If so, how ? No need to setup any VLAN. VLAN are used to segregate the two down stream ports and it will be taken care by the driver Regards Mugunthan V N -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/3] Dual EMAC mode implementation of CPSW
On 22/04/13 18:01, Mugunthan V N wrote: On 4/22/2013 7:37 PM, Mark Jackson wrote: Mugunthan Can you confirm that I'm actually trying to achieve the right thing ? I have all along assumed that Dual EMAC mode would simply provide the kernel will a pair of independent Ethernet ports. Yes, it will provide two network interfaces for ex eth0 and eth1 All I am trying to do is to get both Ethernet ports working so I can have one port on (say) 10.0.x.x and the other on (say) 10.1.x.x This is perfectly correct But there is all this reference to VLANs(in the source code and the TRM) ... I have not setup any VLANs. Do I need to ? If so, how ? No need to setup any VLAN. VLAN are used to segregate the two down stream ports and it will be taken care by the driver Mugunthan I now have this all working, thanks to Markus Brunner who spotted that the CPSW_VLAN_AWARE bit is being incorrectly set rather than cleared in cpsw_init_host_port(). I think he will be posting a patch soon. Regards Mark J. -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/3] Dual EMAC mode implementation of CPSW
On 15/04/13 18:34, Mugunthan V N wrote: On 4/15/2013 10:58 PM, Mark Jackson wrote: On 15/04/13 18:07, Mugunthan V N wrote: On 4/15/2013 12:46 AM, Mark Jackson wrote: snip Notice that at the end, the nfs link appears to come back ok, but the ps command never completes. Any ideas of what's going on ? I have tried ping on both the interface fine. Will verify with ps again later in this week. Can you provide below details details - Are you using EVMsk or custom build EVM? This is a custom board (based on the BeagleBone design) with dual Ethernet, NAND, NOR and FRAM. The dual emac thing is (one of) the last things to get signed off, so I'm willing to assist in tracking this down. After testing the scenario i may be able to send you an update later in this week. I have made some progress ... I realised I was missing a (clearly rather important !!) item in my .config file, namely CONFIG_TI_DAVINCI_EMAC. I am now able to ping from our board to other systems on the network (again, I've only tested eth0 at the moment). However, I am unable to ping everything I should be able to !! Here's my setup ... # cat /etc/network/interfaces # Configure Loopback auto lo eth0 eth1 iface lo inet loopback iface eth1 inet static address 10.1.101.111 netmask 255.255.0.0 gateway 10.1.0.1 iface eth0 inet static address 10.0.101.111 netmask 255.255.0.0 gateway 10.0.0.1 # ifconfig eth0 Link encap:Ethernet HWaddr C2:21:5E:B4:06:5E inet addr:10.0.101.111 Bcast:0.0.0.0 Mask:255.255.0.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:67 errors:0 dropped:0 overruns:0 frame:0 TX packets:62 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:8848 (8.6 KiB) TX bytes:4290 (4.1 KiB) Interrupt:56 eth1 Link encap:Ethernet HWaddr D6:2F:CF:39:22:4E inet addr:10.1.101.111 Bcast:0.0.0.0 Mask:255.255.0.0 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) loLink encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:38 errors:0 dropped:0 overruns:0 frame:0 TX packets:38 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:4022 (3.9 KiB) TX bytes:4022 (3.9 KiB) # route -n Kernel IP routing table Destination Gateway Genmask Flags Metric RefUse Iface 0.0.0.0 10.0.0.10.0.0.0 UG0 00 eth0 10.0.0.00.0.0.0 255.255.0.0 U 0 00 eth0 10.1.0.00.0.0.0 255.255.0.0 U 0 00 eth1 I can ping a couple of units on 10.0.0.x ... # ping 10.0.0.120 PING 10.0.0.120 (10.0.0.120): 56 data bytes 64 bytes from 10.0.0.120: seq=0 ttl=64 time=0.955 ms 64 bytes from 10.0.0.120: seq=1 ttl=64 time=0.676 ms 64 bytes from 10.0.0.120: seq=2 ttl=64 time=0.732 ms 64 bytes from 10.0.0.120: seq=3 ttl=64 time=0.762 ms --- 10.0.0.120 ping statistics --- 4 packets transmitted, 4 packets received, 0% packet loss round-trip min/avg/max = 0.676/0.781/0.955 ms # ping 10.0.0.5 PING 10.0.0.5 (10.0.0.5): 56 data bytes 64 bytes from 10.0.0.5: seq=0 ttl=64 time=1.815 ms 64 bytes from 10.0.0.5: seq=1 ttl=64 time=0.458 ms 64 bytes from 10.0.0.5: seq=2 ttl=64 time=0.474 ms 64 bytes from 10.0.0.5: seq=3 ttl=64 time=0.345 ms 64 bytes from 10.0.0.5: seq=4 ttl=64 time=0.329 ms --- 10.0.0.5 ping statistics --- 5 packets transmitted, 5 packets received, 0% packet loss round-trip min/avg/max = 0.329/0.684/1.815 ms But *not* my router on the same subnet ... # ping 10.0.0.1 PING 10.0.0.1 (10.0.0.1): 56 data bytes --- 10.0.0.1 ping statistics --- 15 packets transmitted, 0 packets received, 100% packet loss I am also unable to ping other equipment that exists:- # ping 10.0.101.2 PING 10.0.101.2 (10.0.101.2): 56 data bytes --- 10.0.101.2 ping statistics --- 6 packets transmitted, 0 packets received, 100% packet loss # ping 10.0.200.2 PING 10.0.200.2 (10.0.200.2): 56 data bytes --- 10.0.200.2 ping statistics --- 5 packets transmitted, 0 packets received, 100% packet loss Just to prove these other item do exist, here's me pinging them from another Linux VM (working off the same physical switch):- mpfj@mpfj-nanobone:~/linux/linux-2.6$ ifconfig eth0 Link encap:Ethernet HWaddr 08:00:27:1e:0d:f5 inet addr:10.0.0.120 Bcast:10.0.255.255 Mask:255.255.0.0 inet6 addr: fe80::a00:27ff:fe1e:df5/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:135935 errors:0 dropped:0 overruns:0 frame:0 TX packets:172692 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000
Re: [PATCH 0/3] Dual EMAC mode implementation of CPSW
On 15/04/13 18:34, Mugunthan V N wrote: On 4/15/2013 10:58 PM, Mark Jackson wrote: On 15/04/13 18:07, Mugunthan V N wrote: On 4/15/2013 12:46 AM, Mark Jackson wrote: snip Notice that at the end, the nfs link appears to come back ok, but the ps command never completes. Any ideas of what's going on ? I have tried ping on both the interface fine. Will verify with ps again later in this week. Can you provide below details details - Are you using EVMsk or custom build EVM? This is a custom board (based on the BeagleBone design) with dual Ethernet, NAND, NOR and FRAM. The dual emac thing is (one of) the last things to get signed off, so I'm willing to assist in tracking this down. After testing the scenario i may be able to send you an update later in this week. Just a quick update ... I've now setup our board to boot entirely from NAND (UBoot - Kernel - UBIFS) so that I'm no longer using NFS (just to isolate any issues there). I am still *unable* to get a connection on either Ethernet port. *HOWEVER* ... I *can* ping my board from another PC on the network:- mpfj@mpfj-nanobone:~/uboot/u-boot$ ping 10.0.101.111 -c 5 PING 10.0.101.111 (10.0.101.111) 56(84) bytes of data. 64 bytes from 10.0.101.111: icmp_req=1 ttl=64 time=0.692 ms 64 bytes from 10.0.101.111: icmp_req=2 ttl=64 time=0.551 ms 64 bytes from 10.0.101.111: icmp_req=3 ttl=64 time=0.462 ms 64 bytes from 10.0.101.111: icmp_req=4 ttl=64 time=0.409 ms 64 bytes from 10.0.101.111: icmp_req=5 ttl=64 time=0.344 ms --- 10.0.101.111 ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 3998ms rtt min/avg/max/mdev = 0.344/0.491/0.692/0.123 ms So I can't ping *out*, but I can ping *in* !! Note that I've only tried this ping test to/from eth0 ... I'll setup another box on the correct IP range so I can also test eth1. I've added my boot log below. Cheers Mark J. --- U-Boot SPL 2013.04-rc2-00065-g7450e4d-dirty (Apr 16 2013 - 11:36:17) U-Boot 2013.04-rc2-00065-g7450e4d-dirty (Apr 16 2013 - 11:36:17) I2C: ready DRAM: 256 MiB WARNING: Caches not enabled NAND: 256 MiB MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1 Net: cpsw:0 is connected to cpsw. Reconnecting to cpsw cpsw Hit any key to stop autoboot: 0 NAND read: device 0 offset 0x20, size 0x40 4194304 bytes read: OK ## Booting kernel from Legacy Image at 8020 ... Image Name: Linux 3.9.0-rc7-00023-gfcc38a5 Image Type: ARM Linux Kernel Image (uncompressed) Data Size:2997518 Bytes = 2.9 MiB Load Address: 80008000 Entry Point: 80008000 Verifying Checksum ... OK Loading Kernel Image ... OK OK Starting kernel ... [0.00] Booting Linux on physical CPU 0x0 [0.00] Linux version 3.9.0-rc7-00023-gfcc38a5 (mpfj@mpfj-nanobone) (gcc version 4.5.4 (Buildroot 2012.11) ) #156 Tue Apr 16 08:55:28 BST 2013 [0.00] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7d [0.00] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache [0.00] Machine: Generic AM33XX (Flattened Device Tree), model: Newflow AM335x NanoBone [0.00] debug: ignoring loglevel setting. [0.00] Memory policy: ECC disabled, Data cache writeback [0.00] On node 0 totalpages: 65280 [0.00] free_area_init_node: node 0, pgdat c059a858, node_mem_map c0ac4000 [0.00] Normal zone: 512 pages used for memmap [0.00] Normal zone: 0 pages reserved [0.00] Normal zone: 65280 pages, LIFO batch:15 [0.00] CPU: All CPU(s) started in SVC mode. [0.00] AM335X ES1.0 (neon ) [0.00] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768 [0.00] pcpu-alloc: [0] 0 [0.00] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 64768 [0.00] Kernel command line: console=ttyO0,115200n8 noinitrd ip=off mem=256M rootwait=1 ubi.mtd=4,2048 rootfstype=ubifs root=ubi0:rootfs ignore_loglevel [0.00] PID hash table entries: 1024 (order: 0, 4096 bytes) [0.00] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes) [0.00] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes) [0.00] __ex_table already sorted, skipping sort [0.00] Memory: 255MB = 255MB total [0.00] Memory: 247776k/247776k available, 14368k reserved, 0K highmem [0.00] Virtual kernel memory layout: [0.00] vector : 0x - 0x1000 ( 4 kB) [0.00] fixmap : 0xfff0 - 0xfffe ( 896 kB) [0.00] vmalloc : 0xd080 - 0xff00 ( 744 MB) [0.00] lowmem : 0xc000 - 0xd000 ( 256 MB) [0.00] pkmap : 0xbfe0 - 0xc000 ( 2 MB) [0.00] .text : 0xc0008000 - 0xc0517550 (5182 kB) [0.00] .init : 0xc0518000 - 0xc0549fdc ( 200 kB) [0.00] .data : 0xc054a000 - 0xc059b420 ( 326 kB) [0.00].bss : 0xc059b420 - 0xc0ac0210 (5268 kB) [0.00]
Re: [PATCH 0/3] Dual EMAC mode implementation of CPSW
On 4/15/2013 12:46 AM, Mark Jackson wrote: On 11/02/13 19:52, Mugunthan V N wrote: This patch series implements Dual EMAC mode implementation of CPSW which acts as two standalone EMAC by segregating the switch using VIDs and port VLAN Mugunthan V N (3): driver: net: ethernet: davinci_cpdma: add support for directed packet and source port detection driver: net: ethernet: cpsw: make cpts as pointer driver: net: ethernet: cpsw: dual emac interface implementation Documentation/devicetree/bindings/net/cpsw.txt |2 + drivers/net/ethernet/ti/cpsw.c | 387 +++- drivers/net/ethernet/ti/davinci_cpdma.c| 17 +- drivers/net/ethernet/ti/davinci_cpdma.h|4 +- drivers/net/ethernet/ti/davinci_emac.c |6 +- include/linux/platform_data/cpsw.h |3 + 6 files changed, 338 insertions(+), 81 deletions(-) I'm trying to get dual emac mode working, but I'm only having partial success. We have a custom AM335x board with dual LAN8710 PYHs, but the basic design is based on the BeagleBone board. I have the following in my .dts file:- mac: ethernet@4a10 { dual_emac = 1; cpsw_emac0: slave@4a100200 { dual_emac_res_vlan = 1; }; cpsw_emac1: slave@4a100300 { dual_emac_res_vlan = 2; }; }; When I boot my board (across nfs via eth1):- (a) the kernel is loaded (via tftp under U-Boot) (b) the kernel mounts the nfsroot (c) my init scripts are run (e.g. dropbear) (d) the shell prompt appears So far so good, but when I then try any shell command (e.g. ps) the nfs link just hangs. Below is an extract from the boot messages:- [0.00] Booting Linux on physical CPU 0x0 [0.00] Linux version 3.9.0-rc6-00186-g5b55d70-dirty (mpfj@mpfj-nanobone) (gcc version 4.7.2 (Buildroot 2013.02-00154-g851ceaa) ) #19 Sun Apr 14 19:50:21 BST 2013 [0.00] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7d [0.00] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache [0.00] Machine: Generic AM33XX (Flattened Device Tree), model: Newflow AM335x NanoBone [0.00] Memory policy: ECC disabled, Data cache writeback [0.00] CPU: All CPU(s) started in SVC mode. [0.00] AM335X ES1.0 (neon ) [0.00] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 64768 [0.00] Kernel command line: root=/dev/nfs nfsroot=10.1.0.111:/tftpboot/nanobone/rootfs rw ip=10.1.0.199:10.1.0.111:10.1.0.1:255.255.0.0::eth1:off console=ttyO0,115200 ... [1.424977] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6 [1.431443] davinci_mdio 4a101000.mdio: detected phy mask fffc [1.440939] libphy: 4a101000.mdio: probed [1.445266] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver SMSC LAN8710/LAN8720 [1.454962] davinci_mdio 4a101000.mdio: phy[1]: device 4a101000.mdio:01, driver SMSC LAN8710/LAN8720 [1.465059] Random MACID = a2:3f:fb:2c:47:d9 [1.472276] cpsw: Random MACID = ae:d5:c0:c0:27:03 [1.480588] rtc-ds1307 0-0068: setting system clock to 2013-04-14 19:59:52 UTC (1365969592) [1.491543] net eth1: initializing cpsw version 1.12 (0) [1.516965] net eth1: phy found : id is : 0x7c0f1 [4.595479] libphy: 4a101000.mdio:01 - Link is Up - 100/Full [4.625872] IP-Config: Complete: [4.629307] device=eth1, hwaddr=ae:d5:c0:c0:27:03, ipaddr=10.1.0.199, mask=255.255.0.0, gw=10.1.0.1 [4.639365] host=10.1.0.199, domain=, nis-domain=(none) [4.645359] bootserver=10.1.0.111, rootserver=10.1.0.111, rootpath= [4.674219] VFS: Mounted root (nfs filesystem) on device 0:12. [4.682438] devtmpfs: mounted [4.686042] Freeing init memory: 196K Starting logging: OK Initializing random number generator... done. Starting network... ip: RTNETLINK answers: File exists [5.340677] net eth0: initializing cpsw version 1.12 (0) [5.366463] net eth0: phy found : id is : 0x7c0f1 ip: RTNETLINK answers: File exists ip: RTNETLINK answers: File exists ip: RTNETLINK answers: File exists Starting dropbear sshd: OK Welcome to Buildroot nanobone login: root Password: # ps [ 18.845266] nfs: server 10.1.0.111 not responding, still trying At this point, I can disconnect my network cable from eth1 and connect to eth0, and back again which shows the PYHs appear to be detecting the link up/down status of each port. [ 562.675229] libphy: 4a101000.mdio:01 - Link is Down [ 567.885586] libphy: 4a101000.mdio:00 - Link is Up - 100/Full [ 571.965156] libphy: 4a101000.mdio:00 - Link is Down [ 575.014943] nfs: server 10.1.0.111 not responding, still trying [ 576.635412] libphy: 4a101000.mdio:01 - Link is Up - 100/Full [ 579.426051] nfs: server 10.1.0.111 OK Notice that at the end, the nfs link appears to come back ok, but the ps command never completes. Any ideas of what's going on ? I have tried ping on both the interface fine. Will
Re: [PATCH 0/3] Dual EMAC mode implementation of CPSW
On 15/04/13 18:07, Mugunthan V N wrote: On 4/15/2013 12:46 AM, Mark Jackson wrote: snip Notice that at the end, the nfs link appears to come back ok, but the ps command never completes. Any ideas of what's going on ? I have tried ping on both the interface fine. Will verify with ps again later in this week. Can you provide below details details - Are you using EVMsk or custom build EVM? This is a custom board (based on the BeagleBone design) with dual Ethernet, NAND, NOR and FRAM. The dual emac thing is (one of) the last things to get signed off, so I'm willing to assist in tracking this down. Regards Mark J. -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/3] Dual EMAC mode implementation of CPSW
On 4/15/2013 10:58 PM, Mark Jackson wrote: On 15/04/13 18:07, Mugunthan V N wrote: On 4/15/2013 12:46 AM, Mark Jackson wrote: snip Notice that at the end, the nfs link appears to come back ok, but the ps command never completes. Any ideas of what's going on ? I have tried ping on both the interface fine. Will verify with ps again later in this week. Can you provide below details details - Are you using EVMsk or custom build EVM? This is a custom board (based on the BeagleBone design) with dual Ethernet, NAND, NOR and FRAM. The dual emac thing is (one of) the last things to get signed off, so I'm willing to assist in tracking this down. After testing the scenario i may be able to send you an update later in this week. Regards Mugunthan V N -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/3] Dual EMAC mode implementation of CPSW
On 15/04/13 18:34, Mugunthan V N wrote: On 4/15/2013 10:58 PM, Mark Jackson wrote: On 15/04/13 18:07, Mugunthan V N wrote: On 4/15/2013 12:46 AM, Mark Jackson wrote: snip Notice that at the end, the nfs link appears to come back ok, but the ps command never completes. Any ideas of what's going on ? I have tried ping on both the interface fine. Will verify with ps again later in this week. Can you provide below details details - Are you using EVMsk or custom build EVM? This is a custom board (based on the BeagleBone design) with dual Ethernet, NAND, NOR and FRAM. The dual emac thing is (one of) the last things to get signed off, so I'm willing to assist in tracking this down. After testing the scenario i may be able to send you an update later in this week. Excellent ... if you've anything I can test now, I'd be happy to try. Cheers Mark J. -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/3] Dual EMAC mode implementation of CPSW
On 11/02/13 19:52, Mugunthan V N wrote: This patch series implements Dual EMAC mode implementation of CPSW which acts as two standalone EMAC by segregating the switch using VIDs and port VLAN Mugunthan V N (3): driver: net: ethernet: davinci_cpdma: add support for directed packet and source port detection driver: net: ethernet: cpsw: make cpts as pointer driver: net: ethernet: cpsw: dual emac interface implementation Documentation/devicetree/bindings/net/cpsw.txt |2 + drivers/net/ethernet/ti/cpsw.c | 387 +++- drivers/net/ethernet/ti/davinci_cpdma.c| 17 +- drivers/net/ethernet/ti/davinci_cpdma.h|4 +- drivers/net/ethernet/ti/davinci_emac.c |6 +- include/linux/platform_data/cpsw.h |3 + 6 files changed, 338 insertions(+), 81 deletions(-) I'm trying to get dual emac mode working, but I'm only having partial success. We have a custom AM335x board with dual LAN8710 PYHs, but the basic design is based on the BeagleBone board. I have the following in my .dts file:- mac: ethernet@4a10 { dual_emac = 1; cpsw_emac0: slave@4a100200 { dual_emac_res_vlan = 1; }; cpsw_emac1: slave@4a100300 { dual_emac_res_vlan = 2; }; }; When I boot my board (across nfs via eth1):- (a) the kernel is loaded (via tftp under U-Boot) (b) the kernel mounts the nfsroot (c) my init scripts are run (e.g. dropbear) (d) the shell prompt appears So far so good, but when I then try any shell command (e.g. ps) the nfs link just hangs. Below is an extract from the boot messages:- [0.00] Booting Linux on physical CPU 0x0 [0.00] Linux version 3.9.0-rc6-00186-g5b55d70-dirty (mpfj@mpfj-nanobone) (gcc version 4.7.2 (Buildroot 2013.02-00154-g851ceaa) ) #19 Sun Apr 14 19:50:21 BST 2013 [0.00] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7d [0.00] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache [0.00] Machine: Generic AM33XX (Flattened Device Tree), model: Newflow AM335x NanoBone [0.00] Memory policy: ECC disabled, Data cache writeback [0.00] CPU: All CPU(s) started in SVC mode. [0.00] AM335X ES1.0 (neon ) [0.00] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 64768 [0.00] Kernel command line: root=/dev/nfs nfsroot=10.1.0.111:/tftpboot/nanobone/rootfs rw ip=10.1.0.199:10.1.0.111:10.1.0.1:255.255.0.0::eth1:off console=ttyO0,115200 ... [1.424977] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6 [1.431443] davinci_mdio 4a101000.mdio: detected phy mask fffc [1.440939] libphy: 4a101000.mdio: probed [1.445266] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver SMSC LAN8710/LAN8720 [1.454962] davinci_mdio 4a101000.mdio: phy[1]: device 4a101000.mdio:01, driver SMSC LAN8710/LAN8720 [1.465059] Random MACID = a2:3f:fb:2c:47:d9 [1.472276] cpsw: Random MACID = ae:d5:c0:c0:27:03 [1.480588] rtc-ds1307 0-0068: setting system clock to 2013-04-14 19:59:52 UTC (1365969592) [1.491543] net eth1: initializing cpsw version 1.12 (0) [1.516965] net eth1: phy found : id is : 0x7c0f1 [4.595479] libphy: 4a101000.mdio:01 - Link is Up - 100/Full [4.625872] IP-Config: Complete: [4.629307] device=eth1, hwaddr=ae:d5:c0:c0:27:03, ipaddr=10.1.0.199, mask=255.255.0.0, gw=10.1.0.1 [4.639365] host=10.1.0.199, domain=, nis-domain=(none) [4.645359] bootserver=10.1.0.111, rootserver=10.1.0.111, rootpath= [4.674219] VFS: Mounted root (nfs filesystem) on device 0:12. [4.682438] devtmpfs: mounted [4.686042] Freeing init memory: 196K Starting logging: OK Initializing random number generator... done. Starting network... ip: RTNETLINK answers: File exists [5.340677] net eth0: initializing cpsw version 1.12 (0) [5.366463] net eth0: phy found : id is : 0x7c0f1 ip: RTNETLINK answers: File exists ip: RTNETLINK answers: File exists ip: RTNETLINK answers: File exists Starting dropbear sshd: OK Welcome to Buildroot nanobone login: root Password: # ps [ 18.845266] nfs: server 10.1.0.111 not responding, still trying At this point, I can disconnect my network cable from eth1 and connect to eth0, and back again which shows the PYHs appear to be detecting the link up/down status of each port. [ 562.675229] libphy: 4a101000.mdio:01 - Link is Down [ 567.885586] libphy: 4a101000.mdio:00 - Link is Up - 100/Full [ 571.965156] libphy: 4a101000.mdio:00 - Link is Down [ 575.014943] nfs: server 10.1.0.111 not responding, still trying [ 576.635412] libphy: 4a101000.mdio:01 - Link is Up - 100/Full [ 579.426051] nfs: server 10.1.0.111 OK Notice that at the end, the nfs link appears to come back ok, but the ps command never completes. Any ideas of what's going on ? Cheers Mark J. -- To unsubscribe from this list: send the line
Re: [PATCH 0/3] Dual EMAC mode implementation of CPSW
On 12/02/13 21:15, David Miller wrote: From: Mugunthan V N mugunthan...@ti.com Date: Tue, 12 Feb 2013 01:22:17 +0530 This patch series implements Dual EMAC mode implementation of CPSW which acts as two standalone EMAC by segregating the switch using VIDs and port VLAN Mugunthan V N (3): driver: net: ethernet: davinci_cpdma: add support for directed packet and source port detection driver: net: ethernet: cpsw: make cpts as pointer driver: net: ethernet: cpsw: dual emac interface implementation Series applied. I can see that this series is now in the mainline kernel, but can anyone give me some pointers on how to use it ? First, I'd like to check that it's achieving what I think it does ... namely to be able to access both eth0 and eth1 as separate Ethernet ports ? If this assumption is correct, can anyone guide me as to how to setup my dts file to allow the kernel to see both ports ? If have been trying to get it going (see my posting [1]), but to no avail. Any help would be greatly appreciated !! [1] http://www.spinics.net/lists/linux-omap/msg89920.html Regards Mark JACKSON -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/3] Dual EMAC mode implementation of CPSW
From: Mugunthan V N mugunthan...@ti.com Date: Tue, 12 Feb 2013 01:22:17 +0530 This patch series implements Dual EMAC mode implementation of CPSW which acts as two standalone EMAC by segregating the switch using VIDs and port VLAN Mugunthan V N (3): driver: net: ethernet: davinci_cpdma: add support for directed packet and source port detection driver: net: ethernet: cpsw: make cpts as pointer driver: net: ethernet: cpsw: dual emac interface implementation Series applied. -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html