summaryrefslogtreecommitdiff
path: root/sys/dev/ipmi.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/ipmi.c')
-rw-r--r--sys/dev/ipmi.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/sys/dev/ipmi.c b/sys/dev/ipmi.c
index 5556db905ad..b53d643ac90 100644
--- a/sys/dev/ipmi.c
+++ b/sys/dev/ipmi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ipmi.c,v 1.73 2014/10/21 08:48:38 uebayasi Exp $ */
+/* $OpenBSD: ipmi.c,v 1.74 2014/12/10 12:27:57 mikeb Exp $ */
/*
* Copyright (c) 2005 Jordan Hargrave
@@ -158,6 +158,7 @@ int ipmi_watchdog(void *, int);
int ipmi_intr(void *);
int ipmi_match(struct device *, void *, void *);
void ipmi_attach(struct device *, struct device *, void *);
+int ipmi_activate(struct device *, int);
long ipow(long, int);
long ipmi_convert(u_int8_t, struct sdrtype1 *, long);
@@ -835,7 +836,8 @@ struct ipmi_bmc_response {
};
struct cfattach ipmi_ca = {
- sizeof(struct ipmi_softc), ipmi_match, ipmi_attach
+ sizeof(struct ipmi_softc), ipmi_match, ipmi_attach,
+ NULL, ipmi_activate
};
struct cfdriver ipmi_cd = {
@@ -1761,6 +1763,18 @@ ipmi_attach(struct device *parent, struct device *self, void *aux)
}
int
+ipmi_activate(struct device *self, int act)
+{
+ switch (act) {
+ case DVACT_POWERDOWN:
+ wdog_shutdown(self);
+ break;
+ }
+
+ return (0);
+}
+
+int
ipmi_watchdog(void *arg, int period)
{
struct ipmi_softc *sc = arg;