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.

Compiler/PROCESSOR-SDK-AM335X: Ethernet receive problem

Part Number: PROCESSOR-SDK-AM335X

Tool/software: TI C/C++ Compiler

Im trying to config the dts of kernel 4.19 for a upgrade of 3.2. The ethernet transceiver are double lan8710.

Now the eth0 is working well but eth1 could only transmit but not receive.

I use wireshark for the test. As i ping my pc, I got the arp packet from eth1 and my pc return the mac address for arp, but eth1 would not reply any other packet.

The same test to eth0 has no problem.

The ifconfig  command  shows no rx packets from eth1:

root@am335x-evm:~# ifconfig
eth0 Link encap:Ethernet HWaddr 7C:38:66:FB:47:41
inet addr:192.168.3.11 Bcast:192.168.3.255 Mask:255.255.255.0
inet6 addr: fe80::7e38:66ff:fefb:4741/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:129 errors:0 dropped:0 overruns:0 frame:0
TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:13962 (13.6 KiB) TX bytes:986 (986.0 B)
Interrupt:40

eth1 Link encap:Ethernet HWaddr 7C:38:66:FB:47:43
inet addr:192.168.4.11 Bcast:192.168.4.255 Mask:255.255.255.0
inet6 addr: fe80::7e38:66ff:fefb:4743/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:384 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:24744 (24.1 KiB)

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

I checked the register in uboot by mii command, found nothing wrong.

My dts is as fllowing:

