i.MX6 Ethernet not working, but acts like it is

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX6 Ethernet not working, but acts like it is

Jump to solution
3,602 Views
jsmith883
Contributor III

Hello,

We have a custom board that was copied from the sabresd board.  Ethernet appears to be working, the interface is created, but dhcp does not work.  After a few seconds, it assigns a strange default IP address, so using connman I set a static IP address to match our network.  I am unable to ping anything, but ifconfig tells me that there are no errors or dropped packets, and are a lot of received packets as well.

The ethernet section of the device tree is identical to the sabresd.dtsi file, so I don't think that it's that.  If I unplug the ethernet cable, it recognizes that it's unplugged, and when I plug it back in it sees that too.  The only thing that I can think of is that the first line says the supply phy was not found, using dummy regulator.  Do I need to set this somewhere?  Any thoughts on what might be wrong?  Thanks!

root@linux:~# dmesg | grep eth
[ 1.962677] 2188000.ethernet supply phy not found, using dummy regulator
[ 1.973282] fec 2188000.ethernet (unregistered net_device): Invalid MAC address: 00:00:00:00:00:00
[ 1.980977] fec 2188000.ethernet (unregistered net_device): Using random MAC address: 16:ed:bf:c6:e0:f1
[ 2.073272] fec 2188000.ethernet eth0: Freescale FEC PHY driver [Atheros 8031 ethernet] (mii_bus:phy_addr=2188000.ethernet:01, irq=-1)
[ 2.084442] fec 2188000.ethernet eth0: registered PHC device 0
[ 11.152787] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 13.223638] fec 2188000.ethernet eth0: Freescale FEC PHY driver [Atheros 8031 ethernet] (mii_bus:phy_addr=2188000.ethernet:01, irq=-1)
[ 13.234979] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 46.223241] libphy: 2188000.ethernet:01 - Link is Up - 1000/Full
[ 46.227988] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

root@linux:~# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 16:ed:bf:c6:e0:f1
inet addr:10.10.10.60 Bcast:10.10.10.255 Mask:255.255.255.0
inet6 addr: fe80::14ed:bfff:fec6:e0f1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST DYNAMIC MTU:1500 Metric:1
RX packets:4593 errors:0 dropped:0 overruns:0 frame:0
TX packets:131 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1150695 (1.0 MiB) TX bytes:14330 (13.9 KiB)

Labels (2)
Tags (3)
1 Solution
2,163 Views
jsmith883
Contributor III

So I found out that if I plug it into a 10/100 switch it works, as I can ping the router.  But when it is plugged into a 10/100/1000 switch it does not work.  Are there registers on the AR8031 that need to be set?

View solution in original post

3 Replies
2,163 Views
aravinthkumarja
Senior Contributor II

Hi Brent sink,

Your Ethernet is working as per your log.

RX packets:4593 errors:0 dropped:0 overruns:0 frame:0
TX packets:131 errors:0 dropped:0 overruns:0 carrier:0

Can you attach your ping log.

My requirement is:

=> ping 10.10.10.1

=> ping google.com

=> ifconfig eth0

As per the above flow

Regards,

Aravinth

0 Kudos
Reply
2,164 Views
jsmith883
Contributor III

So I found out that if I plug it into a 10/100 switch it works, as I can ping the router.  But when it is plugged into a 10/100/1000 switch it does not work.  Are there registers on the AR8031 that need to be set?

2,163 Views
jsmith883
Contributor III

You would think.  So after a fresh boot, this is the default IP address:

root@linux:~# ifconfig eth0
eth0 Link encap:Ethernet HWaddr fa:3d:97:77:69:eb
inet addr:169.254.118.241 Bcast:169.254.255.255 Mask:255.255.0.0
inet6 addr: fe80::f83d:97ff:fe77:69eb/64 Scope:Link
UP BROADCAST RUNNING MULTICAST DYNAMIC MTU:1500 Metric:1
RX packets:3 errors:0 dropped:0 overruns:0 frame:0
TX packets:29 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:192 (192.0 B) TX bytes:5234 (5.1 KiB)

So then using connman set a static IP address:

root@linux:~# connmanctl services
*AR Wired ethernet_fa3d977769eb_cable
root@linux:~# connmanctl config ethernet_fa3d977769eb_cable --ipv4 manual 10.10.10.60 255.255.255.0 10.10.10.1

root@linux:~# ifconfig eth0
eth0 Link encap:Ethernet HWaddr fa:3d:97:77:69:eb
inet addr:10.10.10.60 Bcast:10.10.10.255 Mask:255.255.255.0
inet6 addr: fe80::f83d:97ff:fe77:69eb/64 Scope:Link
UP BROADCAST RUNNING MULTICAST DYNAMIC MTU:1500 Metric:1
RX packets:543 errors:0 dropped:0 overruns:0 frame:0
TX packets:69 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:116629 (113.8 KiB) TX bytes:21434 (20.9 KiB)

root@linux:~#

root@linux:~# ping 10.10.10.1
PING 10.10.10.1 (10.10.10.1) 56(84) bytes of data.
From 10.10.10.60 icmp_seq=14 Destination Host Unreachable
From 10.10.10.60 icmp_seq=15 Destination Host Unreachable
From 10.10.10.60 icmp_seq=16 Destination Host Unreachable
From 10.10.10.60 icmp_seq=17 Destination Host Unreachable
From 10.10.10.60 icmp_seq=18 Destination Host Unreachable
From 10.10.10.60 icmp_seq=19 Destination Host Unreachable
^C
--- 10.10.10.1 ping statistics ---
21 packets transmitted, 0 received, +6 errors, 100% packet loss, time 20001ms
pipe 3
root@linux:~# ping google.com
ping: unknown host google.com
root@linux:~# ifconfig eth0
eth0 Link encap:Ethernet HWaddr fa:3d:97:77:69:eb
inet addr:10.10.10.60 Bcast:10.10.10.255 Mask:255.255.255.0
inet6 addr: fe80::f83d:97ff:fe77:69eb/64 Scope:Link
UP BROADCAST RUNNING MULTICAST DYNAMIC MTU:1500 Metric:1
RX packets:658 errors:0 dropped:0 overruns:0 frame:0
TX packets:96 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:141355 (138.0 KiB) TX bytes:23296 (22.7 KiB)

root@linux:~# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 10.10.10.1 0.0.0.0 UG 0 0 0 eth0
10.10.10.0 * 255.255.255.0 U 0 0 0 eth0
10.10.10.1 * 255.255.255.255 UH 0 0 0 eth0

I'm wondering if there is an issue with the OS - I may try to load another image today.

0 Kudos
Reply