diff options
author | hauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-11-24 20:24:27 +0000 |
---|---|---|
committer | hauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-11-24 20:24:27 +0000 |
commit | c57e2a3047ba7651aae205b34fe701c3312ca5e9 (patch) | |
tree | 5d403f3c598a1e6e1804257c5016a9b64e84bedd /target/linux | |
parent | 9a462204d13bd8acd735f8111dc7f9412e812b33 (diff) |
brcm47xx: watchdog: deactivate NOWAYOUT.
In the old configuration the SoC issued a reboot if the watchdog was
killed also if it was kill with TERM and not KILL.
This will fix #11724.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34324 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux')
6 files changed, 34 insertions, 28 deletions
diff --git a/target/linux/brcm47xx/config-3.6 b/target/linux/brcm47xx/config-3.6 index 4859a5b6d1..478ba847c5 100644 --- a/target/linux/brcm47xx/config-3.6 +++ b/target/linux/brcm47xx/config-3.6 @@ -145,5 +145,4 @@ CONFIG_USB_ARCH_HAS_XHCI=y # CONFIG_USB_HCD_SSB is not set CONFIG_USB_SUPPORT=y CONFIG_WATCHDOG_CORE=y -CONFIG_WATCHDOG_NOWAYOUT=y CONFIG_ZONE_DMA_FLAG=0 diff --git a/target/linux/brcm47xx/patches-3.6/540-watchdog-bcm47xx_wdt.c-convert-to-watchdog-core-api.patch b/target/linux/brcm47xx/patches-3.6/540-watchdog-bcm47xx_wdt.c-convert-to-watchdog-core-api.patch index 7ac56387fe..21136c0e3c 100644 --- a/target/linux/brcm47xx/patches-3.6/540-watchdog-bcm47xx_wdt.c-convert-to-watchdog-core-api.patch +++ b/target/linux/brcm47xx/patches-3.6/540-watchdog-bcm47xx_wdt.c-convert-to-watchdog-core-api.patch @@ -26,16 +26,23 @@ #include <linux/watchdog.h> #include <linux/timer.h> #include <linux/jiffies.h> -@@ -48,8 +45,6 @@ MODULE_PARM_DESC(nowayout, +@@ -41,15 +38,11 @@ module_param(wdt_time, int, 0); + MODULE_PARM_DESC(wdt_time, "Watchdog time in seconds. (default=" + __MODULE_STRING(WDT_DEFAULT_TIME) ")"); + +-#ifdef CONFIG_WATCHDOG_NOWAYOUT + module_param(nowayout, bool, 0); + MODULE_PARM_DESC(nowayout, + "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); - #endif +-#endif -static unsigned long bcm47xx_wdt_busy; -static char expect_release; static struct timer_list wdt_timer; static atomic_t ticks; -@@ -97,29 +92,31 @@ static void bcm47xx_timer_tick(unsigned +@@ -97,29 +90,31 @@ static void bcm47xx_timer_tick(unsigned } } @@ -75,7 +82,7 @@ { if ((new_time <= 0) || (new_time > WDT_MAX_TIME)) return -EINVAL; -@@ -128,51 +125,6 @@ static int bcm47xx_wdt_settimeout(int ne +@@ -128,51 +123,6 @@ static int bcm47xx_wdt_settimeout(int ne return 0; } @@ -127,7 +134,7 @@ static const struct watchdog_info bcm47xx_wdt_info = { .identity = DRV_NAME, .options = WDIOF_SETTIMEOUT | -@@ -180,80 +132,25 @@ static const struct watchdog_info bcm47x +@@ -180,80 +130,25 @@ static const struct watchdog_info bcm47x WDIOF_MAGICCLOSE, }; @@ -217,7 +224,7 @@ }; static struct notifier_block bcm47xx_wdt_notifier = { -@@ -274,12 +171,13 @@ static int __init bcm47xx_wdt_init(void) +@@ -274,12 +169,13 @@ static int __init bcm47xx_wdt_init(void) pr_info("wdt_time value must be 0 < wdt_time < %d, using %d\n", (WDT_MAX_TIME + 1), wdt_time); } @@ -232,7 +239,7 @@ if (ret) { unregister_reboot_notifier(&bcm47xx_wdt_notifier); return ret; -@@ -292,10 +190,8 @@ static int __init bcm47xx_wdt_init(void) +@@ -292,10 +188,8 @@ static int __init bcm47xx_wdt_init(void) static void __exit bcm47xx_wdt_exit(void) { @@ -245,7 +252,7 @@ unregister_reboot_notifier(&bcm47xx_wdt_notifier); } -@@ -306,4 +202,3 @@ module_exit(bcm47xx_wdt_exit); +@@ -306,4 +200,3 @@ module_exit(bcm47xx_wdt_exit); MODULE_AUTHOR("Aleksandar Radovanovic"); MODULE_DESCRIPTION("Watchdog driver for Broadcom BCM47xx"); MODULE_LICENSE("GPL"); diff --git a/target/linux/brcm47xx/patches-3.6/541-watchdog-bcm47xx_wdt.c-use-platform-device.patch b/target/linux/brcm47xx/patches-3.6/541-watchdog-bcm47xx_wdt.c-use-platform-device.patch index 79bb962f78..593aace7f7 100644 --- a/target/linux/brcm47xx/patches-3.6/541-watchdog-bcm47xx_wdt.c-use-platform-device.patch +++ b/target/linux/brcm47xx/patches-3.6/541-watchdog-bcm47xx_wdt.c-use-platform-device.patch @@ -30,9 +30,9 @@ #define DRV_NAME "bcm47xx_wdt" -@@ -45,48 +46,19 @@ MODULE_PARM_DESC(nowayout, +@@ -43,48 +44,19 @@ MODULE_PARM_DESC(nowayout, + "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); - #endif -static struct timer_list wdt_timer; -static atomic_t ticks; @@ -87,7 +87,7 @@ } else { pr_crit("Watchdog will fire soon!!!\n"); } -@@ -94,23 +66,29 @@ static void bcm47xx_timer_tick(unsigned +@@ -92,23 +64,29 @@ static void bcm47xx_timer_tick(unsigned static int bcm47xx_wdt_keepalive(struct watchdog_device *wdd) { @@ -122,7 +122,7 @@ return 0; } -@@ -118,10 +96,13 @@ static int bcm47xx_wdt_stop(struct watch +@@ -116,10 +94,13 @@ static int bcm47xx_wdt_stop(struct watch static int bcm47xx_wdt_set_timeout(struct watchdog_device *wdd, unsigned int new_time) { @@ -138,7 +138,7 @@ return 0; } -@@ -135,8 +116,11 @@ static const struct watchdog_info bcm47x +@@ -133,8 +114,11 @@ static const struct watchdog_info bcm47x static int bcm47xx_wdt_notify_sys(struct notifier_block *this, unsigned long code, void *unused) { @@ -151,7 +151,7 @@ return NOTIFY_DONE; } -@@ -148,57 +132,72 @@ static struct watchdog_ops bcm47xx_wdt_o +@@ -146,57 +130,72 @@ static struct watchdog_ops bcm47xx_wdt_o .set_timeout = bcm47xx_wdt_set_timeout, }; diff --git a/target/linux/brcm47xx/patches-3.6/542-watchdog-bcm47xx_wdt.c-rename-ops-methods.patch b/target/linux/brcm47xx/patches-3.6/542-watchdog-bcm47xx_wdt.c-rename-ops-methods.patch index 54956fd2d7..8d85303e4b 100644 --- a/target/linux/brcm47xx/patches-3.6/542-watchdog-bcm47xx_wdt.c-rename-ops-methods.patch +++ b/target/linux/brcm47xx/patches-3.6/542-watchdog-bcm47xx_wdt.c-rename-ops-methods.patch @@ -1,8 +1,8 @@ --- a/drivers/watchdog/bcm47xx_wdt.c +++ b/drivers/watchdog/bcm47xx_wdt.c -@@ -46,12 +46,13 @@ MODULE_PARM_DESC(nowayout, +@@ -44,12 +44,13 @@ MODULE_PARM_DESC(nowayout, + "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); - #endif + static inline struct bcm47xx_wdt *bcm47xx_wdt_get(struct watchdog_device *wdd) @@ -15,7 +15,7 @@ { struct bcm47xx_wdt *wdt = (struct bcm47xx_wdt *)data; u32 next_tick = min(wdt->wdd.timeout * 1000, wdt->max_timer_ms); -@@ -64,7 +65,7 @@ static void bcm47xx_timer_tick(unsigned +@@ -62,7 +63,7 @@ static void bcm47xx_timer_tick(unsigned } } @@ -24,7 +24,7 @@ { struct bcm47xx_wdt *wdt = bcm47xx_wdt_get(wdd); -@@ -73,17 +74,17 @@ static int bcm47xx_wdt_keepalive(struct +@@ -71,17 +72,17 @@ static int bcm47xx_wdt_keepalive(struct return 0; } @@ -46,7 +46,7 @@ { struct bcm47xx_wdt *wdt = bcm47xx_wdt_get(wdd); -@@ -93,8 +94,8 @@ static int bcm47xx_wdt_stop(struct watch +@@ -91,8 +92,8 @@ static int bcm47xx_wdt_stop(struct watch return 0; } @@ -57,7 +57,7 @@ { if (new_time < 1 || new_time > WDT_MAX_TIME) { pr_warn("timeout value must be 1<=x<=%d, using %d\n", -@@ -124,12 +125,12 @@ static int bcm47xx_wdt_notify_sys(struct +@@ -122,12 +123,12 @@ static int bcm47xx_wdt_notify_sys(struct return NOTIFY_DONE; } @@ -75,7 +75,7 @@ }; static int __devinit bcm47xx_wdt_probe(struct platform_device *pdev) -@@ -140,10 +141,10 @@ static int __devinit bcm47xx_wdt_probe(s +@@ -138,10 +139,10 @@ static int __devinit bcm47xx_wdt_probe(s if (!wdt) return -ENXIO; diff --git a/target/linux/brcm47xx/patches-3.6/543-watchdog-bcm47xx_wdt.c-rename-wdt_timeout-to-timeout.patch b/target/linux/brcm47xx/patches-3.6/543-watchdog-bcm47xx_wdt.c-rename-wdt_timeout-to-timeout.patch index c08f0b1536..568581faeb 100644 --- a/target/linux/brcm47xx/patches-3.6/543-watchdog-bcm47xx_wdt.c-rename-wdt_timeout-to-timeout.patch +++ b/target/linux/brcm47xx/patches-3.6/543-watchdog-bcm47xx_wdt.c-rename-wdt_timeout-to-timeout.patch @@ -17,8 +17,8 @@ +MODULE_PARM_DESC(timeout, "Watchdog time in seconds. (default=" __MODULE_STRING(WDT_DEFAULT_TIME) ")"); - #ifdef CONFIG_WATCHDOG_NOWAYOUT -@@ -97,9 +97,9 @@ static int bcm47xx_wdt_soft_stop(struct + module_param(nowayout, bool, 0); +@@ -95,9 +95,9 @@ static int bcm47xx_wdt_soft_stop(struct static int bcm47xx_wdt_soft_set_timeout(struct watchdog_device *wdd, unsigned int new_time) { @@ -30,7 +30,7 @@ return -EINVAL; } -@@ -163,7 +163,7 @@ static int __devinit bcm47xx_wdt_probe(s +@@ -161,7 +161,7 @@ static int __devinit bcm47xx_wdt_probe(s goto err_notifier; pr_info("BCM47xx Watchdog Timer enabled (%d seconds%s)\n", diff --git a/target/linux/brcm47xx/patches-3.6/544-watchdog-bcm47xx_wdt.c-add-hard-timer.patch b/target/linux/brcm47xx/patches-3.6/544-watchdog-bcm47xx_wdt.c-add-hard-timer.patch index 3e67ba2bb1..6970e10ea0 100644 --- a/target/linux/brcm47xx/patches-3.6/544-watchdog-bcm47xx_wdt.c-add-hard-timer.patch +++ b/target/linux/brcm47xx/patches-3.6/544-watchdog-bcm47xx_wdt.c-add-hard-timer.patch @@ -8,7 +8,7 @@ static int timeout = WDT_DEFAULT_TIME; static bool nowayout = WATCHDOG_NOWAYOUT; -@@ -52,6 +53,53 @@ static inline struct bcm47xx_wdt *bcm47x +@@ -50,6 +51,53 @@ static inline struct bcm47xx_wdt *bcm47x return container_of(wdd, struct bcm47xx_wdt, wdd); } @@ -62,7 +62,7 @@ static void bcm47xx_wdt_soft_timer_tick(unsigned long data) { struct bcm47xx_wdt *wdt = (struct bcm47xx_wdt *)data; -@@ -136,15 +184,22 @@ static struct watchdog_ops bcm47xx_wdt_s +@@ -134,15 +182,22 @@ static struct watchdog_ops bcm47xx_wdt_s static int __devinit bcm47xx_wdt_probe(struct platform_device *pdev) { int ret; @@ -88,7 +88,7 @@ wdt->wdd.info = &bcm47xx_wdt_info; wdt->wdd.timeout = WDT_DEFAULT_TIME; ret = wdt->wdd.ops->set_timeout(&wdt->wdd, timeout); -@@ -162,14 +217,16 @@ static int __devinit bcm47xx_wdt_probe(s +@@ -160,14 +215,16 @@ static int __devinit bcm47xx_wdt_probe(s if (ret) goto err_notifier; |