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.

AM62P: AM62p The insertion and removal of eth1 will affect eth0

Part Number: AM62P

Soc: AM62P54

System:  yocot 12.00.00.07

Ethernet phy : RTL8211F Gigabit Ethernet

I. Only use eth1 network:

A. When eth1 is plugged in, eth0 will be brought up simultaneously

[  332.406476] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[  332.630252] am65-cpsw-nuss 8000000.ethernet eth1: Link is Up - 1Gbps/Full - flow control rx/tx

B. When eth1 is unplugged, eth0 will be down simultaneously

[  210.548344] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
[  210.772429] am65-cpsw-nuss 8000000.ethernet eth1: Link is Down

And eth0 will obtain an incorrect IP address "169.254.4.92", while eth1 works normally.  

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host noprefixroute
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 58:a1:5f:b8:97:37 brd ff:ff:ff:ff:ff:ff
    inet 169.254.4.92/16 metric 2048 brd 169.254.255.255 scope link eth0
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 82:87:31:8a:64:4c brd ff:ff:ff:ff:ff:ff
    inet 192.168.2.112/24 metric 1024 brd 192.168.2.255 scope global dynamic eth1
       valid_lft 86391sec preferred_lft 86391sec
4: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
    link/ether 8e:16:d2:1b:37:53 brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
       valid_lft forever preferred_lft forever

II. When only using eth0, the plugging and unplugging are normal.

  • Hi Daolin,

    can you help check this thread?

    BR,

    Biao 

  • Hello John,

    Apologies for the delay in response

    A. When eth1 is plugged in, eth0 will be brought up simultaneously

    [  332.406476] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
    [  332.630252] am65-cpsw-nuss 8000000.ethernet eth1: Link is Up - 1Gbps/Full - flow control rx/tx

    This is certainly a strange behavior on SDK 12.0 you are observing. I will try and see if I can replicate this because I certainly did not see this behavior appear on SDK 11.x versions.

    And eth0 will obtain an incorrect IP address "169.254.4.92", while eth1 works normally.  

    This is also something I have noticed on SDK 12.0 as well however I believe this is some sort of proxy IP address that is part of the eth interface initialization and not meant as actual IP address to be used. If you use a DHCP server or manually configure static IP address, this will be overwritten. One quick test for you to check if this IP address shows up even when eth0 link is down.

    What is your DTS for CPSW and the Ethernet PHY you are using?

    -Daolin

  • &cpsw3g_mdio {
            pinctrl-names = "default";
            pinctrl-0 = <&main_mdio1_pins_default>;
            status = "okay";
    
            cpsw3g_phy0: ethernet-phy@0 {
                    compatible = "ethernet-phy-ieee802.3-c22";
                    reg = <0>;
                    bootph-all; 
                    realtek,clkout-disable; 
            };
    
            cpsw3g_phy1: ethernet-phy@1 {
                    compatible = "ethernet-phy-ieee802.3-c22";
                    reg = <1>; 
                    realtek,clkout-disable; 
            };
    };
    

    The changes made to dts .

    After obtaining "169.254.4.92", inserting it into eth0 will make it impossible to obtain a dynamic IP.