summaryrefslogtreecommitdiff
path: root/sys/dev/pci/pciide.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2012-10-08 21:47:52 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2012-10-08 21:47:52 +0000
commit4a7a1f17c7d6f8e79f29d4fde2ba5faf09b7f5a8 (patch)
treefdc5670bf4d0a8cd810fe846698cb565f1f51cb9 /sys/dev/pci/pciide.c
parentc7f240fd53223122e6fe8cee52bb76b460263763 (diff)
Revamp the sequences for suspend/hibernate -> resume so that the code
paths are reflexive. It is now possible to fail part-way through a suspend sequence, and recover along the resume code path. Split DVACT_SUSPEND by adding a new DVACT_POWERDOWN method is used after hibernate (and suspend too) to finish the job. Some drivers must be converted at the same time to use this instead of shutdown hooks (the others will follow at a later time) ok kettenis mlarkin
Diffstat (limited to 'sys/dev/pci/pciide.c')
-rw-r--r--sys/dev/pci/pciide.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/pci/pciide.c b/sys/dev/pci/pciide.c
index 34976ae11a6..45f112c53ea 100644
--- a/sys/dev/pci/pciide.c
+++ b/sys/dev/pci/pciide.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pciide.c,v 1.339 2012/04/22 14:22:28 miod Exp $ */
+/* $OpenBSD: pciide.c,v 1.340 2012/10/08 21:47:50 deraadt Exp $ */
/* $NetBSD: pciide.c,v 1.127 2001/08/03 01:31:08 tsutsui Exp $ */
/*
@@ -1489,6 +1489,9 @@ pciide_activate(struct device *self, int act)
sc->sc_tag, NFORCE_UDMATIM);
}
break;
+ case DVACT_POWERDOWN:
+ rv = config_activate_children(self, act);
+ break;
case DVACT_RESUME:
for (i = 0; i < nitems(sc->sc_save); i++)
pci_conf_write(sc->sc_pc, sc->sc_tag,