[OpenWrt-Devel] [PATCH 1/1] [kernel] ar71xx: reset problem fix

Michael Uray Michael.Uray at ctb.co.at
Fri Oct 17 18:10:28 EDT 2014


This patch fixes the reset bug on the ar71xx platform.

The reboot command causes sometimes hanging routers with TL-WDR3600 (HW V1.5) and TL-WDR4300 (HW V1.7) platforms and probably also on other devices.

Sometimes a reboot is successful, sometimes not and a power cycle of the device is required.
This patch runs an endless loop after the interrupts get disabled and the FULL_CHIP_RESET gets set and waits then until the CPU reboots.

There is also a ticket #17839 to this bug.
https://dev.openwrt.org/ticket/17839

Signed-off-by: Michael Uray <michael.uray at ctb.co.at>

I am not subscribed to the mailing list, so please put me on CC if you answer.

---
--- a/arch/mips/ath79/common.c
+++ b/arch/mips/ath79/common.c
@@ -83,6 +83,8 @@ void ath79_device_reset_set(u32 mask)
        spin_lock_irqsave(&ath79_device_reset_lock, flags);
        t = ath79_reset_rr(reg);
        ath79_reset_wr(reg, t | mask);
+       if (mask == AR71XX_RESET_FULL_CHIP)
+                for (;;);
        spin_unlock_irqrestore(&ath79_device_reset_lock, flags);
 }
 EXPORT_SYMBOL_GPL(ath79_device_reset_set);
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list