[LEDE-DEV] [OpenWrt-Devel] [PATCH 0/4] Gemini forward-port to kernel v4.14

Linus Walleij linus.walleij at linaro.org
Fri May 11 10:07:55 PDT 2018


On Sat, May 5, 2018 at 5:19 PM, Roman Yeryomin <roman at advem.lv> wrote:
> On 2018-05-05 17:32, Linus Walleij wrote:
>>
>> On Tue, May 1, 2018 at 8:44 PM, Roman Yeryomin <roman at advem.lv> wrote:
>>
>>> Linus, if you have time, could you check if this helps to bring network
>>> up
>>> on dir-685?
>>>
>>> https://github.com/yeryomin/openwrt/commit/b0296b1f71bd3d677c931addd6de341203fbf18f
>>
>>
>> Sadly not. At least not outofthebox. I do not know what other
>> devices using the RTL8366RB is doing apart from this.
>
>
> What did dmesg say about it?
> Did you try swconfig tool? E.g. `swconfig list` and/or `swconfig dev switch0
> show`

I had to add swconfig and the kmod for the rtl8366rb and make a patch
to the device tree first. (I will send this separately.) Then things happened!

[   19.087592] Realtek RTL8366RB ethernet switch driver version 0.2.4
[   19.125518] rtl8366rb rtl8366rb: using GPIO pins 502 (SDA) and 501 (SCK)
[   19.167312] rtl8366rb rtl8366rb: RTL5937 ver. 3 chip found
[   19.960943] libphy: rtl8366rb: probed

root at OpenWrt:/# swconfig list
Found: switch0 - rtl8366rb

root at OpenWrt:~# swconfig dev switch0 show
Global attributes:
        enable_learning: 1
        enable_vlan: 1
        enable_vlan4k: 0
        blinkrate: 0
        enable_qos: 1
        enable_mirror_rx: 0
        enable_mirror_tx: 0
        enable_monitor_isolation: 0
        enable_mirror_pause_frames: 0
        mirror_monitor_port: 0
        mirror_source_port: 0
Port 0:
        mib: Port 0 MIB counters
IfInOctets                          : 696
EtherStatsOctets                    : 696
EtherStatsUnderSizePkts             : 0
EtherFragments                      : 0
EtherStatsPkts64Octets              : 0
EtherStatsPkts65to127Octets         : 0
EtherStatsPkts128to255Octets        : 4
EtherStatsPkts256to511Octets        : 0
EtherStatsPkts512to1023Octets       : 0
EtherStatsPkts1024to1518Octets      : 0
EtherOversizeStats                  : 0
EtherStatsJabbers                   : 0
IfInUcastPkts                       : 0
EtherStatsMulticastPkts             : 4
EtherStatsBroadcastPkts             : 0
EtherStatsDropEvents                : 0
Dot3StatsFCSErrors                  : 0
Dot3StatsSymbolErrors               : 0
Dot3InPauseFrames                   : 0
Dot3ControlInUnknownOpcodes         : 0
IfOutOctets                         : 0
Dot3StatsSingleCollisionFrames      : 0
Dot3StatMultipleCollisionFrames     : 0
Dot3sDeferredTransmissions          : 0
Dot3StatsLateCollisions             : 0
EtherStatsCollisions                : 0
Dot3StatsExcessiveCollisions        : 0
Dot3OutPauseFrames                  : 0
Dot1dBasePortDelayExceededDiscards  : 0
Dot1dTpPortInDiscards               : 0
IfOutUcastPkts                      : 0
IfOutMulticastPkts                  : 0
IfOutBroadcastPkts                  : 0

        led: 2
        disable: 0
        rate_in: 1048512
        rate_out: 1048512
        pvid: 1
        link: port:0 link:up speed:1000baseT full-duplex txflow rxflow
Port 1:
        mib: Port 1 MIB counters
IfInOctets                          : 0
EtherStatsOctets                    : 0
EtherStatsUnderSizePkts             : 0
EtherFragments                      : 0
EtherStatsPkts64Octets              : 0
EtherStatsPkts65to127Octets         : 0
EtherStatsPkts128to255Octets        : 0
EtherStatsPkts256to511Octets        : 0
EtherStatsPkts512to1023Octets       : 0
EtherStatsPkts1024to1518Octets      : 0
EtherOversizeStats                  : 0
EtherStatsJabbers                   : 0
IfInUcastPkts                       : 0
EtherStatsMulticastPkts             : 0
EtherStatsBroadcastPkts             : 0
EtherStatsDropEvents                : 0
Dot3StatsFCSErrors                  : 0
Dot3StatsSymbolErrors               : 0
Dot3InPauseFrames                   : 0
Dot3ControlInUnknownOpcodes         : 0
IfOutOctets                         : 0
Dot3StatsSingleCollisionFrames      : 0
Dot3StatMultipleCollisionFrames     : 0
Dot3sDeferredTransmissions          : 0
Dot3StatsLateCollisions             : 0
EtherStatsCollisions                : 0
Dot3StatsExcessiveCollisions        : 0
Dot3OutPauseFrames                  : 0
Dot1dBasePortDelayExceededDiscards  : 0
Dot1dTpPortInDiscards               : 0
IfOutUcastPkts                      : 0
IfOutMulticastPkts                  : 0
IfOutBroadcastPkts                  : 0

        led: 3
        disable: 0
        rate_in: 1048512
        rate_out: 1048512
        pvid: 2
        link: port:1 link:down
