which will result in more stable filesystems during suspend
ok kettenis
-/* $OpenBSD: apm.c,v 1.86 2010/06/26 23:24:43 guenther Exp $ */
+/* $OpenBSD: apm.c,v 1.87 2010/07/20 12:23:00 deraadt Exp $ */
/*-
* Copyright (c) 1998-2001 Michael Shalayeff. All rights reserved.
#include <sys/device.h>
#include <sys/fcntl.h>
#include <sys/ioctl.h>
+#include <sys/buf.h>
#include <sys/event.h>
#include <sys/mount.h> /* for vfs_syncwait() proto */
#if NWSDISPLAY > 0
wsdisplay_suspend();
#endif /* NWSDISPLAY > 0 */
+ bufq_quiesce();
+
dopowerhooks(PWR_SUSPEND);
if (cold)
#if NWSDISPLAY > 0
wsdisplay_suspend();
#endif /* NWSDISPLAY > 0 */
+ bufq_quiesce();
+
dopowerhooks(PWR_STANDBY);
if (cold)
/* restore hw.setperf */
if (cpu_setperf != NULL)
cpu_setperf(perflevel);
+ bufq_restart();
#if NWSDISPLAY > 0
wsdisplay_resume();
#endif /* NWSDISPLAY > 0 */
-/* $OpenBSD: zaurus_apm.c,v 1.15 2010/04/21 03:11:30 deraadt Exp $ */
+/* $OpenBSD: zaurus_apm.c,v 1.16 2010/07/20 12:23:02 deraadt Exp $ */
/*
* Copyright (c) 2005 Uwe Stuehler <uwe@bsdx.de>
#include <sys/timeout.h>
#include <sys/conf.h>
#include <sys/proc.h>
+#include <sys/buf.h>
#include <sys/sysctl.h>
#include <arm/xscale/pxa2x0reg.h>
{
struct zapm_softc *sc = (struct zapm_softc *)pxa_sc;
+ bufq_quiesce();
+
/* Poll in suspended mode and forget the discharge timeout. */
sc->sc_suspended = 1;
timeout_del(&sc->sc_poll);
#endif
}
+ bufq_restart();
return (wakeup);
}