problem with 88e1512

doudootiana

New Member
Joined
May 20, 2023
Messages
10
Reaction score
1
Credits
85
Hy Ladies and Gentlemen :)

I worked on a Mochabin board from GlobalScale.

I have a problem with my eth2 ( renamed sfp1 in my DTS).

It cannot communicate with another devices.

I can ifup the interface without error, but no flows.

Code:
# ifup sfp1
[  106.315811] mvpp2 f2000000.ethernet sfp1: PHY [f212a200.mdio-mii:01] driver [Marvell 88E1510] (irq=POLL)
[  106.325423] mvpp2 f2000000.ethernet sfp1: configuring for phy/rgmii-id link mode
# [  110.435413] mvpp2 f2000000.ethernet sfp1: Link is Up - 1Gbps/Full - flow control off
[  110.443328] IPv6: ADDRCONF(NETDEV_CHANGE): sfp1: link becomes ready


#
#
#
# ping 192.168.9.2
PING 192.168.9.2 (192.168.9.2) 56(84) bytes of data.
From 192.168.9.1 icmp_seq=1 Destination Host Unreachable
From 192.168.9.1 icmp_seq=2 Destination Host Unreachable
From 192.168.9.1 icmp_seq=3 Destination Host Unreachable

I tried with DHCP, Static address.

I use net-next 6.2 version for kernel. I tried with net-next 6.1,6.3 and mainline 6.1,6.2,5.10,5.14.

Here the DTS :

Code:
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * Device Tree file for Globalscale MOCHAbin Development Board
 * Copyright (C) 2019 Globalscale technologies, Inc.
 *
 * Jason Hung <[email protected]>
 */


#include <dt-bindings/gpio/gpio.h>
#include "armada-7040.dtsi"


/ {
    model = "Globalscale MOCHAbin Development Board";
    compatible = "globalscale,mochabin",  "marvell,armada7040",
                 "marvell,armada-ap806-quad", "marvell,armada-ap806";


    memory@0 {
        device_type = "memory";
        reg = <0x0 0x0 0x0 0x80000000>;
    };


    chosen {
        stdout-path = "serial0:115200n8";
    };


    aliases {
        ethernet0 = &cp0_eth0;
        ethernet1 = &cp0_eth1;
        ethernet2 = &cp0_eth2;
        ethernet3 = &switch0port1;
        ethernet4 = &switch0port2;
        ethernet5 = &switch0port3;
        ethernet6 = &switch0port4;
        gpio0 = &ap_gpio;
        gpio1 = &cp0_gpio1;
        gpio2 = &cp0_gpio2;
    };


    /* is31fl3199 led shutdown regulator */
    reg_is31_led: reg-is31-led {
        compatible = "regulator-fixed";
        pinctrl-names = "default";
        pinctrl-0 = <&is31_sdb_pins>;
        regulator-name = "is31-led";
        regulator-min-microvolt = <3300000>;
        regulator-max-microvolt = <3300000>;
        enable-active-high;
        regulator-always-on;
        gpio = <&cp0_gpio1 30 GPIO_ACTIVE_HIGH>;
        status = "okay";
    };


    /* SFP+ 10G */
    sfp_eth0: sfp-eth0 {
        compatible = "sff,sfp";
        i2c-bus = <&cp0_i2c1>;
        los-gpio = <&expander0 3 GPIO_ACTIVE_HIGH>;
        mod-def0-gpio = <&expander0 2 GPIO_ACTIVE_LOW>;
        tx-disable-gpio = <&expander0 1 GPIO_ACTIVE_HIGH>;
        tx-fault-gpio  = <&expander0 0 GPIO_ACTIVE_HIGH>;
        status = "okay";
    };


    /* SFP 1G */
    sfp_eth2: sfp-eth2 {
        compatible = "sff,sfp";
        i2c-bus = <&cp0_i2c0>;
        los-gpio = <&expander0 7 GPIO_ACTIVE_HIGH>;
        mod-def0-gpio = <&expander0 6 GPIO_ACTIVE_LOW>;
        tx-disable-gpio = <&expander0 5 GPIO_ACTIVE_HIGH>;
        tx-fault-gpio  = <&expander0 4 GPIO_ACTIVE_HIGH>;
        status = "okay";
    };
};