Port 2:
        mib: Port 2 MIB counters
IfInOctets                          : 0
EtherStatsOctets                    : 0
EtherStatsUnderSizePkts             : 0
EtherFragments                      : 0
EtherStatsPkts64Octets              : 0
EtherStatsPkts65to127Octets         : 0
EtherStatsPkts128to255Octets        : 0
EtherStatsPkts256to511Octets        : 0
EtherStatsPkts512to1023Octets       : 0
EtherStatsPkts1024to1518Octets      : 0
EtherOversizeStats                  : 0
EtherStatsJabbers                   : 0
IfInUcastPkts                       : 0
EtherStatsMulticastPkts             : 0
EtherStatsBroadcastPkts             : 0
EtherStatsDropEvents                : 0
Dot3StatsFCSErrors                  : 0
Dot3StatsSymbolErrors               : 0
Dot3InPauseFrames                   : 0
Dot3ControlInUnknownOpcodes         : 0
IfOutOctets                         : 0
Dot3StatsSingleCollisionFrames      : 0
Dot3StatMultipleCollisionFrames     : 0
Dot3sDeferredTransmissions          : 0
Dot3StatsLateCollisions             : 0
EtherStatsCollisions                : 0
Dot3StatsExcessiveCollisions        : 0
Dot3OutPauseFrames                  : 0
Dot1dBasePortDelayExceededDiscards  : 0
Dot1dTpPortInDiscards               : 0
IfOutUcastPkts                      : 0
IfOutMulticastPkts                  : 0
IfOutBroadcastPkts                  : 0

        led: 4
        disable: 0
        rate_in: 1048512
        rate_out: 1048512
        pvid: 3
        link: port:2 link:down
Port 3:
        mib: Port 3 MIB counters
IfInOctets                          : 0
EtherStatsOctets                    : 0
EtherStatsUnderSizePkts             : 0
EtherFragments                      : 0
EtherStatsPkts64Octets              : 0
EtherStatsPkts65to127Octets         : 0
EtherStatsPkts128to255Octets        : 0
EtherStatsPkts256to511Octets        : 0
EtherStatsPkts512to1023Octets       : 0
EtherStatsPkts1024to1518Octets      : 0
EtherOversizeStats                  : 0
EtherStatsJabbers                   : 0
IfInUcastPkts                       : 0
EtherStatsMulticastPkts             : 0
EtherStatsBroadcastPkts             : 0
EtherStatsDropEvents                : 0
Dot3StatsFCSErrors                  : 0
Dot3StatsSymbolErrors               : 0
Dot3InPauseFrames                   : 0
Dot3ControlInUnknownOpcodes         : 0
IfOutOctets                         : 0
Dot3StatsSingleCollisionFrames      : 0
Dot3StatMultipleCollisionFrames     : 0
Dot3sDeferredTransmissions          : 0
Dot3StatsLateCollisions             : 0
EtherStatsCollisions                : 0
Dot3StatsExcessiveCollisions        : 0
Dot3OutPauseFrames                  : 0
Dot1dBasePortDelayExceededDiscards  : 0
Dot1dTpPortInDiscards               : 0
IfOutUcastPkts                      : 0
IfOutMulticastPkts                  : 0
IfOutBroadcastPkts                  : 0

        led: 0
        disable: 0
        rate_in: 1048512
        rate_out: 1048512
        pvid: 4
        link: port:3 link:down
Port 4:
        mib: Port 4 MIB counters
