提交 83448bf7 编写于 作者: J Jan Beulich 提交者: Wim Van Sebroeck

watchdog: xen: don't unconditionally enable the watchdog during resume

This was found to be a problem particularly after guest migration.
Signed-off-by: NJan Beulich <jbeulich@suse.com>
Reported-by: NWouter de Geus <benv-xensource.com@junerules.com>
Reported-by: NIan Campbell <Ian.Campbell@citrix.com>
Tested-by: NWouter de Geus <benv-xensource.com@junerules.com>
Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
上级 ccd4144d
...@@ -296,11 +296,18 @@ static void xen_wdt_shutdown(struct platform_device *dev) ...@@ -296,11 +296,18 @@ static void xen_wdt_shutdown(struct platform_device *dev)
static int xen_wdt_suspend(struct platform_device *dev, pm_message_t state) static int xen_wdt_suspend(struct platform_device *dev, pm_message_t state)
{ {
return xen_wdt_stop(); typeof(wdt.id) id = wdt.id;
int rc = xen_wdt_stop();
wdt.id = id;
return rc;
} }
static int xen_wdt_resume(struct platform_device *dev) static int xen_wdt_resume(struct platform_device *dev)
{ {
if (!wdt.id)
return 0;
wdt.id = 0;
return xen_wdt_start(); return xen_wdt_start();
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册