diff options
author | bde <bde@FreeBSD.org> | 1995-07-05 14:30:07 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1995-07-05 14:30:07 +0000 |
commit | c2bda5b5908f04f19f28beccb23c9b89cffff3c9 (patch) | |
tree | f68951a6ec30f9091b76c4c3ae354abc968a28f4 /sys | |
parent | 5cca7ebf45bf5ebb408fa28e2250deb9b5656ab8 (diff) | |
download | FreeBSD-src-c2bda5b5908f04f19f28beccb23c9b89cffff3c9.zip FreeBSD-src-c2bda5b5908f04f19f28beccb23c9b89cffff3c9.tar.gz |
Fix error logging:
- get the timeout countdown right
- report everything before turning timeouts off.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/sio/sio.c | 14 | ||||
-rw-r--r-- | sys/i386/isa/sio.c | 14 | ||||
-rw-r--r-- | sys/isa/sio.c | 14 |
3 files changed, 30 insertions, 12 deletions
diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c index 558f115..4e09485 100644 --- a/sys/dev/sio/sio.c +++ b/sys/dev/sio/sio.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)com.c 7.5 (Berkeley) 5/16/91 - * $Id: sio.c,v 1.100 1995/06/25 04:51:01 bde Exp $ + * $Id: sio.c,v 1.101 1995/06/28 17:58:14 ache Exp $ */ #include "sio.h" @@ -2020,9 +2020,15 @@ siosettimeout() } } } - sio_timeouts_until_log = hz / sio_timeout; - if (someopen) + if (someopen) { + sio_timeouts_until_log = hz / sio_timeout; timeout(comwakeup, (void *)NULL, sio_timeout); + } else { + /* Flush error messages, if any. */ + sio_timeouts_until_log = 1; + comwakeup((void *)NULL); + untimeout(comwakeup, (void *)NULL); + } } static void @@ -2053,7 +2059,7 @@ comwakeup(chan) */ if (--sio_timeouts_until_log > 0) return; - sio_timeouts_until_log = sio_timeout; + sio_timeouts_until_log = hz / sio_timeout; for (unit = 0; unit < NSIO; ++unit) { int errnum; diff --git a/sys/i386/isa/sio.c b/sys/i386/isa/sio.c index 558f115..4e09485 100644 --- a/sys/i386/isa/sio.c +++ b/sys/i386/isa/sio.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)com.c 7.5 (Berkeley) 5/16/91 - * $Id: sio.c,v 1.100 1995/06/25 04:51:01 bde Exp $ + * $Id: sio.c,v 1.101 1995/06/28 17:58:14 ache Exp $ */ #include "sio.h" @@ -2020,9 +2020,15 @@ siosettimeout() } } } - sio_timeouts_until_log = hz / sio_timeout; - if (someopen) + if (someopen) { + sio_timeouts_until_log = hz / sio_timeout; timeout(comwakeup, (void *)NULL, sio_timeout); + } else { + /* Flush error messages, if any. */ + sio_timeouts_until_log = 1; + comwakeup((void *)NULL); + untimeout(comwakeup, (void *)NULL); + } } static void @@ -2053,7 +2059,7 @@ comwakeup(chan) */ if (--sio_timeouts_until_log > 0) return; - sio_timeouts_until_log = sio_timeout; + sio_timeouts_until_log = hz / sio_timeout; for (unit = 0; unit < NSIO; ++unit) { int errnum; diff --git a/sys/isa/sio.c b/sys/isa/sio.c index 558f115..4e09485 100644 --- a/sys/isa/sio.c +++ b/sys/isa/sio.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)com.c 7.5 (Berkeley) 5/16/91 - * $Id: sio.c,v 1.100 1995/06/25 04:51:01 bde Exp $ + * $Id: sio.c,v 1.101 1995/06/28 17:58:14 ache Exp $ */ #include "sio.h" @@ -2020,9 +2020,15 @@ siosettimeout() } } } - sio_timeouts_until_log = hz / sio_timeout; - if (someopen) + if (someopen) { + sio_timeouts_until_log = hz / sio_timeout; timeout(comwakeup, (void *)NULL, sio_timeout); + } else { + /* Flush error messages, if any. */ + sio_timeouts_until_log = 1; + comwakeup((void *)NULL); + untimeout(comwakeup, (void *)NULL); + } } static void @@ -2053,7 +2059,7 @@ comwakeup(chan) */ if (--sio_timeouts_until_log > 0) return; - sio_timeouts_until_log = sio_timeout; + sio_timeouts_until_log = hz / sio_timeout; for (unit = 0; unit < NSIO; ++unit) { int errnum; |