From: Felix Fietkau Date: Wed, 2 Sep 2009 15:18:26 +0000 (+0000) Subject: merge r17469-17471 to 8.09 - fixes failsafe mode on fonera+ and fonera 2.0 X-Git-Tag: 8.09.2~56 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=3330057823d8e3f48d89fd9fee8fef2e3510ef4e;p=openwrt%2Fsvn-archive%2Fopenwrt.git merge r17469-17471 to 8.09 - fixes failsafe mode on fonera+ and fonera 2.0 SVN-Revision: 17472 --- diff --git a/package/base-files/files/etc/preinit b/package/base-files/files/etc/preinit index 89dc3bcfdf..987e679325 100755 --- a/package/base-files/files/etc/preinit +++ b/package/base-files/files/etc/preinit @@ -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 diff --git a/target/linux/atheros/base-files/etc/preinit.arch b/target/linux/atheros/base-files/etc/preinit.arch index 8a1bd98cd8..2cc3318f94 100755 --- a/target/linux/atheros/base-files/etc/preinit.arch +++ b/target/linux/atheros/base-files/etc/preinit.arch @@ -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 diff --git a/target/linux/generic-2.6/files-2.6.26/drivers/net/phy/mvswitch.c b/target/linux/generic-2.6/files-2.6.26/drivers/net/phy/mvswitch.c index 78e5afe9bd..e08c996d8f 100644 --- a/target/linux/generic-2.6/files-2.6.26/drivers/net/phy/mvswitch.c +++ b/target/linux/generic-2.6/files-2.6.26/drivers/net/phy/mvswitch.c @@ -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++)