/* for uart debug console */
&uart0 {
    pinctrl-0 = <&uart0_pins>;
    pinctrl-names = "default";
    status = "okay";
};


/* eMMC */
&ap_sdhci0 {
    bus-width = <4>;
    no-1-8-v;
    non-removable;
    status = "okay";
};


&cp0_pinctrl {
    cp0_uart0_pins: cp0-uart0-pins {
        marvell,pins = "mpp6", "mpp7";
        marvell,function = "uart0";
    };
    cp0_spi0_pins: cp0-spi0-pins {
        marvell,pins = "mpp56", "mpp57", "mpp58", "mpp59";
        marvell,function = "spi0";
    };
    cp0_spi1_pins: cp0-spi1-pins {
        marvell,pins = "mpp13", "mpp14", "mpp15", "mpp16";
        marvell,function = "spi1";
    };
    cp0_i2c0_pins: cp0-i2c0-pins {
        marvell,pins = "mpp37", "mpp38";
        marvell,function = "i2c0";
    };
    cp0_i2c1_pins: cp0-i2c1-pins {
        marvell,pins = "mpp2", "mpp3";
        marvell,function = "i2c1";
    };
    cp0_rgmii1_pins: cp0-rgmii1-pins {
        marvell,pins = "mpp44", "mpp45", "mpp46", "mpp47", "mpp48", "mpp49",
                       "mpp50", "mpp51", "mpp52", "mpp53", "mpp54", "mpp55";
        marvell,function = "ge1";
    };
    cp0_pcie_reset_pins: cp0-pcie-reset-pins {
        marvell,pins = "mpp9";
        marvell,function = "gpio";
    };
    is31_sdb_pins: is31-sdb-pins {
        marvell,pins = "mpp30";
        marvell,function = "gpio";
    };
    pca9554_int_pins: pca9554-int-pins {
        marvell,pins = "mpp27";
        marvell,function = "gpio";
    };
};


/* for mikroBUS : uart */
&cp0_uart0 {
    pinctrl-names = "default";
    pinctrl-0 = <&cp0_uart0_pins>;
    status = "okay";
};


/* for mikroBUS : spi */
&cp0_spi0 {
    pinctrl-names = "default";
    pinctrl-0 = <&cp0_spi0_pins>;
    status = "okay";
};


/* for spi-flash */
&cp0_spi1{
    pinctrl-names = "default";
    pinctrl-0 = <&cp0_spi1_pins>;
    status = "okay";


    spi-flash@0 {
        #address-cells = <0x1>;
        #size-cells = <0x1>;
        compatible = "jedec,spi-nor";
        reg = <0x0>;
        spi-max-frequency = <20000000>;


        partitions {
            compatible = "fixed-partitions";
            #address-cells = <1>;
            #size-cells = <1>;


            partition@0 {
                label = "u-boot";
                reg = <0x0 0x3e0000>;
            };
            partition@3e0000 {
                label = "hw-info";
                reg = <0x3e0000 0x10000>;
                read-only;
            };
            partition@3f0000 {
                label = "u-boot-env";
                reg = <0x3f0000 0x10000>;
            };
        };
    };
};


/* for mikroBUS, SFP */
&cp0_i2c0 {
    pinctrl-names = "default";
    pinctrl-0 = <&cp0_i2c0_pins>;
    status = "okay";
    clock-frequency = <100000>;


    expander0: pca9554@39 {
        pinctrl-names = "default";
        pinctrl-0 = <&pca9554_int_pins>;
        compatible = "nxp,pca9554";
        reg = <0x39>;


        interrupt-parent = <&cp0_gpio1>;
        interrupts = <27 IRQ_TYPE_EDGE_FALLING>;
        interrupt-controller;
        #interrupt-cells = <2>;


        gpio-controller;
        #gpio-cells = <2>;


        /*
         * IO0_0: SFP+_TX_FAULT
         * IO0_1: SFP+_TX_DISABLE
         * IO0_2: SFP+_PRSNT
         * IO0_3: SFP+_LOSS
         * IO0_4: SFP_TX_FAULT
         * IO0_5: SFP_TX_DISABLE
         * IO0_6: SFP_PRSNT
         * IO0_7: SFP_LOSS
         */
    };
};


