server: Add support for pending write flag to the serial device. Take 2.

Wolfgang Walter wine at stwm.de
Wed Oct 23 10:48:30 CDT 2013


Am Mittwoch, 23. Oktober 2013, 20:44:28 schrieben Sie:
> Wolfgang Walter <wine at stwm.de> wrote:
> > I have no intention to discuss that all again. Please think about the
> > problem. Hint: writing twice as many bytes with 150 baud needs more time,
> > significantly more time then TIMEOUT.
> 
> Not really. Francois sent an investigation with pretty exhaustive
> explanation of the behvaiour of COM-port UARTs regarding timings and baud
> rates.

Have you read it? It says that with a standard UART windows may signals after 
872ms that the tx queue is empty (though there are still 4 bytes to send) when 
you write 17 bytes. For 34 bytes he gets 1802ms > TIMEOUT.


Here Francois' mesurements for windows:

==================================
On my one Windows PC with a real UART (Intel(R) 82801DBM LPC Interface 
Controller - 24CC, i.e. ICH4 which emulates a 16550A UART) I get the 
following results which clearly illustrate the impact of the 
FIFO/trigger level.

comm.c:1100: WaitCommEvent(1 bytes) for EV_TXEMPTY took 0 ms
comm.c:1100: WaitCommEvent(2 bytes) for EV_TXEMPTY took 0 ms
comm.c:1100: WaitCommEvent(3 bytes) for EV_TXEMPTY took 0 ms
comm.c:1100: WaitCommEvent(4 bytes) for EV_TXEMPTY took 0 ms
comm.c:1100: WaitCommEvent(5 bytes) for EV_TXEMPTY took 0 ms
comm.c:1100: WaitCommEvent(6 bytes) for EV_TXEMPTY took 0 ms
comm.c:1100: WaitCommEvent(7 bytes) for EV_TXEMPTY took 0 ms
comm.c:1100: WaitCommEvent(8 bytes) for EV_TXEMPTY took 0 ms
comm.c:1100: WaitCommEvent(9 bytes) for EV_TXEMPTY took 0 ms
comm.c:1100: WaitCommEvent(10 bytes) for EV_TXEMPTY took 0 ms
comm.c:1100: WaitCommEvent(11 bytes) for EV_TXEMPTY took 0 ms
comm.c:1100: WaitCommEvent(12 bytes) for EV_TXEMPTY took 0 ms
comm.c:1100: WaitCommEvent(13 bytes) for EV_TXEMPTY took 0 ms
comm.c:1100: WaitCommEvent(14 bytes) for EV_TXEMPTY took 0 ms
comm.c:1100: WaitCommEvent(15 bytes) for EV_TXEMPTY took 871 ms
comm.c:1100: WaitCommEvent(16 bytes) for EV_TXEMPTY took 872 ms
comm.c:1100: WaitCommEvent(17 bytes) for EV_TXEMPTY took 872 ms
comm.c:1100: WaitCommEvent(18 bytes) for EV_TXEMPTY took 872 ms
comm.c:1100: WaitCommEvent(19 bytes) for EV_TXEMPTY took 871 ms
comm.c:1100: WaitCommEvent(20 bytes) for EV_TXEMPTY took 871 ms
comm.c:1100: WaitCommEvent(21 bytes) for EV_TXEMPTY took 871 ms
comm.c:1100: WaitCommEvent(22 bytes) for EV_TXEMPTY took 871 ms
comm.c:1100: WaitCommEvent(23 bytes) for EV_TXEMPTY took 871 ms
comm.c:1100: WaitCommEvent(24 bytes) for EV_TXEMPTY took 871 ms
comm.c:1100: WaitCommEvent(25 bytes) for EV_TXEMPTY took 871 ms
comm.c:1100: WaitCommEvent(26 bytes) for EV_TXEMPTY took 871 ms
comm.c:1100: WaitCommEvent(27 bytes) for EV_TXEMPTY took 871 ms
comm.c:1100: WaitCommEvent(28 bytes) for EV_TXEMPTY took 871 ms
comm.c:1100: WaitCommEvent(29 bytes) for EV_TXEMPTY took 1802 ms
comm.c:1100: WaitCommEvent(30 bytes) for EV_TXEMPTY took 1803 ms
comm.c:1100: WaitCommEvent(31 bytes) for EV_TXEMPTY took 1803 ms
comm.c:1100: WaitCommEvent(32 bytes) for EV_TXEMPTY took 1802 ms
comm.c:1100: WaitCommEvent(33 bytes) for EV_TXEMPTY took 1803 ms
comm.c:1100: WaitCommEvent(34 bytes) for EV_TXEMPTY took 1802 ms
comm.c:1100: WaitCommEvent(35 bytes) for EV_TXEMPTY took 1803 ms
comm.c:1100: WaitCommEvent(36 bytes) for EV_TXEMPTY took 1803 ms
comm.c:1100: WaitCommEvent(37 bytes) for EV_TXEMPTY took 1803 ms
comm.c:1100: WaitCommEvent(38 bytes) for EV_TXEMPTY took 1803 ms
comm.c:1100: WaitCommEvent(39 bytes) for EV_TXEMPTY took 1803 ms
comm.c:1100: WaitCommEvent(40 bytes) for EV_TXEMPTY took 1803 ms
comm.c:1100: WaitCommEvent(41 bytes) for EV_TXEMPTY took 1802 ms
comm.c:1100: WaitCommEvent(42 bytes) for EV_TXEMPTY took 1803 ms
comm.c:1100: WaitCommEvent(43 bytes) for EV_TXEMPTY took 2734 ms
comm.c:1100: WaitCommEvent(44 bytes) for EV_TXEMPTY took 2734 ms
comm.c:1100: WaitCommEvent(45 bytes) for EV_TXEMPTY took 2734 ms
comm.c:1100: WaitCommEvent(46 bytes) for EV_TXEMPTY took 2734 ms
comm.c:1100: WaitCommEvent(47 bytes) for EV_TXEMPTY took 2734 ms
comm.c:1100: WaitCommEvent(48 bytes) for EV_TXEMPTY took 2734 ms
comm.c:1100: WaitCommEvent(49 bytes) for EV_TXEMPTY took 2734 ms
comm.c:1100: WaitCommEvent(50 bytes) for EV_TXEMPTY took 2734 ms
=================================


And I really don't think that we can expect exactly that same behaviour when 
using the linux serial driver, anyway.

Regards,
-- 
Wolfgang Walter
Studentenwerk München
Anstalt des öffentlichen Rechts



More information about the wine-devel mailing list