aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2014-10-30 10:10:57 +0000
committerJohn Crispin <john@openwrt.org>2014-10-30 10:10:57 +0000
commit2f30ba532808e1f63c3852ea6f82a8fe12a36dc3 (patch)
tree8635dcde473e82de1771c2870225189116f73151
parent0b64dca49d0a7fde6acbb3568d7f97846192a461 (diff)
downloadupstream-2f30ba532808e1f63c3852ea6f82a8fe12a36dc3.tar.gz
upstream-2f30ba532808e1f63c3852ea6f82a8fe12a36dc3.tar.bz2
upstream-2f30ba532808e1f63c3852ea6f82a8fe12a36dc3.zip
ralink: make sure a mii_bus is loaded before accesing its state
this caused a crash on boot Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 43120
-rw-r--r--target/linux/ramips/patches-3.14/0035-NET-MIPS-add-ralink-SoC-ethernet-driver.patch8
1 files changed, 4 insertions, 4 deletions
diff --git a/target/linux/ramips/patches-3.14/0035-NET-MIPS-add-ralink-SoC-ethernet-driver.patch b/target/linux/ramips/patches-3.14/0035-NET-MIPS-add-ralink-SoC-ethernet-driver.patch
index 853ad79ab7..e82f93d780 100644
--- a/target/linux/ramips/patches-3.14/0035-NET-MIPS-add-ralink-SoC-ethernet-driver.patch
+++ b/target/linux/ramips/patches-3.14/0035-NET-MIPS-add-ralink-SoC-ethernet-driver.patch
@@ -97,7 +97,7 @@ Index: linux-3.14.18/arch/mips/ralink/rt305x.c
Index: linux-3.14.18/drivers/net/ethernet/Kconfig
===================================================================
--- linux-3.14.18.orig/drivers/net/ethernet/Kconfig 2014-09-06 01:34:59.000000000 +0200
-+++ linux-3.14.18/drivers/net/ethernet/Kconfig 2014-10-30 09:43:22.196245753 +0100
++++ linux-3.14.18/drivers/net/ethernet/Kconfig 2014-10-30 11:09:42.442557047 +0100
@@ -134,6 +134,7 @@
source "drivers/net/ethernet/packetengines/Kconfig"
source "drivers/net/ethernet/pasemi/Kconfig"
@@ -109,7 +109,7 @@ Index: linux-3.14.18/drivers/net/ethernet/Kconfig
Index: linux-3.14.18/drivers/net/ethernet/Makefile
===================================================================
--- linux-3.14.18.orig/drivers/net/ethernet/Makefile 2014-09-06 01:34:59.000000000 +0200
-+++ linux-3.14.18/drivers/net/ethernet/Makefile 2014-10-30 09:43:22.196245753 +0100
++++ linux-3.14.18/drivers/net/ethernet/Makefile 2014-10-30 11:09:42.442557047 +0100
@@ -56,6 +56,7 @@
obj-$(CONFIG_NET_PACKET_ENGINE) += packetengines/
obj-$(CONFIG_NET_VENDOR_PASEMI) += pasemi/
@@ -1685,7 +1685,7 @@ Index: linux-3.14.18/drivers/net/ethernet/ralink/esw_rt3052.h
Index: linux-3.14.18/drivers/net/ethernet/ralink/gsw_mt7620a.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-3.14.18/drivers/net/ethernet/ralink/gsw_mt7620a.c 2014-10-30 09:02:08.735269671 +0100
++++ linux-3.14.18/drivers/net/ethernet/ralink/gsw_mt7620a.c 2014-10-30 11:05:31.228845263 +0100
@@ -0,0 +1,569 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
@@ -2197,7 +2197,7 @@ Index: linux-3.14.18/drivers/net/ethernet/ralink/gsw_mt7620a.c
+ struct mt7620_gsw *gsw = (struct mt7620_gsw *) priv->soc->swpriv;
+
+ /* is the mt7530 internal or external */
-+ if (priv->mii_bus->phy_map[0x1f]) {
++ if (priv->mii_bus && priv->mii_bus->phy_map[0x1f]) {
+ mt7530_probe(priv->device, gsw->base, NULL, 0);
+ mt7530_probe(priv->device, NULL, priv->mii_bus, 1);
+ } else {