[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fwd: termios flow control]



Hello,

I have roughly looked through the relevant code and would agree that the
code seems to not be correct.

Due to the complicated code, I would recommend to check the behaviour
(possibly in a simulator environment).

Thomas.


Joel Sherrill schrieb:
> I am forwarding this to the list so others can attempt to
> answer this. :)
> 
> Please cc everyone since I don't know if the person asking is
> on the mailing list.
> 
> Thanks.
> 
> --joel
> 
> WuHao wrote:
> 
>>------------------------------------------------------------------------
>>
>>Subject:
>>termios flow control
>>From:
>>WuHao <derossi at mail.ustc.edu.cn>
>>Date:
>>Thu, 24 May 2007 17:30:05 +0800
>>To:
>>"rtems-users at rtems.com" <rtems-users at rtems.com>
>>
>>To:
>>"rtems-users at rtems.com" <rtems-users at rtems.com>
>>
>>
>>Hi:
>>I am reading code of rtems 4.7.0.
>>Here are 2 questions about termios flow control.
>>Suppose input controlled with XON/XOFF protocol:
>>
>>1.When the RawInbuf reaches highwater,a character indicate XOFF will be
>>writen to device immediately if the RawOutBuf if idle or the output is
>>not working,and a bit in flow control(FL_ISNTXOF) will be set indicate
>>that the XOFF signal is already sent. However,the write action will
>>cause a dequeue callback where the tty->t_dqlen will be added by 1.As a
>>result, the "Tail" of the data buffer will not be correct.
>>
>>2.Opposite to question XOFF,when the RawInbuf reaches lowwater,a
>>character indicate XON will be writen to device immediately if the
>>RawOutBuf if idle or the output is not working.Different to "highwater
>>reaching",none of flow control bits is set to indicate that the XON
>>signal is already
>>sent.As a result,the following dequeue callback will detect that a XON
>>signal is required to send but not send yet.Then a XON signal is sent
>>again,reduce tty->t_dqlen by 1. This case will keep RowOutBuf's tail
>>correct,but the XON signal is sent twice.
>>
>>Thanks a lot.
>>
>>
>>  
> 
> 
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.com
> http://rtems.rtems.org/mailman/listinfo/rtems-users


-- 
--------------------------------------------
Embedded Brains GmbH
Thomas Doerfler           Obere Lagerstr. 30
D-82178 Puchheim          Germany
email: Thomas.Doerfler at embedded-brains.de
Phone: +49-89-18908079-2
Fax:   +49-89-18908079-9