diff options
author | Jan Beulich <JBeulich@suse.com> | 2012-03-19 05:30:33 -0400 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2012-03-27 14:13:43 -0400 |
commit | 83448bf7867917d5fd104e65275d8e153f3293a8 (patch) | |
tree | 565e83415dae4ee4a4b31e3213898f9017418bf3 /drivers/watchdog | |
parent | ccd4144dd41c32a284a5b040f87aaefed0361a21 (diff) |
watchdog: xen: don't unconditionally enable the watchdog during resume
This was found to be a problem particularly after guest migration.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reported-by: Wouter de Geus <benv-xensource.com@junerules.com>
Reported-by: Ian Campbell <Ian.Campbell@citrix.com>
Tested-by: Wouter de Geus <benv-xensource.com@junerules.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r-- | drivers/watchdog/xen_wdt.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/watchdog/xen_wdt.c b/drivers/watchdog/xen_wdt.c index 79aa7f96c246..e04fd6cf2121 100644 --- a/drivers/watchdog/xen_wdt.c +++ b/drivers/watchdog/xen_wdt.c | |||
@@ -296,11 +296,18 @@ static void xen_wdt_shutdown(struct platform_device *dev) | |||
296 | 296 | ||
297 | static int xen_wdt_suspend(struct platform_device *dev, pm_message_t state) | 297 | static int xen_wdt_suspend(struct platform_device *dev, pm_message_t state) |
298 | { | 298 | { |
299 | return xen_wdt_stop(); | 299 | typeof(wdt.id) id = wdt.id; |
300 | int rc = xen_wdt_stop(); | ||
301 | |||
302 | wdt.id = id; | ||
303 | return rc; | ||
300 | } | 304 | } |
301 | 305 | ||
302 | static int xen_wdt_resume(struct platform_device *dev) | 306 | static int xen_wdt_resume(struct platform_device *dev) |
303 | { | 307 | { |
308 | if (!wdt.id) | ||
309 | return 0; | ||
310 | wdt.id = 0; | ||
304 | return xen_wdt_start(); | 311 | return xen_wdt_start(); |
305 | } | 312 | } |
306 | 313 | ||