Explorar o código

switch: the hardware must be up while configuring Since the removal of the interface coldplug hack the timing changed in such a way that eth0 is not up during switch setup, leading to an inaccesible device. Bring up the switch interface before configuring it to mitigate the problem.

SVN-Revision: 30937
Jo-Philipp Wich %!s(int64=13) %!d(string=hai) anos
pai
achega
654f9c879f
Modificáronse 2 ficheiros con 3 adicións e 2 borrados
  1. 2 2
      package/switch/Makefile
  2. 1 0
      package/switch/files/switch.sh

+ 2 - 2
package/switch/Makefile

@@ -1,5 +1,5 @@
 # 
-# Copyright (C) 2006-2011 OpenWrt.org
+# Copyright (C) 2006-2012 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=kmod-switch
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 
 include $(INCLUDE_DIR)/package.mk
 

+ 1 - 0
package/switch/files/switch.sh

@@ -11,6 +11,7 @@ setup_switch_hw() {
 
 	local proc="/proc/switch/$dev"
 	[ -d "$proc" ] && {
+		ifconfig "$dev" up
 		echo "$reset"  > "$proc/reset"
 		echo "$evlan"  > "$proc/enable_vlan"
 		[ -f "$proc/enable" ] && echo "$enable" > "$proc/enable"