#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: closed
Priority: high | Milestone: Barrier Breaker 14.07
Component: base system | Version: Barrier Breaker 14.07
Resolution: fixed | Keywords: reboot
--------------------------+-----------------------------------
Comment (by michaeluray):
Replying to [comment:67 nbd]:
> fix committed in r42955
I have tried to apply your patch to BB and it did not work there.
I also tried the following code modifications and just the modification
"common.c - for loop" works for me.
"common.c - for loop" - '''works'''
{{{
#!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);
ath79_reset_wr(reg, t | mask);
if (mask == AR71XX_RESET_FULL_CHIP)
for(;;);
spin_unlock_irqrestore(&ath79_device_reset_lock, flags);
}
}}}
"common.c - irq disabled, unreachable macro" - '''router hangs'''
{{{
#!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)
local_irq_disable();
ath79_reset_wr(reg, t | mask);
if (mask == AR71XX_RESET_FULL_CHIP)
unreachable();
spin_unlock_irqrestore(&ath79_device_reset_lock, flags);
}
}}}
"common.c - unreachable macro" - '''router hangs'''
{{{
#!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);
ath79_reset_wr(reg, t | mask);
if (mask == AR71XX_RESET_FULL_CHIP)
unreachable();
spin_unlock_irqrestore(&ath79_device_reset_lock, flags);
}
}}}
"setup.c - irq disabled, for loop" - '''router hangs'''
{{{
#!c
static void ath79_restart(char *command)
{
local_irq_disable();
ath79_device_reset_set(AR71XX_RESET_FULL_CHIP);
for (;;)
if (cpu_wait)
cpu_wait();
}
}}}
--
Ticket URL: <https://dev.openwrt.org/ticket/17839#comment:70>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets