summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2009-11-30 19:08:02 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2009-11-30 19:08:02 +0000
commit61ee70e132469d5ecec58958368c60f0931fcb89 (patch)
treea32b95e94b3ed7da16997cce747da1f550523121 /sys/dev
parent46ad95bbabc4e68c288183156210bd12effb80b1 (diff)
Re-initialise the interface upon resume.
ok deraadt@, pirofti@, claudio@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/if_bge.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/sys/dev/pci/if_bge.c b/sys/dev/pci/if_bge.c
index 8bda2fff7de..1f106345681 100644
--- a/sys/dev/pci/if_bge.c
+++ b/sys/dev/pci/if_bge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bge.c,v 1.286 2009/10/11 16:53:13 sthen Exp $ */
+/* $OpenBSD: if_bge.c,v 1.287 2009/11/30 19:08:01 kettenis Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
@@ -127,9 +127,10 @@
const struct bge_revision * bge_lookup_rev(u_int32_t);
int bge_probe(struct device *, void *, void *);
void bge_attach(struct device *, struct device *, void *);
+int bge_activate(struct device *, int);
struct cfattach bge_ca = {
- sizeof(struct bge_softc), bge_probe, bge_attach
+ sizeof(struct bge_softc), bge_probe, bge_attach, NULL, bge_activate
};
struct cfdriver bge_cd = {
@@ -2259,6 +2260,20 @@ fail_1:
bus_space_unmap(sc->bge_btag, sc->bge_bhandle, size);
}
+int
+bge_activate(struct device *self, int act)
+{
+ switch(act) {
+ case DVACT_SUSPEND:
+ break;
+ case DVACT_RESUME:
+ bge_power(PWR_RESUME, self);
+ break;
+ }
+
+ return (0);
+}
+
void
bge_reset(struct bge_softc *sc)
{