summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_hibernate.c
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2014-03-13 03:52:55 +0000
committerdlg <dlg@openbsd.org>2014-03-13 03:52:55 +0000
commitc3f3b0fe7f6addfa8f7e3716b02787ffc9c4c836 (patch)
tree21358d6ebade683f83a8a73c16f934edb8a47eb8 /sys/kern/subr_hibernate.c
parentDrop the REPUN bit from CvmCtl register not to allow unaligned access. (diff)
downloadwireguard-openbsd-c3f3b0fe7f6addfa8f7e3716b02787ffc9c4c836.tar.xz
wireguard-openbsd-c3f3b0fe7f6addfa8f7e3716b02787ffc9c4c836.zip
get rid of the assumption that the head of the alldevs list is the
"mainbus" device. this breaks when mpath is enabled because it attaches before mainbus and therefore takes the head position. have autoconf provide device_mainbus() which looks up mainbus_cd, and use that instead. discussed with deraadt who just wants mpath stuff to move forward despite there being many ways to shine this particular turd.
Diffstat (limited to 'sys/kern/subr_hibernate.c')
-rw-r--r--sys/kern/subr_hibernate.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/subr_hibernate.c b/sys/kern/subr_hibernate.c
index 147a3e1803b..4d0efd949c6 100644
--- a/sys/kern/subr_hibernate.c
+++ b/sys/kern/subr_hibernate.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr_hibernate.c,v 1.84 2014/02/01 07:10:33 mlarkin Exp $ */
+/* $OpenBSD: subr_hibernate.c,v 1.85 2014/03/13 03:52:56 dlg Exp $ */
/*
* Copyright (c) 2011 Ariane van der Steldt <ariane@stack.nl>
@@ -1152,14 +1152,14 @@ hibernate_resume(void)
if (hibernate_read_image(&disk_hib))
goto fail;
- if (config_suspend(TAILQ_FIRST(&alldevs), DVACT_QUIESCE) != 0)
+ if (config_suspend(device_mainbus(), DVACT_QUIESCE) != 0)
goto fail;
(void) splhigh();
hibernate_disable_intr_machdep();
cold = 1;
- if (config_suspend(TAILQ_FIRST(&alldevs), DVACT_SUSPEND) != 0) {
+ if (config_suspend(device_mainbus(), DVACT_SUSPEND) != 0) {
cold = 0;
hibernate_enable_intr_machdep();
goto fail;