/* for IS31FL3199, mini-PCIe, SFP+ */
&cp0_i2c1 {
    pinctrl-names = "default";
    pinctrl-0 = <&cp0_i2c1_pins>;
    status = "okay";
    clock-frequency = <100000>;


    leds: leds@64 {
        compatible = "issi,is31fl3199";
        #address-cells = <1>;
        #size-cells = <0>;
        reg = <0x64>;


        led1r: led@1 {
            label = "led1:red";
            reg = <1>;
            led-max-microamp = <20000>;
        };
        led1g: led@2 {
            label = "led1:green";
            reg = <2>;
        };
        led1b: led@3 {
            label = "led1:blue";
            reg = <3>;
        };
        led2r: led@4 {
            label = "led2:red";
            reg = <4>;
        };
        led2g: led@5 {
            label = "led2:green";
            reg = <5>;
        };
        led2b: led@6 {
            label = "led2:blue";
            reg = <6>;
        };
        led3r: led@7 {
            label = "led3:red";
            reg = <7>;
        };
        led3g: led@8 {
            label = "led3:green";
            reg = <8>;
        };
        led3b: led@9 {
            label = "led3:blue";
            reg = <9>;
        };
    };
};


&cp0_sata0 {
    status = "okay";
    sata-port@0 {
        phys = <&cp0_comphy2 0>;
        phy-names = "cp0-sata0-0-phy";
    };
    sata-port@1 {
        phys = <&cp0_comphy3 1>;
        phy-names = "cp0-sata0-1-phy";
    };
};


/* for usb3 hub */
&cp0_usb3_0 {
    phys = <&cp0_comphy1 0>;
    phy-names = "cp0-usb3h0-comphy";
    status = "okay";
};


/* connect to mini-pcie#1 (J5) */
&cp0_usb3_1 {
    status = "okay";
};


&cp0_mdio {
    status = "okay";


    /* for 88e1512 phy */
    cp0_ethphy0: ethernet-phy@0 {
        reg = <1>;
        sfp = <&sfp_eth2>;
    };


    /* 88e6341 topaz switch */
    switch0: switch0@1 {
        compatible = "marvell,mv88e6085";
        #address-cells = <1>;
        #size-cells = <0>;
        reg = <3>;


        dsa,member = <0 0>;


        ports {
            #address-cells = <1>;
            #size-cells = <0>;


            switch0port1: port@1 {
                reg = <1>;
                label = "lan0";
                phy-handle = <&switch0phy1>;
            };


            switch0port2: port@2 {
                reg = <2>;
                label = "lan1";
                phy-handle = <&switch0phy2>;
            };


            switch0port3: port@3 {
                reg = <3>;
                label = "lan2";
                phy-handle = <&switch0phy3>;
            };


            switch0port4: port@4 {
                reg = <4>;
                label = "lan3";
                phy-handle = <&switch0phy4>;
            };


            switch0port5: port@5 {
                reg = <5>;
                label = "cpu";
                ethernet = <&cp0_eth1>;
                phy-mode = "2500base-x";
                managed = "in-band-status";
            };
        };


        mdio {
            #address-cells = <1>;
            #size-cells = <0>;


            switch0phy1: switch0phy1@11 {
                reg = <0x11>;
            };
            switch0phy2: switch0phy2@12 {
                reg = <0x12>;
            };
            switch0phy3: switch0phy3@13 {
                reg = <0x13>;
            };
            switch0phy4: switch0phy4@14 {
                reg = <0x14>;
            };
        };
    };
};


&cp0_ethernet {
    status = "okay";
};


&cp0_eth0 {
    status = "okay";
    phy-mode = "10gbase-kr";
    phys = <&cp0_comphy4 0>;
    managed = "in-band-status";
    sfp = <&sfp_eth0>;
};


&cp0_eth1 {
    status = "okay";
    phy-mode = "2500base-x";
    phys = <&cp0_comphy0 1>;
    fixed-link {
        speed = <2500>;
        full-duplex;
    };
};


&cp0_eth2 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&cp0_rgmii1_pins>;
    phy = <&cp0_ethphy0>;
    phy-mode = "rgmii-id";
};


&cp0_pcie0 {
    status = "disabled";
};


&cp0_pcie1 {
    status = "disabled";
};


