diff options
author | 2013-12-06 21:03:01 +0000 | |
---|---|---|
committer | 2013-12-06 21:03:01 +0000 | |
commit | 37ecb59650d3f381e0120446318f17da385095e3 (patch) | |
tree | c81a3d99b5090a799f492b07d59e5f336209bce0 /sys/dev/pci/tcpcib.c | |
parent | It seems to be possible to truncate an object while it is still mapped. (diff) | |
download | wireguard-openbsd-37ecb59650d3f381e0120446318f17da385095e3.tar.xz wireguard-openbsd-37ecb59650d3f381e0120446318f17da385095e3.zip |
Add a DVACT_WAKEUP op to the *_activate() API. This is called after the
kernel resumes normal (non-cold, able to run processes, etc) operation.
Previously we were relying on specific DVACT_RESUME op's in drivers
creating callback/threads themselves, but that has become too common,
indicating the need for a built-in mechanism.
ok dlg kettenis, tested by a sufficient amount of people
Diffstat (limited to 'sys/dev/pci/tcpcib.c')
-rw-r--r-- | sys/dev/pci/tcpcib.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/pci/tcpcib.c b/sys/dev/pci/tcpcib.c index 5f1be2ec10c..97c8f445cf8 100644 --- a/sys/dev/pci/tcpcib.c +++ b/sys/dev/pci/tcpcib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcpcib.c,v 1.6 2013/11/26 20:33:17 deraadt Exp $ */ +/* $OpenBSD: tcpcib.c,v 1.7 2013/12/06 21:03:04 deraadt Exp $ */ /* * Copyright (c) 2012 Matt Dainty <matt@bodgit-n-scarper.com> @@ -269,11 +269,11 @@ int tcpcib_activate(struct device *self, int act) { struct tcpcib_softc *sc = (struct tcpcib_softc *)self; - int ret = 0; + int rv = 0; switch (act) { case DVACT_SUSPEND: - ret = config_activate_children(self, act); + rv = config_activate_children(self, act); /* Watchdog is running, disable it */ if (sc->sc_active & E600_WDT_ACTIVE && sc->sc_wdt_period != 0) tcpcib_wdt_stop(sc); @@ -293,13 +293,13 @@ tcpcib_activate(struct device *self, int act) if (sc->sc_active & E600_HPET_ACTIVE) bus_space_write_4(sc->sc_hpet_iot, sc->sc_hpet_ioh, E600_HPET_GC, E600_HPET_GC_ENABLE); - ret = config_activate_children(self, act); + rv = config_activate_children(self, act); break; default: - ret = config_activate_children(self, act); + rv = config_activate_children(self, act); break; } - return (ret); + return (rv); } int |