summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1995-07-31 21:10:36 +0000
committerbde <bde@FreeBSD.org>1995-07-31 21:10:36 +0000
commit17d6fa212659721023f44e68cef6d1d50ef0fad5 (patch)
tree6db20aa6ade9529e04932f1ecd0d5d6cb3241c13 /sys
parent6161be8527d8436daf7da9ba9caf28dd75239974 (diff)
downloadFreeBSD-src-17d6fa212659721023f44e68cef6d1d50ef0fad5.zip
FreeBSD-src-17d6fa212659721023f44e68cef6d1d50ef0fad5.tar.gz
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().
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/sio/sio.c5
-rw-r--r--sys/i386/isa/sio.c5
-rw-r--r--sys/isa/sio.c5
3 files changed, 9 insertions, 6 deletions
diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c
index 97f9dd7..098ca51 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)
diff --git a/sys/i386/isa/sio.c b/sys/i386/isa/sio.c
index 97f9dd7..098ca51 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.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)
diff --git a/sys/isa/sio.c b/sys/isa/sio.c
index 97f9dd7..098ca51 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.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)
OpenPOWER on IntegriCloud