aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorKATO Takenori <kato@FreeBSD.org>1997-02-02 08:09:41 +0000
committerKATO Takenori <kato@FreeBSD.org>1997-02-02 08:09:41 +0000
commit59e8efa1102e9ccae2cd672d4c1390b0e2f9c220 (patch)
tree21e63c05666c4dabcc60cce871086e8f93a55200 /sys
parente91c4f7cc301262a34b7ab92db7f87fd5bf145b8 (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/pc98/cbus/sio.c18
-rw-r--r--sys/pc98/pc98/sio.c18
2 files changed, 30 insertions, 6 deletions
diff --git a/sys/pc98/cbus/sio.c b/sys/pc98/cbus/sio.c
index 1e2adce73375..8183adecd2f6 100644
--- a/sys/pc98/cbus/sio.c
+++ b/sys/pc98/cbus/sio.c
@@ -1444,11 +1444,22 @@ open_top:
outb(iobase + com_fifo,
FIFO_RCV_RST | FIFO_XMT_RST
| com->fifo_image);
- DELAY(100);
+ /*
+ * XXX the delays are for superstitious
+ * historical reasons. It must be less than
+ * the character time at the maximum
+ * supported speed (87 usec at 115200 bps
+ * 8N1). Otherwise we might loop endlessly
+ * if data is streaming in. We used to use
+ * delays of 100. That usually worked
+ * because DELAY(100) used to usually delay
+ * for about 85 usec instead of 100.
+ */
+ DELAY(50);
if (!(inb(com->line_status_port) & LSR_RXRDY))
break;
outb(iobase + com_fifo, 0);
- DELAY(100);
+ DELAY(50);
(void) inb(com->data_port);
}
}
@@ -1576,7 +1587,8 @@ comhardclose(com)
s = spltty();
com->poll = FALSE;
com->poll_output = FALSE;
- com->do_timestamp = 0;
+ com->do_timestamp = FALSE;
+ com->do_dcd_timestamp = FALSE;
#ifdef PC98
if(IS_8251(com->pc98_if_type))
com_send_break_off(com);
diff --git a/sys/pc98/pc98/sio.c b/sys/pc98/pc98/sio.c
index 1e2adce73375..8183adecd2f6 100644
--- a/sys/pc98/pc98/sio.c
+++ b/sys/pc98/pc98/sio.c
@@ -1444,11 +1444,22 @@ open_top:
outb(iobase + com_fifo,
FIFO_RCV_RST | FIFO_XMT_RST
| com->fifo_image);
- DELAY(100);
+ /*
+ * XXX the delays are for superstitious
+ * historical reasons. It must be less than
+ * the character time at the maximum
+ * supported speed (87 usec at 115200 bps
+ * 8N1). Otherwise we might loop endlessly
+ * if data is streaming in. We used to use
+ * delays of 100. That usually worked
+ * because DELAY(100) used to usually delay
+ * for about 85 usec instead of 100.
+ */
+ DELAY(50);
if (!(inb(com->line_status_port) & LSR_RXRDY))
break;
outb(iobase + com_fifo, 0);
- DELAY(100);
+ DELAY(50);
(void) inb(com->data_port);
}
}
@@ -1576,7 +1587,8 @@ comhardclose(com)
s = spltty();
com->poll = FALSE;
com->poll_output = FALSE;
- com->do_timestamp = 0;
+ com->do_timestamp = FALSE;
+ com->do_dcd_timestamp = FALSE;
#ifdef PC98
if(IS_8251(com->pc98_if_type))
com_send_break_off(com);