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().
This commit is contained in:
parent
6161be8527
commit
17d6fa2126
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user