mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David VomLehn <dvomlehn@cisco.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux-kernel@vger.kernel.org, greg@kroah.com, linux-usb@vger.kernel.org
Subject: Re: [PATCH] Combine two one-character CR-LF writes into one two-character write for O_ONLCR
Date: Thu, 13 Aug 2009 12:55:54 -0700	[thread overview]
Message-ID: <20090813195554.GA22751@cuplxvomd02.corp.sa.net> (raw)
In-Reply-To: <20090813205018.4d781c74@lxorguk.ukuu.org.uk>

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

  reply	other threads:[~2009-08-13 19:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-13 17:54 David VomLehn
2009-08-13 18:15 ` Greg KH
2009-08-13 18:42   ` David VomLehn
2009-08-13 19:47     ` Alan Cox
2009-08-13 19:50 ` Alan Cox
2009-08-13 19:55   ` David VomLehn [this message]
2009-08-13 19:58     ` Alan Cox
2009-08-13 21:27     ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090813195554.GA22751@cuplxvomd02.corp.sa.net \
    --to=dvomlehn@cisco.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®