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

John Crispin blogic at openwrt.org
Sat Oct 18 01:37:17 EDT 2014


On 18/10/2014 00:10, Michael Uray wrote:
> 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.
Hi,

the code does not set the FULL_CHIP_RESET but checks whether it is set.
also please look at the unreachable() macro instead of using a endless loop

    John



>
> 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
_______________________________________________
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