lkml.org 
[lkml]   [2009]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Combine two one-character CR-LF writes into one two-character write for O_ONLCR
On Thu, Aug 13, 2009 at 08:50:18PM +0100, Alan Cox wrote:
> > do_output_char() function uses the struct tty_operations function write_room()
> > to determine whether it is possible to write two characters. It uses
> > tty_put_char() for each character which, for the USB generic serial driver,
> > translates into a write() for each character. For the USB generic serial
> > driver the value returned by write_room() only applies to the next write().
>
> The USB serial driver is broken, fix it instead. It's not even hard to
> fix.
>
> > + tty->ops->write(tty, crlf, ARRAY_SIZE(crlf));
> > + return ARRAY_SIZE(crlf);
>
> Emphatic NAK. Someone needs to actually fix the broken USB drivers for
> once. This is just one example of where the device will go kersplat if its
> broken, others include things like losing flow control.

Works for me; please consider the patch withdrawn. I'll take a crack at fixing
the generic serial driver the right way; if other drivers are doing mix-and-match
with per-device code and generic code, they could get broken. I have no way to
test for this, so I'm hoping others will help out.

David VL


\
 
 \ /
  Last update: 2009-08-13 21:59    [W:0.044 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site