This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM5728: Communication issue with eth0

Part Number: AM5728


Hello. I use ti-processor-sdk-linux-am57xx-evm-03.03.00.04 and have some trouble with eth0.

I configured static IP 192.168.0.11 on eth0 and 192.168.0.12 on PC.

After connect cable I see message:

root@am57xx-evm:~# [  997.825258] cpsw 48484000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[  997.833185] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

First, when I try ping sitara from PC:

ping 192.168.0.11

I gots "Destination Host Unreachable" messages.

Second, I ping PC from sitara:

ping 192.168.0.12

And got answers.

After, if I ping sitara from PC - got answers.

After reconnect cable - "Destination Host Unreachable" messages on PC, until sitara ping PC.

I.e. sitara not receive packets from eth0, until sitara try communicate with external host.

On eth1 this problem not exist.

  • Please provide more details. Is this a custom board? What is your network topology? Please also follow this checklist and post the results here: processors.wiki.ti.com/.../5x_CPSW
  • It custom board, with two AR8033 RGMII Ethernet PHY on RGMII0,1. Linux - from evm sdk with custom device-tree.
    Network topology - direct point(sitara) to point(PC, Windows 8 or Ubuntu 16.04 - same behavior).

    root@am57xx-evm:~# dmesg | grep cpsw
    [ 1.647210] cpsw 48484000.ethernet: Detected MACID = 00:01:c0:1c:23:5d
    [ 1.653874] cpsw 48484000.ethernet: cpts: overflow check period 800
    [ 1.660838] cpsw 48484000.ethernet: cpsw: Detected MACID = 00:01:c0:1c:23:5e
    [ 32.176119] net eth1: initializing cpsw version 1.15 (0)
    [ 32.183267] net eth0: initialized cpsw ale version 1.4
    [ 32.291298] net eth0: initializing cpsw version 1.15 (0)
    [ 35.275197] cpsw 48484000.ethernet eth1: Link is Up - 100Mbps/Full - flow control rx/tx
    [ 36.385354] cpsw 48484000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
    [ 1623.284105] cpsw 48484000.ethernet eth1: Link is Down
    [ 1628.295145] cpsw 48484000.ethernet eth1: Link is Up - 1Gbps/Full - flow control rx/tx
    root@am57xx-evm:~# dmesg | grep mdio
    [ 1.607593] davinci_mdio 48485000.mdio: davinci mdio revision 1.6
    [ 1.613716] davinci_mdio 48485000.mdio: detected phy mask fffffffc
    [ 1.622027] Atheros 8031 ethernet 48485000.mdio:00: GPIO lookup for consumer reset
    [ 1.622039] Atheros 8031 ethernet 48485000.mdio:00: using lookup tables for GPIO lookup
    [ 1.622048] Atheros 8031 ethernet 48485000.mdio:00: lookup for GPIO reset failed
    [ 1.623968] Atheros 8031 ethernet 48485000.mdio:01: GPIO lookup for consumer reset
    [ 1.623978] Atheros 8031 ethernet 48485000.mdio:01: using lookup tables for GPIO lookup
    [ 1.623988] Atheros 8031 ethernet 48485000.mdio:01: lookup for GPIO reset failed
    [ 1.624001] libphy: 48485000.mdio: probed
    [ 1.628046] davinci_mdio 48485000.mdio: phy[0]: device 48485000.mdio:00, driver Atheros 8031 ethernet
    [ 1.637305] davinci_mdio 48485000.mdio: phy[1]: device 48485000.mdio:01, driver Atheros 8031 ethernet


    dual_emac; enabled in devicetree.

    &mac {
    status = "okay";
    pinctrl-names = "default", "sleep";
    pinctrl-0 = <&cpsw_pins_default>;
    pinctrl-1 = <&cpsw_pins_sleep>;
    dual_emac;
    };

    &cpsw_emac0 {
    phy_id = <&davinci_mdio>, <0>;
    phy-mode = "rgmii-rxid";
    dual_emac_res_vlan = <0>;
    };

    &cpsw_emac1 {
    phy_id = <&davinci_mdio>, <1>;
    phy-mode = "rgmii-rxid";
    dual_emac_res_vlan = <1>;
    };

    &davinci_mdio {
    pinctrl-names = "default", "sleep";
    pinctrl-0 = <&davinci_mdio_pins_default>;
    pinctrl-1 = <&davinci_mdio_pins_sleep>;
    };


    While PC pings sitara and receive "Destination Host Unreachable" I see in ethtool -S eth0 Good Rx Frames couts up. In next log I call ethtool with pause between:

    root@am57xx-evm:~# ethtool -S eth0
    NIC statistics:
    Good Rx Frames: 132036
    Broadcast Rx Frames: 69095
    Multicast Rx Frames: 62940
    Pause Rx Frames: 0
    Rx CRC Errors: 0
    Rx Align/Code Errors: 0
    Oversize Rx Frames: 0
    Rx Jabbers: 0
    Undersize (Short) Rx Frames: 0
    Rx Fragments: 0
    Rx Octets: 16709723
    Good Tx Frames: 48
    Broadcast Tx Frames: 0
    Multicast Tx Frames: 47
    Pause Tx Frames: 0
    Deferred Tx Frames: 0
    Collisions: 0
    Single Collision Tx Frames: 0
    Multiple Collision Tx Frames: 0
    Excessive Collisions: 0
    Late Collisions: 0
    Tx Underrun: 0
    Carrier Sense Errors: 0
    Tx Octets: 4016
    Rx + Tx 64 Octet Frames: 53398
    Rx + Tx 65-127 Octet Frames: 48013
    Rx + Tx 128-255 Octet Frames: 22382
    Rx + Tx 256-511 Octet Frames: 4568
    Rx + Tx 512-1023 Octet Frames: 2872
    Rx + Tx 1024-Up Octet Frames: 851
    Net Octets: 16713739
    Rx Start of Frame Overruns: 0
    Rx Middle of Frame Overruns: 0
    Rx DMA Overruns: 0
    Rx DMA chan: head_enqueue: 1
    Rx DMA chan: tail_enqueue: 85936
    Rx DMA chan: pad_enqueue: 0
    Rx DMA chan: misqueued: 0
    Rx DMA chan: desc_alloc_fail: 0
    Rx DMA chan: pad_alloc_fail: 0
    Rx DMA chan: runt_receive_buf: 0
    Rx DMA chan: runt_transmit_buf: 0
    Rx DMA chan: empty_dequeue: 0
    Rx DMA chan: busy_dequeue: 84468
    Rx DMA chan: good_dequeue: 85809
    Rx DMA chan: requeue: 0
    Rx DMA chan: teardown_dequeue: 0
    Tx DMA chan: head_enqueue: 48
    Tx DMA chan: tail_enqueue: 0
    Tx DMA chan: pad_enqueue: 0
    Tx DMA chan: misqueued: 0
    Tx DMA chan: desc_alloc_fail: 0
    Tx DMA chan: pad_alloc_fail: 0
    Tx DMA chan: runt_receive_buf: 0
    Tx DMA chan: runt_transmit_buf: 7
    Tx DMA chan: empty_dequeue: 48
    Tx DMA chan: busy_dequeue: 0
    Tx DMA chan: good_dequeue: 48
    Tx DMA chan: requeue: 0
    Tx DMA chan: teardown_dequeue: 0
    root@am57xx-evm:~#
    root@am57xx-evm:~# ethtool -S eth0
    NIC statistics:
    Good Rx Frames: 132184
    Broadcast Rx Frames: 69179
    Multicast Rx Frames: 63004
    Pause Rx Frames: 0
    Rx CRC Errors: 0
    Rx Align/Code Errors: 0
    Oversize Rx Frames: 0
    Rx Jabbers: 0
    Undersize (Short) Rx Frames: 0
    Rx Fragments: 0
    Rx Octets: 16728276
    Good Tx Frames: 48
    Broadcast Tx Frames: 0
    Multicast Tx Frames: 47
    Pause Tx Frames: 0
    Deferred Tx Frames: 0
    Collisions: 0
    Single Collision Tx Frames: 0
    Multiple Collision Tx Frames: 0
    Excessive Collisions: 0
    Late Collisions: 0
    Tx Underrun: 0
    Carrier Sense Errors: 0
    Tx Octets: 4016
    Rx + Tx 64 Octet Frames: 53459
    Rx + Tx 65-127 Octet Frames: 48070
    Rx + Tx 128-255 Octet Frames: 22405
    Rx + Tx 256-511 Octet Frames: 4571
    Rx + Tx 512-1023 Octet Frames: 2874
    Rx + Tx 1024-Up Octet Frames: 853
    Net Octets: 16732292
    Rx Start of Frame Overruns: 0
    Rx Middle of Frame Overruns: 0
    Rx DMA Overruns: 0
    Rx DMA chan: head_enqueue: 1
    Rx DMA chan: tail_enqueue: 86035
    Rx DMA chan: pad_enqueue: 0
    Rx DMA chan: misqueued: 0
    Rx DMA chan: desc_alloc_fail: 0
    Rx DMA chan: pad_alloc_fail: 0
    Rx DMA chan: runt_receive_buf: 0
    Rx DMA chan: runt_transmit_buf: 0
    Rx DMA chan: empty_dequeue: 0
    Rx DMA chan: busy_dequeue: 84567
    Rx DMA chan: good_dequeue: 85908
    Rx DMA chan: requeue: 0
    Rx DMA chan: teardown_dequeue: 0
    Tx DMA chan: head_enqueue: 48
    Tx DMA chan: tail_enqueue: 0
    Tx DMA chan: pad_enqueue: 0
    Tx DMA chan: misqueued: 0
    Tx DMA chan: desc_alloc_fail: 0
    Tx DMA chan: pad_alloc_fail: 0
    Tx DMA chan: runt_receive_buf: 0
    Tx DMA chan: runt_transmit_buf: 7
    Tx DMA chan: empty_dequeue: 48
    Tx DMA chan: busy_dequeue: 0
    Tx DMA chan: good_dequeue: 48
    Tx DMA chan: requeue: 0
    Tx DMA chan: teardown_dequeue: 0


    With wireshark I see TX ARP requsts(ping) and to answers from board.
  • Thanks. The Ethernet experts have been notified. They will respond here.
  • Hi,

    Thank you for posting the console log. The log shows that two cpsw links are up, have you assigned static ip addresses to both links on the Sitara device?

    Could you please attach the results of "ifconfig -a"? I am looking to see if both eth0 and eth1 are on the same subnet.

    Best Regards,
    Schuyler
  • No, it's in different subnets. I want to work with both interfaces in different networks. Like a router. Eth1 works fine in both directions.

    root@am57xx-evm:~# ifconfig -a
    can0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
    NOARP MTU:16 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:10
    RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
    Interrupt:98

    eth0 Link encap:Ethernet HWaddr 00:01:C0:1C:23:5D
    inet addr:192.168.0.90 Bcast:192.168.0.255 Mask:255.255.255.0
    inet6 addr: fe80::201:c0ff:fe1c:235d%132400/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:25 errors:0 dropped:0 overruns:0 frame:0
    TX packets:112 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:2140 (2.0 KiB) TX bytes:12216 (11.9 KiB)
    Interrupt:95

    eth1 Link encap:Ethernet HWaddr 00:01:C0:1C:23:5E
    inet addr:172.16.99.111 Bcast:172.16.255.255 Mask:255.255.0.0
    inet6 addr: fe80::201:c0ff:fe1c:235e%132400/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:30872 errors:0 dropped:0 overruns:0 frame:0
    TX packets:426 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:2600972 (2.4 MiB) TX bytes:75658 (73.8 KiB)

    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    inet6 addr: ::1%132400/128 Scope:Host
    UP LOOPBACK RUNNING MTU:65536 Metric:1
    RX packets:30 errors:0 dropped:0 overruns:0 frame:0
    TX packets:30 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1
    RX bytes:2640 (2.5 KiB) TX bytes:2640 (2.5 KiB)

    sit0 Link encap:IPv6-in-IPv4
    NOARP MTU:1480 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:1
    RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
  • Hi,

    Does taking eth1 down and then try the ping you describe from the PC work?

    Best Regards,
    Schuyler