Skip to content

Commit

Permalink
watchdog: xen: don't unconditionally enable the watchdog during resume
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jan Beulich authored and Wim Van Sebroeck committed Mar 27, 2012
1 parent ccd4144 commit 83448bf
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion drivers/watchdog/xen_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
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)
{
if (!wdt.id)
return 0;
wdt.id = 0;
return xen_wdt_start();
}

Expand Down

0 comments on commit 83448bf

Please sign in to comment.