cpsw_default: cpsw_default {
pinctrl-single,pins = <

/* Slave 1 */
AM33XX_IOPAD(0x90c, PIN_INPUT_PULLUP | MUX_MODE1) /* (H17) gmii1_crs.rmii1_crs_dv */
AM33XX_IOPAD(0x910, PIN_INPUT_PULLDOWN | MUX_MODE1) /* (J15) gmii1_rxer.rmii1_rxer */
AM33XX_IOPAD(0x914, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* (J16) gmii1_txen.rmii1_txen */
AM33XX_IOPAD(0x928, PIN_OUTPUT | MUX_MODE1) /* (K17) gmii1_txd0.rmii1_txd0 */
AM33XX_IOPAD(0x924, PIN_OUTPUT | MUX_MODE1) /* (K16) gmii1_txd1.rmii1_txd1 */
AM33XX_IOPAD(0x940, PIN_INPUT_PULLUP | MUX_MODE1) /* (M16) gmii1_rxd0.rmii1_rxd0 */
AM33XX_IOPAD(0x93c, PIN_INPUT_PULLUP | MUX_MODE1) /* (L15) gmii1_rxd1.rmii1_rxd1 */
AM33XX_IOPAD(0x944, PIN_INPUT | MUX_MODE0) /* (H18) rmii1_refclk.rmii1_refclk */
/* Slave 2 */
AM33XX_IOPAD(0x864, PIN_INPUT_PULLUP | MUX_MODE3) /* (U16) gpmc_a9.rmii2_crs_dv */
AM33XX_IOPAD(0x874, PIN_INPUT_PULLDOWN | MUX_MODE3) /* (U17) gpmc_wpn.rmii2_rxer */
AM33XX_IOPAD(0x840, PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* (R13) gpmc_a0.rmii2_txen */
AM33XX_IOPAD(0x854, PIN_OUTPUT | MUX_MODE3) /* (V15) gpmc_a5.rmii2_txd0 */
AM33XX_IOPAD(0x850, PIN_OUTPUT | MUX_MODE3) /* (R14) gpmc_a4.rmii2_txd1 */
AM33XX_IOPAD(0x86c, PIN_INPUT_PULLUP | MUX_MODE3) /* (V17) gpmc_a11.rmii2_rxd0 */
AM33XX_IOPAD(0x868, PIN_INPUT_PULLUP | MUX_MODE3) /* (T16) gpmc_a10.rmii2_rxd1 */
AM33XX_IOPAD(0x908, PIN_INPUT | MUX_MODE1) /* (H16) gmii1_col.rmii2_refclk */
>;
};

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

&davinci_mdio {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&davinci_mdio_default>;
pinctrl-1 = <&davinci_mdio_sleep>;
status = "okay";
};

&cpsw_emac0 {
phy_id = <&davinci_mdio>, <1>;
phy-mode = "rmii";
dual_emac_res_vlan = <1>;
};

&cpsw_emac1 {
phy_id = <&davinci_mdio>, <0>;
phy-mode = "rmii";
dual_emac_res_vlan = <2>;
};

&phy_sel {
rmii-clock-ext;
};

I have no more idea about it, and i have changed  pin PULLUP or DOWN as lan8710's  datasheet. But it seems no affection.

What could do more for the problem?

  • Please complete this checklist and post the results here: processors.wiki.ti.com/.../5x_CPSW

  • Hi,

    After looking at the data provided, please disconnect eth0 and only use eth1 when collecting the data specified in the checklist.

    Best Regards,

    Schuyler

  • Kernel version:4.19.38

    File system:arago-base

    Custom board 

    Console log:

    [ 0.956251] libphy: Fixed MDIO Bus: probed
    [ 1.033582] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6, bus freq 1000000
    [ 1.041288] davinci_mdio 4a101000.mdio: detected phy mask fffffffc
    [ 1.049768] libphy: 4a101000.mdio: probed
    [ 1.053931] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver SMSC LAN8710/LAN8720
    [ 1.063108] davinci_mdio 4a101000.mdio: phy[1]: device 4a101000.mdio:01, driver SMSC LAN8710/LAN8720
    [ 1.073276] cpsw 4a100000.ethernet: Detected MACID = 7c:38:66:fb:47:41
    [ 1.080138] cpsw 4a100000.ethernet: initialized cpsw ale version 1.4
    [ 1.086593] cpsw 4a100000.ethernet: ALE Table size 1024
    [ 1.091876] cpsw 4a100000.ethernet: cpts: overflow check period 500 (jiffies)
    [ 1.099965] cpsw 4a100000.ethernet: cpsw: Detected MACID = 7c:38:66:fb:47:43
    [ 1.108449] i2c /dev entries driver

    ...

    net eth1: initializing cpsw version 1.12 (0)
    [ 33.028073] SMSC LAN8710/LAN8720 4a101000.mdio:00: attached PHY driver [SMSC LAN8710/LAN8720] (mii_bus:phy_addr=4a101000.mdio:00, irq=POLL)
    [ 33.174993] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
    [ 33.623073] net eth0: initializing cpsw version 1.12 (0)
    [ 33.845113] SMSC LAN8710/LAN8720 4a101000.mdio:01: attached PHY driver [SMSC LAN8710/LAN8720] (mii_bus:phy_addr=4a101000.mdio:01, irq=POLL)
    [ 34.072954] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready

    ...After i  link eth1...

    [  237.124696] cpsw 4a100000.ethernet eth1: Link is Up - 100Mbps/Full - flow control rx/tx

    root@am335x-evm:~# ethtool eth1
    Settings for eth1:
    Supported ports: [ TP MII ]
    Supported link modes: 10baseT/Half 10baseT/Full
    100baseT/Half 100baseT/Full
    Supported pause frame use: Symmetric Receive-only
    Supports auto-negotiation: Yes
    Supported FEC modes: Not reported
    Advertised link modes: 10baseT/Half 10baseT/Full
    100baseT/Half 100baseT/Full
    Advertised pause frame use: No
    Advertised auto-negotiation: Yes
    Advertised FEC modes: Not reported
    Link partner advertised link modes: 10baseT/Half 10baseT/Full
    100baseT/Half 100baseT/Full
    Link partner advertised pause frame use: Symmetric Receive-only
    Link partner advertised auto-negotiation: Yes
    Link partner advertised FEC modes: Not reported
    Speed: 100Mb/s
    Duplex: Full
    Port: MII
    PHYAD: 0
    Transceiver: internal
    Auto-negotiation: on
    Supports Wake-on: d
    Wake-on: d
    Current message level: 0x00000000 (0)

    Link detected: yes

    root@am335x-evm:~# ifconfig eth1 192.168.4.11
    root@am335x-evm:~# ping 192.168.4.146
    PING 192.168.4.146 (192.168.4.146): 56 data bytes
    ^C
    --- 192.168.4.146 ping statistics ---
    38 packets transmitted, 0 packets received, 100% packet loss
    root@am335x-evm:~# ethtool -S eth1
    NIC statistics:
    Good Rx Frames: 0
    Broadcast Rx Frames: 0
    Multicast Rx Frames: 0
    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: 0
    Good Tx Frames: 86
    Broadcast Tx Frames: 43
    Multicast Tx Frames: 43
    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: 10389
    Rx + Tx 64 Octet Frames: 0
    Rx + Tx 65-127 Octet Frames: 73
    Rx + Tx 128-255 Octet Frames: 0
    Rx + Tx 256-511 Octet Frames: 13
    Rx + Tx 512-1023 Octet Frames: 0
    Rx + Tx 1024-Up Octet Frames: 0
    Net Octets: 10389
    Rx Start of Frame Overruns: 0
    Rx Middle of Frame Overruns: 0
    Rx DMA Overruns: 0
    Rx DMA chan 0: head_enqueue: 1
    Rx DMA chan 0: tail_enqueue: 127
    Rx DMA chan 0: pad_enqueue: 0
    Rx DMA chan 0: misqueued: 0
    Rx DMA chan 0: desc_alloc_fail: 0
    Rx DMA chan 0: pad_alloc_fail: 0
    Rx DMA chan 0: runt_receive_buf: 0
    Rx DMA chan 0: runt_transmit_bu: 0
    Rx DMA chan 0: empty_dequeue: 0
    Rx DMA chan 0: busy_dequeue: 0
    Rx DMA chan 0: good_dequeue: 0
    Rx DMA chan 0: requeue: 0
    Rx DMA chan 0: teardown_dequeue: 0
    Tx DMA chan 0: head_enqueue: 86
    Tx DMA chan 0: tail_enqueue: 0
    Tx DMA chan 0: pad_enqueue: 0
    Tx DMA chan 0: misqueued: 0
    Tx DMA chan 0: desc_alloc_fail: 0
    Tx DMA chan 0: pad_alloc_fail: 0
    Tx DMA chan 0: runt_receive_buf: 0
    Tx DMA chan 0: runt_transmit_bu: 32
    Tx DMA chan 0: empty_dequeue: 86
    Tx DMA chan 0: busy_dequeue: 0
    Tx DMA chan 0: good_dequeue: 86
    Tx DMA chan 0: requeue: 0
    Tx DMA chan 0: teardown_dequeue: 0
    root@am335x-evm:~#

    The wireshark shows:

    192.168.4.11 Arp to 192.168.4.146

    192.168.4.146 arp reply 192.168.4.11

    no other packet transmitted.

    So i think eth1 cannot get any packet. 

  • Hi,

    Another customer was having a similar issue on eth1 to what you are seeing. I am confirming the resolution and will post back when I get an answer.

    Best Regards,

    Schuyler