diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2012-02-02 21:40:21 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2012-02-02 21:40:21 +0000 |
commit | 9ba91696aad979f35872eff01abeb2c7dd2e10e1 (patch) | |
tree | e691d03f7f9aa325dc7d9c77d83ab54f7f4a10cf /sys/dev | |
parent | bcd13d2225e39795487411c72b679b8be2bcf286 (diff) |
disable the polling timeout when we suspend; discovered by some code
guenther is working on
ok miod
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ic/pckbc.c | 13 | ||||
-rw-r--r-- | sys/dev/ic/pckbcvar.h | 3 | ||||
-rw-r--r-- | sys/dev/isa/pckbc_isa.c | 3 |
3 files changed, 16 insertions, 3 deletions
diff --git a/sys/dev/ic/pckbc.c b/sys/dev/ic/pckbc.c index b58bea3a4e3..5f388e42b01 100644 --- a/sys/dev/ic/pckbc.c +++ b/sys/dev/ic/pckbc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pckbc.c,v 1.28 2010/12/03 18:29:56 shadchin Exp $ */ +/* $OpenBSD: pckbc.c,v 1.29 2012/02/02 21:40:20 deraadt Exp $ */ /* $NetBSD: pckbc.c,v 1.5 2000/06/09 04:58:35 soda Exp $ */ /* @@ -732,6 +732,17 @@ pckbc_cleanup(void *self) } /* + * Stop the keyboard controller when we are going to suspend + */ +void +pckbc_stop(struct pckbc_softc *sc) +{ + struct pckbc_internal *t = sc->id; + + timeout_del(&t->t_poll); +} + +/* * Reset the keyboard controller in a violent fashion; normally done * after suspend/resume when we do not trust the machine. */ diff --git a/sys/dev/ic/pckbcvar.h b/sys/dev/ic/pckbcvar.h index 60f732ecd08..612e1432edf 100644 --- a/sys/dev/ic/pckbcvar.h +++ b/sys/dev/ic/pckbcvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pckbcvar.h,v 1.10 2010/11/23 04:07:55 shadchin Exp $ */ +/* $OpenBSD: pckbcvar.h,v 1.11 2012/02/02 21:40:20 deraadt Exp $ */ /* $NetBSD: pckbcvar.h,v 1.4 2000/06/09 04:58:35 soda Exp $ */ /* @@ -109,6 +109,7 @@ void pckbc_attach(struct pckbc_softc *, int); int pckbc_cnattach(bus_space_tag_t, bus_addr_t, bus_size_t, int); int pckbc_is_console(bus_space_tag_t, bus_addr_t); void pckbc_reset(struct pckbc_softc *); +void pckbc_stop(struct pckbc_softc *); int pckbcintr(void *); /* diff --git a/sys/dev/isa/pckbc_isa.c b/sys/dev/isa/pckbc_isa.c index 9e59902dbdc..e9323500302 100644 --- a/sys/dev/isa/pckbc_isa.c +++ b/sys/dev/isa/pckbc_isa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pckbc_isa.c,v 1.10 2010/08/31 17:15:04 deraadt Exp $ */ +/* $OpenBSD: pckbc_isa.c,v 1.11 2012/02/02 21:40:19 deraadt Exp $ */ /* $NetBSD: pckbc_isa.c,v 1.2 2000/03/23 07:01:35 thorpej Exp $ */ /* @@ -119,6 +119,7 @@ pckbc_isa_activate(struct device *self, int act) break; case DVACT_SUSPEND: rv = config_activate_children(self, act); + pckbc_stop(&isc->sc_pckbc); break; case DVACT_RESUME: pckbc_reset(&isc->sc_pckbc); |