IfInOctets                          : 0
EtherStatsOctets                    : 0
EtherStatsUnderSizePkts             : 0
EtherFragments                      : 0
EtherStatsPkts64Octets              : 0
EtherStatsPkts65to127Octets         : 0
EtherStatsPkts128to255Octets        : 0
EtherStatsPkts256to511Octets        : 0
EtherStatsPkts512to1023Octets       : 0
EtherStatsPkts1024to1518Octets      : 0
EtherOversizeStats                  : 0
EtherStatsJabbers                   : 0
IfInUcastPkts                       : 0
EtherStatsMulticastPkts             : 0
EtherStatsBroadcastPkts             : 0
EtherStatsDropEvents                : 0
Dot3StatsFCSErrors                  : 0
Dot3StatsSymbolErrors               : 0
Dot3InPauseFrames                   : 0
Dot3ControlInUnknownOpcodes         : 0
IfOutOctets                         : 0
Dot3StatsSingleCollisionFrames      : 0
Dot3StatMultipleCollisionFrames     : 0
Dot3sDeferredTransmissions          : 0
Dot3StatsLateCollisions             : 0
EtherStatsCollisions                : 0
Dot3StatsExcessiveCollisions        : 0
Dot3OutPauseFrames                  : 0
Dot1dBasePortDelayExceededDiscards  : 0
Dot1dTpPortInDiscards               : 0
IfOutUcastPkts                      : 0
IfOutMulticastPkts                  : 0
IfOutBroadcastPkts                  : 0

        led: ???
        disable: 0
        rate_in: 1048512
        rate_out: 1048512
        pvid: 5
        link: port:4 link:down
Port 5:
        mib: Port 5 MIB counters
IfInOctets                          : 0
EtherStatsOctets                    : 0
EtherStatsUnderSizePkts             : 0
EtherFragments                      : 0
EtherStatsPkts64Octets              : 0
EtherStatsPkts65to127Octets         : 0
EtherStatsPkts128to255Octets        : 0
EtherStatsPkts256to511Octets        : 0
EtherStatsPkts512to1023Octets       : 0
EtherStatsPkts1024to1518Octets      : 0
EtherOversizeStats                  : 0
EtherStatsJabbers                   : 0
IfInUcastPkts                       : 0
EtherStatsMulticastPkts             : 0
EtherStatsBroadcastPkts             : 0
EtherStatsDropEvents                : 0
Dot3StatsFCSErrors                  : 0
Dot3StatsSymbolErrors               : 0
Dot3InPauseFrames                   : 0
Dot3ControlInUnknownOpcodes         : 0
IfOutOctets                         : 696
Dot3StatsSingleCollisionFrames      : 0
Dot3StatMultipleCollisionFrames     : 0
Dot3sDeferredTransmissions          : 0
Dot3StatsLateCollisions             : 0
EtherStatsCollisions                : 0
Dot3StatsExcessiveCollisions        : 0
Dot3OutPauseFrames                  : 0
Dot1dBasePortDelayExceededDiscards  : 0
Dot1dTpPortInDiscards               : 0
IfOutUcastPkts                      : 0
IfOutMulticastPkts                  : 4
IfOutBroadcastPkts                  : 0

        led: ???
        disable: 0
        rate_in: 1048512
        rate_out: 1048512
        pvid: 6
        link: port:5 link:up speed:1000baseT full-duplex txflow rxflow auto
VLAN 1:
        info: VLAN 1: Ports: '05', members=0021, untag=0021, fid=0
        fid: 0
        ports: 0 5
VLAN 2:
        info: VLAN 2: Ports: '15', members=0022, untag=0022, fid=0
        fid: 0
        ports: 1 5
VLAN 3:
        info: VLAN 3: Ports: '25', members=0024, untag=0024, fid=0
        fid: 0
        ports: 2 5
VLAN 4:
        info: VLAN 4: Ports: '35', members=0028, untag=0028, fid=0
        fid: 0
        ports: 3 5
VLAN 5:
        info: VLAN 5: Ports: '45', members=0030, untag=0030, fid=0
        fid: 0
        ports: 4 5
VLAN 6:
        info: VLAN 6: Ports: '012345', members=003f, untag=003f, fid=0
        fid: 0
        ports: 0 1 2 3 4 5

However despite setting up the static IP to 169.254.1.2 and my host
connected with a crossed ethernet as 169.254.1.1 (this works fine
for TFTP boot!) it doesn't answer to ping.

root at OpenWrt:~# ifconfig
br-lan    Link encap:Ethernet  HWaddr 02:EE:17:81:C5:3D
          inet addr:169.254.1.2  Bcast:169.254.1.255  Mask:255.255.255.0
          inet6 addr: fd8d:ded0:53fe::1/60 Scope:Global
          UP BROADCAST MULTICAST  MTU:1500  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:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

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:128 errors:0 dropped:0 overruns:0 frame:0
          TX packets:128 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:8760 (8.5 KiB)  TX bytes:8760 (8.5 KiB)

root at OpenWrt:~# ping 169.254.1.1
PING 169.254.1.1 (169.254.1.1): 56 data bytes

(hangs, same from host)

Yours,
Linus Walleij



More information about the Lede-dev mailing list