From 7c9ea1f9d77ca6f94c87b4552b9bfb088183b889 Mon Sep 17 00:00:00 2001 From: mlarkin Date: Sun, 8 Jul 2012 21:11:49 +0000 Subject: Quiesce and suspend devices in the resuming kernel for hibernate. ok deraadt@ --- sys/kern/subr_hibernate.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'sys/kern/subr_hibernate.c') diff --git a/sys/kern/subr_hibernate.c b/sys/kern/subr_hibernate.c index 23d1dba89b6..673df70751b 100644 --- a/sys/kern/subr_hibernate.c +++ b/sys/kern/subr_hibernate.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_hibernate.c,v 1.38 2012/07/08 14:29:52 deraadt Exp $ */ +/* $OpenBSD: subr_hibernate.c,v 1.39 2012/07/08 21:11:49 mlarkin Exp $ */ /* * Copyright (c) 2011 Ariane van der Steldt @@ -1111,6 +1111,12 @@ hibernate_resume(void) if (hibernate_read_image(&disk_hiber_info)) goto fail; + if (config_suspend(TAILQ_FIRST(&alldevs), DVACT_QUIESCE) != 0) + goto fail; + + if (config_suspend(TAILQ_FIRST(&alldevs), DVACT_SUSPEND) != 0) + goto fail; + /* Point of no return ... */ disable_intr(); -- cgit v1.2.3-59-g8ed1b