&cp0_pcie2 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&cp0_pcie_reset_pins>;
    phys = <&cp0_comphy5 2>;
    phy-names = "cp0-pcie2-x1-phy";
    reset-gpio = <&cp0_gpio1 9 GPIO_ACTIVE_LOW>;
    ranges =
        /* non-prefetchable memory */
        <0x82000000 0 0xc0000000 0 0xc0000000 0 0x30000000>;
};


&cp0_crypto {
    status = "okay";
};

I've been going around a circle since 2 weekends.

If someone can help me :)

Thanks by advance.

Doudoo
 


What Linux distro are you using? Why are you using ifup and ifdown with a 6.x kernel?

Try...

nmcli con up sfp1

Also, don't use ping to check lower level connectivity. Try...

ethtool sfp1

Look at the speed and duplex to see if you are connected.
If you can't ping, that's a different problem, likely subnet is mis-configured.
 
What Linux distro are you using? Why are you using ifup and ifdown with a 6.x kernel?

Try...

nmcli con up sfp1

Also, don't use ping to check lower level connectivity. Try...

ethtool sfp1

Look at the speed and duplex to see if you are connected.
If you can't ping, that's a different problem, likely subnet is mis-configured.

Hy.
First, Thank you to answer me.

I used a Linux build from Buildroot.
I tried with DHCP and ip static, respecting subnet mask (255.255.255.0)

So i tried your test with two different kernels.

First time based on a 5.10 version, found in the github of glodbalscale .
The Interface, here is eth2 ( i keep the initial naming)

