n_tty.c - possible enhancement

From: Henrique Gobbi (henrique2.gobbi@cyclades.com)
Date: Tue Feb 25 2003 - 11:47:31 EST


Dear all !!!

I was having data loss problems using my serial ports at 115200 with
software flow control (I can't use hw flow control) and I ended up
figuring out that the problem was happening because of the small value
of the tty buffer high water mark (TTY_THRESHOLD_THROTTLE). Changing
that define value and recompiling the kernel was the only solution i
found to my problem.

The way this code is implemented today is bad. The water marks are hard
coded and the only way to change them is recompiling the kernel again,
and this is not a good solution for that. I want to change that.

My idea is:
-------------------------------------------------------------------------
1 - Create two new variables in the tty struct: high_watermark and
low_watermark;

2 - Initialize this variables with the values they have today: 128 and 128;

3 - Create 4 ioctl's to set and get the values of this 2 variables;

4 - Change the file n_tty.c. The line that has
        if (n_tty_receive_room(tty) < TTY_THRESHOLD_THROTTLE) {
     will have:
        if (n_tty_receive_room(tty) < tty->high_watermark) {

     and the same thing will be done for the low watermark
-------------------------------------------------------------------------

I would appreciate any comment on this matter. If you guys don't see any
problem on this I will commit a patch as soon as possible

later
Henrique

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Feb 28 2003 - 22:00:33 EST