ramips: move ESW reset to preinit on RT305x/RT5350

RT305x/RT5350 SoCs require the switch to be reset before touching the ethernet
interface, otherwise the driver will panic.
As we already init the ethernet in preinit we therefor need to reset the switch
before that.

Signed-off-by: Felix Kaechele <felix@fetzig.org>

SVN-Revision: 37027
master
John Crispin 11 years ago
parent 111b480945
commit 5063f712a6
  1. 1
      target/linux/ramips/base-files/etc/uci-defaults/02_network
  2. 15
      target/linux/ramips/base-files/lib/preinit/07_set_preinit_iface_ramips

@ -13,7 +13,6 @@ ramips_setup_rt3x5x_vlans()
fi fi
local wanports="" local wanports=""
local lanports="" local lanports=""
swconfig dev rt305x set reset 1
for port in 5 4 3 2 1 0; do for port in 5 4 3 2 1 0; do
if [ `swconfig dev rt305x port $port get disable` = "1" ]; then if [ `swconfig dev rt305x port $port get disable` = "1" ]; then
continue continue

@ -6,17 +6,10 @@
. /lib/ramips.sh . /lib/ramips.sh
ramips_set_preinit_iface() { ramips_set_preinit_iface() {
local board=$(ramips_board_name) RT3X5X=`cat /proc/cpuinfo | egrep "(RT3.5|RT5350)"`
if [ -n "${RT3X5X}" ]; then
case "$board" in swconfig dev rt305x set reset 1
mpr-a2) fi
#TODO
# Ralink ethernet driver cannot re-open ethernet if it is opened during preinit and then closed.
# Looks like Ralink ethernet driver has a problem.
# Temporary solution is not to open ethernet during preinit.
return 0
;;
esac
ifname=eth0 ifname=eth0
} }

Loading…
Cancel
Save