From: Ben Gras Date: Thu, 10 Jul 2014 19:07:43 +0000 (+0200) Subject: i386 rs232: do full write in out_int X-Git-Tag: v3.3.0~134 X-Git-Url: http://zhaoyanbai.com/repos/Bv9ARM.ch13.html?a=commitdiff_plain;h=ebe3309a133cef1e70e36e6071b9f326291ff69d;p=minix.git i386 rs232: do full write in out_int . in kvm, this does the full output without truncating and gets rid of the messy 'enough!' case --- diff --git a/drivers/tty/arch/i386/rs232.c b/drivers/tty/arch/i386/rs232.c index 0e29628e3..d65107740 100644 --- a/drivers/tty/arch/i386/rs232.c +++ b/drivers/tty/arch/i386/rs232.c @@ -820,7 +820,7 @@ static void out_int(register rs232_t *rs) * Notify TTY when the buffer goes empty. */ - if (rs->ostate >= (ODEVREADY | OQUEUED | OSWREADY)) { + while (txready(rs) && rs->ostate >= (ODEVREADY | OQUEUED | OSWREADY)) { /* Bit test allows ORAW and requires the others. */ sys_outb(rs->xmit_port, *rs->otail); if (++rs->otail == bufend(rs->obuf)) rs->otail = rs->obuf;