[lkml]   [2014]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC 1/2] n_tty: fix dropped output characters
On Fri, 11 Apr 2014 11:41:24 +0200
Johan Hovold <> wrote:

> Fix characters being dropped by n_tty_write() due to a failure to
> check the return value of tty_put_char() in do_output_char().
> Characters are currently being dropped by write if a tty driver claims
> to have write room available, but still fails to buffer any data

Your driver is buggy. If you advertise a buffer you must honour it and
neither shrink nor revoke it.

For an URB based device you almost certainly want internal buffering so
you can do proper packetisation. USB serial these days gets it right - see
drivers/usb/serial/generic.c for a fairly simple kfifo based approach.
Whether applying it to cdc_acm would make sense I don't know but it looks
like it might be simpler over-all than the current arrangement.


 \ /
  Last update: 2014-04-14 15:21    [W:0.163 / U:0.128 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site