Yes, I read as much as I can. The number is defined by:
MIN(char_count, MIN(tty->ldisc.receive_room(tty), buf_size))
, where:
- char_count = number of characters in the on-board (HW) buffer;
- buf_size = size of the intermediary driver buffer;
> If you reading that a large number of characters at a time, and getting
> periodic interrupts, I'd advice that you skip the flip buffers
> altogether and simply call ldisc->receive_buf() directly. As a bonus,
> this avoids a memory copy as well. You can use ldisc->receive_room() to
> see how much space is available in the 4k tty buffer. (This is what
> the Comtrol Rocketport driver does).
The Rocketport driver I have (i.e., the one present in 2.2.13) does _not_
use this function. Probably you have already released a newer driver with
this check. Anyhow, just after I sent the msg to you I figured that out by
looking at n_tty.c.
> Anyhow, what's this flow control signal the tty driver sends to the serial
> driver when the buffer starts getting full?? Is this a flag that stays
> there until the condition change back to normal, or is it a one-time
> signal??
>
> The high-level tty code calls driver->throttle() and
> driver->unthrottle() as necessary. See include/linux/tty_driver.h and
> include/linux/tty_ldisc.h --- the interfaces are fairly well
> documented.
Yes, I saw that too, just after I sent the msg. Sorry for the unnecessary
questions, and thank you very much for all the detailed answers !!
Regards,
Ivan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/