[lkml]   [2003]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Subjectn_tty.c - possible enhancement
    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

    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


    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:33    [W:0.019 / U:94.140 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site