#17839: Reboot command causes sometimes hanging router with TL-WDR3600 (HW V1.5)
and TL-WDR4300 (HW V1.7)
--------------------------+-----------------------------------
Reporter: michaeluray | Owner: developers
Type: defect | Status: new
Priority: high | Milestone: Barrier Breaker 14.07
Component: base system | Version: Barrier Breaker 14.07
Resolution: | Keywords: reboot
--------------------------+-----------------------------------
Comment (by michaeluray):
Replying to [comment:52 michaeluray]:
> I have also no experience with kernel programming neither with more
hardware near programming, but I will try to compile and test BB with the
following changed function to fix this problem:
>
> {{{
> static void ath79_restart(char *command)
> {
> for (;;)
> {
> ath79_device_reset_set(AR71XX_RESET_FULL_CHIP);
> if (cpu_wait)
> cpu_wait();
> }
> }
> }}}
>
> I will probably find tomorrow some time to verify if this solution works
on the involved routers.
I tested my proposed solution, but it did not work.
After that I did test a solution which is very similar to the solution
which was posted in comment 51 and it looks like as it works well.
I did a couple (> 20) of reboots with it and the router never was hanging.
I used the following code:
build_dir/target-mips_34kc_uClibc-0.9.33.2/linux-
ar71xx_generic/linux-3.10.49/arch/mips/ath79/common.c
{{{
#!c
void ath79_device_reset_set(u32 mask)
{
unsigned long flags;
u32 reg;
u32 t;
if (soc_is_ar71xx())
reg = AR71XX_RESET_REG_RESET_MODULE;
else if (soc_is_ar724x())
reg = AR724X_RESET_REG_RESET_MODULE;
else if (soc_is_ar913x())
reg = AR913X_RESET_REG_RESET_MODULE;
else if (soc_is_ar933x())
reg = AR933X_RESET_REG_RESET_MODULE;
else if (soc_is_ar934x())
reg = AR934X_RESET_REG_RESET_MODULE;
else if (soc_is_qca953x())
reg = QCA953X_RESET_REG_RESET_MODULE;
else if (soc_is_qca955x())
reg = QCA955X_RESET_REG_RESET_MODULE;
else
panic("Reset register not defined for this SOC");
spin_lock_irqsave(&ath79_device_reset_lock, flags);
t = ath79_reset_rr(reg);
if (mask == AR71XX_RESET_FULL_CHIP)
for (;;)
ath79_reset_wr(reg, mask);
else
ath79_reset_wr(reg, t | mask);
spin_unlock_irqrestore(&ath79_device_reset_lock, flags);
}
}}}
Has anyone a glue why that works, but not the original version?
Has the CPU maybe a problem with executing a reset of a submodule and a
full chip reset at the same time? - Why did it work on the earlier
hardware revisions?
--
Ticket URL: <https://dev.openwrt.org/ticket/17839#comment:55>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets