[LEDE-DEV] Lantiq XWAY Linux 4.9 Internal Switch Ports NO-CARRIER

hamsi2k at freenet.de hamsi2k at freenet.de
Mon Feb 13 11:30:58 PST 2017


Since I updated from 4.4 to the new 4.9 kernel tree, I encountered that the internal network ports are
not connected anymore. If I do this at the command line I get the following at the 4.9 kernel:
 
root at LEDE:/# ip link
1: lo:  mtu 65536 qdisc noqueue qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0:  mtu 1500 qdisc fq_codel qlen 1000
    link/ether 00:11:22:33:44:55 brd ff:ff:ff:ff:ff:ff
3: eth1: 
 mtu 1500 qdisc fq_codel qlen 1000
    link/ether 0:11:22:33:44:56 brd ff:ff:ff:ff:ff:ff
 
And the following at the 4.4 kernel:
2: eth0: 
 mtu 1500 qdisc fq_codel qlen 1000
    link/ether 00:11:22:33:44:55 brd ff:ff:ff:ff:ff:ff
3: eth1: 
 mtu 1500 qdisc fq_codel qlen 1000
    link/ether 00:11:22:33:44:56 brd ff:ff:ff:ff:ff:ff
 
Initialization does work:
4.4:
[    2.269338] libphy: Fixed MDIO Bus: probed
[    2.373737] libphy: lantiq,xrx200-mdio: probed
[    2.444978] eth0: attached PHY [Lantiq XWAY VR9 GPHY 11G v1.4] (phy_addr=0:11, irq=-1)
[    2.516978] eth1: attached PHY [Lantiq XWAY VR9 GPHY 11G v1.4] (phy_addr=0:13, irq=-1)
 
4.9:
[    2.308306] libphy: Fixed MDIO Bus: probed
[    2.412558] libphy: lantiq,xrx200-mdio: probed
[    2.643620] Intel XWAY PHY11G (xRX integrated) 0:11: attached PHY driver [Intel XWAY PHY11G (xRX integrated)] (mii_bus:phy_addr=0:11, irq=-1)

 [    2.875620] Intel XWAY PHY11G (xRX integrated) 0:13: attached PHY driver [Intel XWAY PHY11G (xRX integrated)] (mii_bus:phy_addr=0:13, irq=-1)


If I plug a network device into "port 4" I get the following message both on 4.4 and 4.9:
[    4.516427] eth1: port 4 got link
 
But I never (both 4.4 and 4.9) got this for the internal port 2. But on 4.4 it is marked as UP,LOWER_UP
(and works as expected) and on 4.9 it is marked as NO-CARRIER.


Background info: Port2 is connected to another switch, a RTL8367RB. So the link should always be up.

Maybe it has to do with one of the new network extensions between the 4.4 and the 4.9 kernel version.
Does someone else noticed that?
I can give some more info, by using some debug statements to solve this problem.


Thanks.




References:



swconfig 4.9/4.4:
root at LEDE:/# swconfig dev switch0 show
Global attributes:
        dmcpmap: 127
        uucmap: 127
        enable_vlan: 1
Port 0:
        uvr: 0
        vsr: 0
        vinr: 0
        tvm: 0
        pvid: 1
        link: port:0 link:up speed:1000baseT full-duplex auto
Port 1:
        uvr: 0
        vsr: 0
        vinr: 0
        tvm: 0
        pvid: 0
        link: port:1 link:down
Port 2:
        uvr: 0
        vsr: 0
        vinr: 0
        tvm: 0
        pvid: 0
        link: port:2 link:up speed:10baseT half-duplex auto
Port 3:
        uvr: 0
        vsr: 0
        vinr: 0
        tvm: 0
        pvid: 0
        link: port:3 link:down
Port 4:
        uvr: 0
        vsr: 0
        vinr: 0
        tvm: 0
        pvid: 1
        link: port:4 link:up speed:100baseT full-duplex auto
Port 5:
        uvr: 0
        vsr: 0
        vinr: 0
        tvm: 0
        pvid: 0
        link: port:5 link:down
Port 6:
        uvr: 0
        vsr: 0
        vinr: 0
        tvm: 0
        pvid: 1
        link: port:6 link:up speed:1000baseT full-duplex auto
VLAN 1:
        vid: 1
        fid: 0
        enable: 1
        ports: 0 4 6t


The dts tree is as follows ( relevant parts)


    gphy-xrx200 {
        compatible = "lantiq,phy-xrx200";
        firmware1 = "lantiq/vr9_phy11g_a1x.bin";    /*VR9 1.1*/
        firmware2 = "lantiq/vr9_phy11g_a2x.bin";    /*VR9 1.2*/
        phys = [ 00 01 ];
    };




    mdio: mdio at 0 {
            #address-cells = ;
            #size-cells = ;
            compatible = "lantiq,xrx200-mdio";
            phy0: ethernet-phy at 0 {
                reg = ;
                compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
            };
            phy1: ethernet-phy at 1 {
                reg = ;
                compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
            };
            phy11: ethernet-phy at 11 {
                reg = ;
                compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
            };
            phy12: ethernet-phy at 12 {
                reg = ;
                compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
            };
            phy13: ethernet-phy at 13 {
                reg = ;
                compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
            };                
            phy14: ethernet-phy at 14 {
                reg = ;
                compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
            };
        };



&eth0 {
    lan: interface at 0 {
        compatible = "lantiq,xrx200-pdi";
        #address-cells = ;
        #size-cells = ;
        reg = ;                                
        mac-address = [ 00 11 22 33 44 55 ];
        lantiq,switch;
        ethernet at 2 {
            compatible = "lantiq,xrx200-pdi-port";
            reg = ;
            phy-mode = "gmii";
            phy-handle = ;
        };
    };

    /* wan port */
    wan: interface at 1 {
        compatible = "lantiq,xrx200-pdi";
        #address-cells = ;
        #size-cells = ;
        reg = ;
        mac-address = [ 00 11 22 33 44 56 ];
        /* Enabling wan mode on this interface causes kernel panics
           in case port link isn't up */
        // lantiq,wan;
        ethernet at 4 {
            compatible = "lantiq,xrx200-pdi-port";
            reg = ;
            phy-mode = "gmii";
            phy-handle = ;
        };
    };
};








---
Die Bundesliga hat begonnen! Alle Tore, alle Ergebnisse, alle News: Pocket Liga jetzt im https://app.adjust.com/dpynzd oder https://app.adjust.com/dpynzd herunterladen - kostenlos!




More information about the Lede-dev mailing list