summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/pci')
-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)
{