summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2009-11-23 16:53:56 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2009-11-23 16:53:56 +0000
commitede94fdb134206c721f41cd91dfe46aff6b9d583 (patch)
treec43437a1f7ea2b72e350e4bdd1cea54a0a4c7273 /sys
parent6b4ca9ab5e505da5e3e0a2bb5cbcbc76d1dd678e (diff)
Later on this will do much more work on suspend/resume, but for now
it must call it's children. ok kettenis
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/ppb.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/sys/dev/pci/ppb.c b/sys/dev/pci/ppb.c
index 7149d34637b..88bd6597309 100644
--- a/sys/dev/pci/ppb.c
+++ b/sys/dev/pci/ppb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ppb.c,v 1.36 2009/11/19 20:46:16 kettenis Exp $ */
+/* $OpenBSD: ppb.c,v 1.37 2009/11/23 16:53:55 deraadt Exp $ */
/* $NetBSD: ppb.c,v 1.16 1997/06/06 23:48:05 thorpej Exp $ */
/*
@@ -64,9 +64,10 @@ struct ppb_softc {
int ppbmatch(struct device *, void *, void *);
void ppbattach(struct device *, struct device *, void *);
int ppbdetach(struct device *self, int flags);
+int ppbactivate(struct device *self, int act);
struct cfattach ppb_ca = {
- sizeof(struct ppb_softc), ppbmatch, ppbattach, ppbdetach
+ sizeof(struct ppb_softc), ppbmatch, ppbattach, ppbdetach, ppbactivate
};
struct cfdriver ppb_cd = {
@@ -311,6 +312,24 @@ ppbdetach(struct device *self, int flags)
return (rv);
}
+int
+ppbactivate(struct device *self, int act)
+{
+ int rv = 0;
+
+ switch (act) {
+ case DVACT_SUSPEND:
+ config_activate_children(self, act);
+ /* XXX should power down the ppb */
+ break;
+ case DVACT_RESUME:
+ /* XXX should power up the ppb */
+ config_activate_children(self, act);
+ break;
+ }
+ return (rv);
+}
+
void
ppb_alloc_resources(struct ppb_softc *sc, struct pci_attach_args *pa)
{