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 89dc3bcfdf0fd0a5d1e3b09ac73ac6b5a04275c4..987e6793257f8c63b19a1599be759573538c8298 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 8a1bd98cd8939c8c8c39c3a3a423ebcbd162a3ce..2cc3318f9478e51d935579c76060cc402fbb0009 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 78e5afe9bd4ac3a0f90da2c7b6a935e113b01d40..e08c996d8f8e4da66aa2699a4b2d627b736b9362 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++)