merge r17469-17471 to 8.09 - fixes failsafe mode on fonera+ and fonera 2.0
authorFelix Fietkau <nbd@openwrt.org>
Wed, 2 Sep 2009 15:18:26 +0000 (15:18 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 2 Sep 2009 15:18:26 +0000 (15:18 +0000)
SVN-Revision: 17472

package/base-files/files/etc/preinit
target/linux/atheros/base-files/etc/preinit.arch
target/linux/generic-2.6/files-2.6.26/drivers/net/phy/mvswitch.c

index 89dc3bc..987e679 100755 (executable)
@@ -65,7 +65,11 @@ echo "- preinit -"
 echo "Press CTRL-C for failsafe"
 trap 'FAILSAFE=true' INT
 trap 'FAILSAFE=true' USR1
-[ -e /etc/preinit.arch ] && . /etc/preinit.arch
+if [ -e /etc/preinit.arch ]; then
+       . /etc/preinit.arch
+else
+       sleep 2
+fi
 set_state preinit
 echo "$HOTPLUG" > /proc/sys/kernel/hotplug
 export FAILSAFE
index 8a1bd98..2cc3318 100755 (executable)
@@ -13,8 +13,9 @@ grep 'Atheros AR231[567]' /proc/cpuinfo > /dev/null && {
        netmsg 192.168.1.255 "Press reset now, to enter Failsafe!"
        ifconfig "$ifname" 0.0.0.0 down
        sleep 2
-       if [ -e "/sys/bus/mdio_bus/drivers/Infineon ADM6996/0:00" -o \
-            -e "/sys/bus/mdio_bus/drivers/Marvell 88E6060/0:1f" ]; then
+       if [ -z "$FAILSAFE" -a \
+            \( -e "/sys/bus/mdio_bus/drivers/Infineon ADM6996/0:00" -o \
+               -e "/sys/bus/mdio_bus/drivers/Marvell 88E6060/0:1f" \) ]; then
                vconfig rem eth0.0
                ifconfig eth0 down
        fi
index 78e5afe..e08c996 100644 (file)
@@ -246,6 +246,9 @@ mvswitch_config_init(struct phy_device *pdev)
        pdev->advertising = ADVERTISED_100baseT_Full;
        dev->phy_ptr = priv;
        dev->irq = PHY_POLL;
+#ifdef HEADER_MODE
+       dev->flags |= IFF_PROMISC;
+#endif
 
        /* initialize default vlans */
        for (i = 0; i < MV_PORTS; i++)