Modify

Opened 7 years ago

Closed 5 years ago

Last modified 4 years ago

#9707 closed defect (no_response)

Failsafe is broken on brcm47xx, won't ping.

Reported by: Jérôme Poulin <jeromepoulin@…> Owned by: hauke
Priority: high Milestone: Barrier Breaker 14.07
Component: base system Version: Trunk
Keywords: Cc:

Description

After trying a custom build from last night's trunk, I broke something and tried using failsafe to restore my change however I wasn't able to ping, then I tried to TFTP latest snapshot with the same result, 192.168.1.1 pings twice using -i 0.1 then fail and device is not accessible. Power and DMZ flash, port 1 blinks but it seems the VLAN is down. Maybe it is linked to #7118 ?

Attachments (0)

Change History (8)

comment:1 Changed 7 years ago by Jérôme Poulin <jeromepoulin@…>

I played with a JFFS2 filesystem a bit and hooked into 05_set_failsafe_switch_brcm:

failsafe_ip() {
        [ -d /proc/switch/eth0 ] && [ "$ifname" = "eth0" ] && {
                ifconfig eth0 0.0.0.0 down
                echo "0 1 2 3 4 ${cpu_port:-5u*}" > /proc/switch/eth0/vlan/0/ports
        }
        
        [ -n "$pi_ifname" ] && grep -q "$pi_ifname" /proc/net/dev && {
                ifconfig $pi_ifname $pi_ip netmask $pi_netmask broadcast $pi_broadcast up
        }

        mount -o remount,rw /
        insmod ipv6
        sleep 5
        ifconfig -a > /test1.txt
        dmesg > /test2.log
        ping -c 4 192.168.1.99 > /test3.txt
        sync
        mount -o remount,ro /
}

ifconfig (test1.txt)

eth0      Link encap:Ethernet  HWaddr 00:1C:10:5A:BD:D4  
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::21c:10ff:fe5a:bdd4/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:45 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:4552 (4.4 KiB)  TX bytes:5651 (5.5 KiB)
          Interrupt:4 

lo        Link encap:Local Loopback  
          LOOPBACK  MTU:16436  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:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

dmesg log (test2.log)

b44: b44.c:v2.0
b44 ssb0:0: eth0: Broadcom 44xx/47xx 10/100BaseT Ethernet 00:1c:10:5a:bd:d4
BCM47xx Watchdog Timer enabled (30 seconds, nowayout)
TCP westwood registered
NET: Registered protocol family 17
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
JFFS2 notice: (1) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
VFS: Mounted root (jffs2 filesystem) readonly on device 31:2.
Freeing unused kernel memory: 156k freed
diag: Detected 'Linksys WRT54G/GS/GL'
b44 ssb0:0: eth0: Link is up at 100 Mbps, full duplex
b44 ssb0:0: eth0: Flow control is off for TX and off for RX
roboswitch: Probing device eth0: found a 5325! It's a 5350.
b44 ssb0:0: eth0: powering down PHY
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:173] SIOCSMIIREG failed!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:173] SIOCSMIIREG failed!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:173] SIOCSMIIREG failed!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:137] SIOCGMIIREG failed!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:137] SIOCGMIIREG failed!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:137] SIOCGMIIREG failed!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:197] timeout in robo_reg!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:173] SIOCSMIIREG failed!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:173] SIOCSMIIREG failed!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:173] SIOCSMIIREG failed!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:137] SIOCGMIIREG failed!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:137] SIOCGMIIREG failed!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:137] SIOCGMIIREG failed!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:197] timeout in robo_reg!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:173] SIOCSMIIREG failed!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:173] SIOCSMIIREG failed!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:173] SIOCSMIIREG failed!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:137] SIOCGMIIREG failed!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:137] SIOCGMIIREG failed!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:137] SIOCGMIIREG failed!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:197] timeout in robo_reg!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:173] SIOCSMIIREG failed!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:173] SIOCSMIIREG failed!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:173] SIOCSMIIREG failed!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:137] SIOCGMIIREG failed!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:137] SIOCGMIIREG failed!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:137] SIOCGMIIREG failed!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:197] timeout in robo_reg!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:173] SIOCSMIIREG failed!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:173] SIOCSMIIREG failed!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:173] SIOCSMIIREG failed!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:137] SIOCGMIIREG failed!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:137] SIOCGMIIREG failed!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:137] SIOCGMIIREG failed!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:197] timeout in robo_reg!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:173] SIOCSMIIREG failed!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:173] SIOCSMIIREG failed!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:173] SIOCSMIIREG failed!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:137] SIOCGMIIREG failed!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:137] SIOCGMIIREG failed!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:137] SIOCGMIIREG failed!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:197] timeout in robo_reg!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:173] SIOCSMIIREG failed!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:173] SIOCSMIIREG failed!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:173] SIOCSMIIREG failed!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:173] SIOCSMIIREG failed!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:137] SIOCGMIIREG failed!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:137] SIOCGMIIREG failed!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:137] SIOCGMIIREG failed!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:197] timeout in robo_reg!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:173] SIOCSMIIREG failed!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:173] SIOCSMIIREG failed!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:173] SIOCSMIIREG failed!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:137] SIOCGMIIREG failed!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:137] SIOCGMIIREG failed!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:137] SIOCGMIIREG failed!
roboswitch: [/usr/src/openwrt/compiles/brcm47xx/build_dir/linux-brcm47xx/kmod-switch/switch-robo.c:197] timeout in robo_reg!
b44 ssb0:0: eth0: Link is up at 100 Mbps, full duplex
b44 ssb0:0: eth0: Flow control is off for TX and off for RX
NET: Registered protocol family 10

And test3 didn't get any answer, my laptop is at 192.168.1.99

comment:2 Changed 7 years ago by Jérôme Poulin <jeromepoulin@…>

Even more!

Hooking at:

preinit_ip() {
    if [ -z "$pi_ifname" ]; then
        pi_ifname=$ifname
    fi

    [ -n "$pi_ifname" ] && grep -q "$pi_ifname" /proc/net/dev && {
        ifconfig $pi_ifname $pi_ip netmask $pi_netmask broadcast $pi_broadcast up
    }
 
    telnetd -l /bin/login.sh <> /dev/null 2>&1
    sleep 10           

Then telnet works until sleep 10 expires.

comment:3 Changed 7 years ago by Jérôme Poulin <jeromepoulin@…>

Deleting /lib/preinit/15_set_preinit_interface_brcm makes everything back to normal and failsafe works once again.

comment:4 Changed 7 years ago by Jérôme Poulin <jeromepoulin@…>

After discussion with xMff, I found out that 15_set_preinit_interface_brcm had the line:
echo "0 ${cpu_port:-5u*}" > /proc/switch/eth0/vlan/0/ports
Which makes only the port 4 available for failsafe on WRT54GL v1.1. Using netconfig information would allow using all LAN ports or at least use "0 1 2 3 5u*".

comment:5 Changed 5 years ago by florian

  • Owner changed from developers to hauke
  • Status changed from new to assigned

comment:6 Changed 5 years ago by hauke

Does this problem still exist in recent versions of trunk or in the Attitude Adjustment?

comment:7 Changed 5 years ago by nbd

  • Resolution set to no_response
  • Status changed from assigned to closed

comment:8 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.