You should check write_room before writing if you want some control - you
can also then respect internal flow control via the wakeup mechanism.
Something like:
/* Wait for space */
while ((space = tty_write_room(tty)) < len) {
if (file->f_flags & O_NONBLOCK) {
err = -EAGAIN;
break;
}
interruptible_sleep_on(&tty->write_wait);
if (signal_pending(current)) {
err = -EINTR;
break;
}
}
/* Shove the entire frame down */
tty->ops->write(tty, data, len);
The fact the drive is entirely under my control and not potentially being
spewed at from a hostile network. Also the fact that it takes about 30
seconds to spank a misbehaving drive and reset it. The network laye
generally uses time checks (search for ratelimit()).
Ok
No I'm still running around clobbering them all - and slip needed a
partial rewrite first.
zbdev->tty = tty_kref_get(tty);
tty_kref_put(foo);
The bluetooth one needs killing too. I will do that tomorrow ...
How many releases ago - the entire tty buffering layer has been rewritten
over time. tty->low_latency requires driver specific support that most
don't have. Also as of 2.6.30rc you'll get debug spew if you misuse it.
If you still need it we need to know why.
The tty layer has a lot of "yes, those are also buggy" - which is why I'm
currently half way through systematically brutalising it.
That depends what you need. tty_mode_ioctl() gives you all the mode
stuff, n_tty_ioctl_helper adds things like software flow management which
don't actually look relevant to your ldisc ?
Any other queries let me know, and if the tty->low_latency is still
needed let me know and we'll figure out why between us, as it should not
be.
Alan
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html