tcdrainnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn!

My half duplex protocol manager use tcdrain() to wait for a send
completion via devc-ser8250, before arming timeout timers.
Sometimes tcdrain() never return.

Do you have any idea?

Thanks,
Alain.

“Alain Bonnefoy” <alain.bonnefoy@icbt.com> wrote in message
news:3A3A3CDA.70CBD723@icbt.com
| My half duplex protocol manager use tcdrain() to wait for a send
| completion via devc-ser8250, before arming timeout timers.
| Sometimes tcdrain() never return.
|
| Do you have any idea?
|
| Thanks,
| Alain.

Wild-Ass Guess:

The characters are never draining, possibly due to a flow control issue. I’ve
seen where a modem connected to a serial port every once in a while generated a
Ctrl-S as part of the connect/disconnect process, which would lock up the port
(until it saw a Ctrl-Q which never happened because the modem wouldn’t answer
any more). Make sure all of your flow control is either off or working
properly.

-Warren “waX-ON, waX-OFF” Peece

Warren Peece a écrit :

“Alain Bonnefoy” <> alain.bonnefoy@icbt.com> > wrote in message
news:> 3A3A3CDA.70CBD723@icbt.com> …
| My half duplex protocol manager use tcdrain() to wait for a send
| completion via devc-ser8250, before arming timeout timers.
| Sometimes tcdrain() never return.
|
| Do you have any idea?
|
| Thanks,
| Alain.

Wild-Ass Guess:

The characters are never draining, possibly due to a flow control issue. I’ve
seen where a modem connected to a serial port every once in a while generated a
Ctrl-S as part of the connect/disconnect process, which would lock up the port
(until it saw a Ctrl-Q which never happened because the modem wouldn’t answer
any more). Make sure all of your flow control is either off or working
properly.

-Warren “waX-ON, waX-OFF” Peece

I don’t use any flow control and I use a null modem cable connected to the PC and
to a RS232/RS485 half duplex converter. I use DTR to change the direction.
Yesterday, I made a new try with three clients requesting my resmgr connected to
devc-ser8250hd. (I just add a set_port(port[REG_MC], MCR_DTR, 0); in your
devc-ser8250 tto.c source code. you can see the difference in the joined diff
files)
My server locked on tcdrain() after 1,529,325 frames (allmost 17 hours at about
40ms per frame).

What do you think it could happen after so long time?
What does tcdrain() do? just something like while ((in8(port[REG_LS]) & LSR_TSRE)
== 0); ?

First, I though of a hardware problem but I have the smae problem on two different
HP Vectra.

Alain.