aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/sio
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>1995-07-31 21:10:36 +0000
committerBruce Evans <bde@FreeBSD.org>1995-07-31 21:10:36 +0000
commit1856afe95515069df5ed9074be3949e90a42ea5e (patch)
tree6db20aa6ade9529e04932f1ecd0d5d6cb3241c13 /sys/dev/sio
parent9fa18570a23308a712a65c3890d266c056b89430 (diff)
downloadsrc-1856afe95515069df5ed9074be3949e90a42ea5e.tar.gz
src-1856afe95515069df5ed9074be3949e90a42ea5e.zip
Sleep on a better address to wait for output to drain out of the
hardware. Set the sleep-on flag for the address so there is more than a small chance that the sleep address is actually used (this used to work by timing out). Don't bother clearing the sleep-on flag after a timeout here or elsewhere since leaving it set just generates a few null calls to wakeup().
Notes
Notes: svn path=/head/; revision=9825
Diffstat (limited to 'sys/dev/sio')
-rw-r--r--sys/dev/sio/sio.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c
index 97f9dd786f7b..098ca51ca08a 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.107 1995/07/29 08:33:13 bde Exp $
+ * $Id: sio.c,v 1.108 1995/07/31 18:29:51 bde Exp $
*/
#include "sio.h"
@@ -1688,7 +1688,8 @@ retry:
enable_intr();
while ((inb(com->line_status_port) & (LSR_TSRE | LSR_TXRDY))
!= (LSR_TSRE | LSR_TXRDY)) {
- error = ttysleep(tp, TSA_OLOWAT(tp), TTIPRI | PCATCH,
+ tp->t_state |= TS_SO_OCOMPLETE;
+ error = ttysleep(tp, TSA_OCOMPLETE(tp), TTIPRI | PCATCH,
"siotx", hz / 100);
if ( txtimeout != 0
&& (!error || error == EAGAIN)