Code:
# uname -a
Linux DiagBox 5.10.166-diagbox #1 SMP PREEMPT Mon May 29 14:17:51 CEST 2023 aarch64 GNU/Linux
# ethtool eth2
Settings for eth2:
        Supported ports: [ TP    MII     FIBRE ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
        Supported pause frame use: No
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/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
                                             1000baseT/Full
        Link partner advertised pause frame use: Symmetric Receive-only
        Link partner advertised auto-negotiation: Yes
        Link partner advertised FEC modes: Not reported
        Speed: 1000Mb/s
        Duplex: Full
        Auto-negotiation: on
        Port: Twisted Pair
        PHYAD: 1
        Transceiver: external
        MDI-X: Unknown
        Link detected: yes

Second time kernel net-next 6.3.
Here the interface is sfp1, change thanks to an Udev rules. I also tried with the initial name (eth2)

Code:
# ifup sfp1
[   72.071994] mvpp2 f2000000.ethernet sfp1: PHY [f212a200.mdio-mii:01] driver [Marvell 88E1510] (irq=POLL)
[   72.081659] mvpp2 f2000000.ethernet sfp1: configuring for phy/rgmii-id link mode
# [   76.183574] mvpp2 f2000000.ethernet sfp1: Link is Up - 1Gbps/Full - flow control off
[   76.191472] IPv6: ADDRCONF(NETDEV_CHANGE): sfp1: link becomes ready


#
# uname -a
Linux DiagBox 6.3.0-diagbox #1 SMP PREEMPT Mon May 29 19:04:00 CEST 2023 aarch64 GNU/Linux
#
#
# ethtool sfp1
Settings for sfp1:
        Supported ports: [ TP MII FIBRE ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/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
                                1000baseT/Full
        Advertised pause frame use: Symmetric Receive-only
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Speed: 1000Mb/s
        Duplex: Full
        Port: FIBRE
        PHYAD: 1
        Transceiver: external
        Auto-negotiation: on
        Link detected: yes
 
At this point, it seems your ethernet is working fine.
You may have some IP networking issues.
 
At this point, it seems your ethernet is working fine.
You may have some IP networking issues.
Hy.
I triée thé same configuration with two différent interfaces (eth0 ans eth2, not in same Time when i put a statix address ^^).
Works with eth0, not with eth2.

Iface eth0 inet dhcp
Iface eth2 inet dhcp
 
What is output of ...

ip addr

and ..

ip route

what is your gateway IP?
 
Hy

Here the output of the command lines you suggested to me.

I must to apply static ip because of in dhcp, i doesn't take an ip.

192.168.9.2 is my gateway with 255.255.255.0 for mask

Code:
# nano /gui/conf/interfaces_reseaux/sfp1
  GNU nano 6.0           /gui/conf/interfaces_reseaux/sfp1
#manual


######################################################
#
# Pour toute modif Wan,
# maj scripts bot_wan et coherence_wan
#
######################################################


iface sfp1 inet static
#iface eth2 inet static
        #udhcpc_opts -t 7
        address 192.168.9.1
        netmask 255.255.255.0
        gateway 192.168.9.2


iface rj0 inet dhcp










# ifup sfp1
[   76.031908] mvpp2 f2000000.ethernet sfp1: PHY [f212a200.mdio-mii:01] driver [                                                                        Marvell 88E1510] (irq=POLL)
[   76.041517] mvpp2 f2000000.ethernet sfp1: configuring for phy/rgmii-id link m                                                                        ode
# [   80.151470] mvpp2 f2000000.ethernet sfp1: Link is Up - 1Gbps/Full - flow co                                                                        ntrol off
[   80.159369] IPv6: ADDRCONF(NETDEV_CHANGE): sfp1: link becomes ready


#
# ip route
default via 192.168.9.2 dev sfp1
10.0.0.0/24 dev br-wire proto kernel scope link src 10.0.0.1 linkdown
192.168.9.0/24 dev sfp1 proto kernel scope link src 192.168.9.1
#
#
# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group defaul                                                                        t 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
       valid_lft forever preferred_lft forever
2: tunl0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
    link/ipip 0.0.0.0 brd 0.0.0.0
3: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
    link/sit 0.0.0.0 brd 0.0.0.0
4: sfp0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen                                                                         2048
    link/ether 64:69:61:67:62:01 brd ff:ff:ff:ff:ff:ff
5: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1508 qdisc mq state UP group defa                                                                        ult qlen 2048
    link/ether 2e:47:ab:de:87:37 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::2c47:abff:fede:8737/64 scope link
      valid_lft forever preferred_lft forever
6: sfp1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group defa                                                                        ult qlen 2048
    link/ether 64:69:61:67:62:02 brd ff:ff:ff:ff:ff:ff
    inet 192.168.9.1/24 scope global sfp1
       valid_lft forever preferred_lft forever
    inet6 fe80::6669:61ff:fe67:6202/64 scope link
       valid_lft forever preferred_lft forever
7: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qle                                                                        n 1000
    link/ether 00:0a:52:08:32:48 brd ff:ff:ff:ff:ff:ff
8: wlan1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qle                                                                        n 1000
    link/ether 00:0a:52:08:32:49 brd ff:ff:ff:ff:ff:ff
9: rj0@eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default                                                                         qlen 1000
    link/ether 2e:47:ab:de:87:37 brd ff:ff:ff:ff:ff:ff
10: rj1@eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master                                                                         br-wire state DOWN group default qlen 1000
    link/ether 2e:47:ab:de:87:37 brd ff:ff:ff:ff:ff:ff
11: rj2@eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master                                                                         br-wire state DOWN group default qlen 1000
    link/ether 2e:47:ab:de:87:37 brd ff:ff:ff:ff:ff:ff
12: rj3@eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master                                                                         br-wire state DOWN group default qlen 1000
    link/ether 2e:47:ab:de:87:37 brd ff:ff:ff:ff:ff:ff
13: br-wire: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DO                                                                        WN group default qlen 1000
    link/ether 2e:47:ab:de:87:37 brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.1/24 scope global br-wire
       valid_lft forever preferred_lft forever
 
I am a bit confused here, at first it looks like you have about 12 different network interfaces.
But then I look closer, and I see the same MAC address on a number of them.
For example interfaces 9 through 13 above all have the same MAC address as interface 5.

You can have multiple virtual network interfaces on a single interface, but there are some rules for this.
All the addresses must be in the same subnet, with the same gateway, and same network mask.
You cannot mix static and dhcp on these interfaces.
 
I am a bit confused here, at first it looks like you have about 12 different network interfaces.
But then I look closer, and I see the same MAC address on a number of them.
For example interfaces 9 through 13 above all have the same MAC address as interface 5.

You can have multiple virtual network interfaces on a single interface, but there are some rules for this.
All the addresses must be in the same subnet, with the same gateway, and same network mask.
You cannot mix static and dhcp on these interfaces.
Hy

Thanks to answer me.

The interfaces which have same mac address is in a distributed switch architecture ( no static mac address for them).

eth2 (or sfp1 in my modified dts) has its own mac address.

I've done some tests :
Eth2 interface has two cages : rj45 and sfp. Only one can works at a time.
Here, using rj45 port :

Code:
# ethtool -s eth2 autoneg off speed 10
# [  782.737447] mvpp2 f2000000.ethernet eth2: Link is Down


# ethtool -s eth2 autoneg off speed 10[  786.840104] mvpp2 f2000000.ethernet eth2: Link is Up - 10Mbps/Full - flow control off
# ping 192.168.8.2
PING 192.168.8.2 (192.168.8.2) 56(84) bytes of data.
64 bytes from 192.168.8.2: icmp_seq=1 ttl=128 time=1.27 ms
64 bytes from 192.168.8.2: icmp_seq=2 ttl=128 time=0.723 ms
64 bytes from 192.168.8.2: icmp_seq=3 ttl=128 time=0.734 ms
64 bytes from 192.168.8.2: icmp_seq=4 ttl=128 time=0.646 ms
^C
--- 192.168.8.2 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3045ms
rtt min/avg/max/mdev = 0.646/0.843/1.271/0.249 ms
# ethtool -s eth2 autoneg off speed 100
# [  797.897464] mvpp2 f2000000.ethernet eth2: Link is Down
[  801.976176] mvpp2 f2000000.ethernet eth2: Link is Up - 100Mbps/Full - flow control off


#
# ping 192.168.8.2
PING 192.168.8.2 (192.168.8.2) 56(84) bytes of data.
64 bytes from 192.168.8.2: icmp_seq=1 ttl=128 time=0.415 ms
64 bytes from 192.168.8.2: icmp_seq=2 ttl=128 time=0.592 ms
64 bytes from 192.168.8.2: icmp_seq=3 ttl=128 time=0.601 ms
64 bytes from 192.168.8.2: icmp_seq=4 ttl=128 time=0.569 ms
^C
--- 192.168.8.2 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3077ms
rtt min/avg/max/mdev = 0.415/0.544/0.601/0.075 ms
#
#
# ethtool -s eth2 autoneg off speed 1000
# [  814.013376] mvpp2 f2000000.ethernet eth2: Link is Down
[  818.104130] mvpp2 f2000000.ethernet eth2: Link is Up - 1Gbps/Full - flow control off


#
# ping 192.168.8.2
PING 192.168.8.2 (192.168.8.2) 56(84) bytes of data.
From 192.168.8.1 icmp_seq=1 Destination Host Unreachable
From 192.168.8.1 icmp_seq=2 Destination Host Unreachable
From 192.168.8.1 icmp_seq=3 Destination Host Unreachable
^C
--- 192.168.8.2 ping statistics ---
5 packets transmitted, 0 received, +3 errors, 100% packet loss, time 4101ms
pipe 4
#
#
# mii-diag -v eth2
mii-diag.c:v2.11 3/21/2005 Donald Becker ([email protected])
 http://www.scyld.com/diag/index.html
  Using the new SIOCGMIIPHY value on PHY 1 (BMCR 0x0140).
 The autonegotiated capability is 01e0.
The autonegotiated media type is 100baseTx-FD.
 Basic mode control register 0x0140: Auto-negotiation disabled, with
 Speed fixed at 10 mbps, full-duplex.
 You have link beat, and everything is working OK.
   This transceiver is capable of  100baseTx-FD 100baseTx 10baseT-FD 10baseT.
   Able to perform Auto-negotiation, negotiation complete.
 Your link partner advertised cde1: Flow-control 100baseTx-FD 100baseTx 10baseT-FD 10baseT, w/ 802.3X flow control.
   End of basic transceiver information.


libmii.c:v2.11 2/28/2005  Donald Becker ([email protected])
 http://www.scyld.com/diag/index.html
 MII PHY #1 transceiver registers:
   0140 796d 0141 0dd1 0de1 cde1 000d 2801
   4a47 0200 3800 0000 0000 4007 0000 3000
   2860 ac48 0000 5c40 0020 0000 0000 0000
   0000 0000 0040 0000 0000 0000 0000 0000.
 Basic mode control register 0x0140: Auto-negotiation disabled!
   Speed fixed at 10 mbps, full-duplex.
 Basic mode status register 0x796d ... 796d.
   Link status: established.
   Capable of  100baseTx-FD 100baseTx 10baseT-FD 10baseT.
   Able to perform Auto-negotiation, negotiation complete.
 Vendor ID is 00:50:43:--:--:--, model 29 rev. 1.
   No specific information is known about this transceiver type.
 I'm advertising 0de1: Flow-control 100baseTx-FD 100baseTx 10baseT-FD 10baseT
   Advertising no additional info pages.
   IEEE 802.3 CSMA/CD protocol.
 Link partner capability is cde1: Flow-control 100baseTx-FD 100baseTx 10baseT-FD 10baseT.
   Negotiation  completed.


Second  time kernel net-next 6.3.
Here the interface is sfp1, change thanks to an Udev rules. I also tried with the initial name (eth2)


# ifup sfp1
[   72.071994] mvpp2 f2000000.ethernet sfp1: PHY [f212a200.mdio-mii:01] driver [Marvell 88E1510] (irq=POLL)
[   72.081659] mvpp2 f2000000.ethernet sfp1: configuring for phy/rgmii-id link mode
# [   76.183574] mvpp2 f2000000.ethernet sfp1: Link is Up - 1Gbps/Full - flow control off
[   76.191472] IPv6: ADDRCONF(NETDEV_CHANGE): sfp1: link becomes ready


#
# uname -a
Linux DiagBox 6.3.0-diagbox #1 SMP PREEMPT Mon May 29 19:04:00 CEST 2023 aarch64 GNU/Linux
#
#
# ethtool sfp1
Settings for sfp1:
        Supported ports: [ TP MII FIBRE ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/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
                                1000baseT/Full
        Advertised pause frame use: Symmetric Receive-only
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Speed: 1000Mb/s
        Duplex: Full
        Port: FIBRE
        PHYAD: 1
        Transceiver: external
        Auto-negotiation: on
        Link detected: yes


So if i disable autoneg and down speed under 1000, it works.
But when i pass for 100, it fails.

My router is a giga.
With another interface of this board ( for example eth0), it works with autoneg and 1000.

When i use sfp cage :


Code:
# mii-diag eth2
Basic registers of MII PHY #1:  0140 0149 0141 0dd1 0060 4001 0006 2001.
 The autonegotiated capability is 0000.
No common media type was autonegotiated!
This is extremely unusual and typically indicates a configuration error.
Perhaps the advertised capability set was intentionally limited.
 Basic mode control register 0x0140: Auto-negotiation disabled, with
 Speed fixed at 10 mbps, full-duplex.
 Basic mode status register 0x0149 ... 014d.
   Link status: previously broken, but now reestablished.
 Your link partner advertised 4001:.
   End of basic transceiver information.


# ethtool eth2
Settings for eth2:
        Supported ports: [ TP MII FIBRE ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/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
                                1000baseT/Full
        Advertised pause frame use: Symmetric Receive-only
        Advertised auto-negotiation: No
        Advertised FEC modes: Not reported
        Speed: 1000Mb/s
        Duplex: Full
        Port: FIBRE
        PHYAD: 1
        Transceiver: external
        Auto-negotiation: off
        Link detected: yes
 
Hy, again me :)

I think i found the Problem but i don't know how to solve.

Code:
# ethtool sfp1
Settings for sfp1:
        Supported ports: [ TP MII FIBRE ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/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
                                1000baseT/Full
        Advertised pause frame use: Symmetric Receive-only
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Link partner advertised link modes:  1000baseT/Full
        Link partner advertised pause frame use: No
        Link partner advertised auto-negotiation: No
        Link partner advertised FEC modes: Not reported
        Speed: 1000Mb/s
        Duplex: Full
        Port: FIBRE
        PHYAD: 1
        Transceiver: external
        Auto-negotiation: on
        Link detected: yes

Advertised link modes is baseT

Here the same command line with the interface which works well :

Code:
# ethtool sfp0
Settings for sfp0:
        Supported ports: [ FIBRE ]
        Supported link modes:   2500baseX/Full
                                1000baseX/Full
        Supported pause frame use: Symmetric Receive-only
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  2500baseX/Full
        Advertised pause frame use: Symmetric Receive-only
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Speed: 2500Mb/s
        Duplex: Full
        Port: FIBRE
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
        Link detected: yes

Here i see advertised lin mode baseX.

I put a sfp gpon module. o if i amnot in wrong, link is baseX. BaseT is for rj45.
 

Members online


Latest posts

Top