summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1998-06-16 11:05:59 +0000
committerbde <bde@FreeBSD.org>1998-06-16 11:05:59 +0000
commit0fd89b46c5dcd51783f4e969a4497365c32461ef (patch)
tree852e8199a58d91fd5caeaeeeeb8e2b444d8e9786 /sys
parent74aab8b0d71c030fd9750aaa638062cf998c57d4 (diff)
downloadFreeBSD-src-0fd89b46c5dcd51783f4e969a4497365c32461ef.zip
FreeBSD-src-0fd89b46c5dcd51783f4e969a4497365c32461ef.tar.gz
Don't log "unexpected" events on never-opened devices. Events left
over from the probe are now expected for incompatible UARTs that deliver IRQs as a strobe (low) instead of a level (high). Discard events on going-away devices too. Endless loops may have been possible when an active pccard was removed.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/sio/sio.c15
-rw-r--r--sys/i386/isa/sio.c15
-rw-r--r--sys/isa/sio.c15
3 files changed, 12 insertions, 33 deletions
diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c
index 776a50c..a836201 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.205 1998/06/03 12:30:10 bde Exp $
+ * $Id: sio.c,v 1.206 1998/06/07 17:10:58 dfr Exp $
*/
#include "opt_comconsole.h"
@@ -1887,14 +1887,11 @@ repeat:
com = com_addr(unit);
if (com == NULL)
continue;
- if (com->gone)
- continue;
tp = com->tp;
- if (tp == NULL) {
+ if (tp == NULL || com->gone) {
/*
- * XXX forget any events related to closed devices
- * (actually never opened devices) so that we don't
- * loop.
+ * Discard any events related to never-opened or
+ * going-away devices.
*/
disable_intr();
incc = com->iptr - com->ibuf;
@@ -1905,10 +1902,6 @@ repeat:
}
com_events -= incc;
enable_intr();
- if (incc != 0)
- log(LOG_DEBUG,
- "sio%d: %d events for device with no tp\n",
- unit, incc);
continue;
}
diff --git a/sys/i386/isa/sio.c b/sys/i386/isa/sio.c
index 776a50c..a836201 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.205 1998/06/03 12:30:10 bde Exp $
+ * $Id: sio.c,v 1.206 1998/06/07 17:10:58 dfr Exp $
*/
#include "opt_comconsole.h"
@@ -1887,14 +1887,11 @@ repeat:
com = com_addr(unit);
if (com == NULL)
continue;
- if (com->gone)
- continue;
tp = com->tp;
- if (tp == NULL) {
+ if (tp == NULL || com->gone) {
/*
- * XXX forget any events related to closed devices
- * (actually never opened devices) so that we don't
- * loop.
+ * Discard any events related to never-opened or
+ * going-away devices.
*/
disable_intr();
incc = com->iptr - com->ibuf;
@@ -1905,10 +1902,6 @@ repeat:
}
com_events -= incc;
enable_intr();
- if (incc != 0)
- log(LOG_DEBUG,
- "sio%d: %d events for device with no tp\n",
- unit, incc);
continue;
}
diff --git a/sys/isa/sio.c b/sys/isa/sio.c
index 776a50c..a836201 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.205 1998/06/03 12:30:10 bde Exp $
+ * $Id: sio.c,v 1.206 1998/06/07 17:10:58 dfr Exp $
*/
#include "opt_comconsole.h"
@@ -1887,14 +1887,11 @@ repeat:
com = com_addr(unit);
if (com == NULL)
continue;
- if (com->gone)
- continue;
tp = com->tp;
- if (tp == NULL) {
+ if (tp == NULL || com->gone) {
/*
- * XXX forget any events related to closed devices
- * (actually never opened devices) so that we don't
- * loop.
+ * Discard any events related to never-opened or
+ * going-away devices.
*/
disable_intr();
incc = com->iptr - com->ibuf;
@@ -1905,10 +1902,6 @@ repeat:
}
com_events -= incc;
enable_intr();
- if (incc != 0)
- log(LOG_DEBUG,
- "sio%d: %d events for device with no tp\n",
- unit, incc);
continue;
}
OpenPOWER on IntegriCloud