summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMarc Balmer <mbalmer@cvs.openbsd.org>2006-12-11 08:25:55 +0000
committerMarc Balmer <mbalmer@cvs.openbsd.org>2006-12-11 08:25:55 +0000
commit435de0b43240fc368deb1b81da268e882a3ab469 (patch)
tree4eeb2e2eb6acec2830960806cebf52b68c72bc86 /sys
parent8a3594ffe03a6bc9dd6ba88e7e7d4a35d46215c9 (diff)
Only disarm the watchdog if we really want to, not before each re-trigger.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/pwdog.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/dev/pci/pwdog.c b/sys/dev/pci/pwdog.c
index 66c455b6a59..0e728b85cdf 100644
--- a/sys/dev/pci/pwdog.c
+++ b/sys/dev/pci/pwdog.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pwdog.c,v 1.4 2006/12/11 08:15:56 mbalmer Exp $ */
+/* $OpenBSD: pwdog.c,v 1.5 2006/12/11 08:25:54 mbalmer Exp $ */
/*
* Copyright (c) 2006 Marc Balmer <mbalmer@openbsd.org>
@@ -41,7 +41,6 @@ struct pwdog_softc {
int pwdog_probe(struct device *, void *, void *);
void pwdog_attach(struct device *, struct device *, void *);
-void pwdog_init_timer(struct pwdog_softc *);
int pwdog_set_timeout(void *, int);
struct cfattach pwdog_ca = {
@@ -84,7 +83,6 @@ pwdog_attach(struct device *parent, struct device *self, void *aux)
wdog_register(pwdog, pwdog_set_timeout);
}
-/* ARGSUSED */
int
pwdog_set_timeout(void *self, int seconds)
{
@@ -92,9 +90,10 @@ pwdog_set_timeout(void *self, int seconds)
int s;
s = splclock();
- bus_space_write_1(pwdog->iot, pwdog->ioh, PWDOG_DISABLE, 0);
if (seconds)
bus_space_write_1(pwdog->iot, pwdog->ioh, PWDOG_ACTIVATE, 0);
+ else
+ bus_space_write_1(pwdog->iot, pwdog->ioh, PWDOG_DISABLE, 0);
splx(s);
return seconds;
}