[LEDE-DEV] [PATCH] ar71xx: fix gmac0 speed function for qca956x

hackpascal hackpascal at gmail.com
Fri Feb 17 22:54:48 PST 2017

From: Weijie Gao <hackpascal at gmail.com>

This patch fixed the problem that kernel will crash when WAN port is
linked-up in QCA9561.

When GMAC0 is configured as GMII, it's connected to the internal switch.
In this situation, there's no need to adjust the speed of GMAC0, and the
function ath79_set_speed_dummy should be used.

Prevoiusly this function was incorrectly set to ath79_set_speed_ge0,
which is used for AR71XX/AR91XX. If WAN port is linked-up, this function
will crash the kernel due to incorrect register access.

Signed-off-by: Weijie Gao <hackpascal at gmail.com>
 target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c
index a8b19b6..793323d 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c
@@ -1096,7 +1096,7 @@ void __init ath79_register_eth(unsigned int id)
 			if (pdata->phy_if_mode == PHY_INTERFACE_MODE_SGMII)
 				pdata->set_speed = qca956x_set_speed_sgmii;
-				pdata->set_speed = ar934x_set_speed_ge0;
+				pdata->set_speed = ath79_set_speed_dummy;
 		} else {
 			pdata->reset_bit = QCA955X_RESET_GE1_MAC |

More information about the Lede-dev mailing list