All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joey Oravec <joravec@drewtech.com>
To: dtor@mail.ru
Cc: linux-input@vger.kernel.org
Subject: linux raw serio driver 32 byte maximum
Date: Tue, 30 Aug 2011 17:59:49 -0400	[thread overview]
Message-ID: <4E5D5D55.5060207@drewtech.com> (raw)

Dmitry -

In serio_raw.c function serio_raw_write() there's a check:

if (count > 32)
    count = 32;

which coerces any call to write a maximum of 32 bytes. Do you know why 
this limitation is in the code? Characters get written one-by-one to the 
tty layer so I don't understand why it's there.

I'm not sure which section of the manpage defines write for a serial 
port. In the ordinary case I expected this function to keep transmitting 
until complete or an error occurs. If O_NONBLOCK was specified then I 
might expect EAGAIN. Right now my calling code doesn't expect a 
successful partial write. Do you think this module is doing the right 
thing? Can you comment on what the caller must expect?

-joey

             reply	other threads:[~2011-08-30 22:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-30 21:59 Joey Oravec [this message]
2011-08-30 22:50 ` linux raw serio driver 32 byte maximum Dmitry Torokhov
2011-08-31  0:40   ` Joey Oravec

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=4E5D5D55.5060207@drewtech.com \
    --to=joravec@drewtech.com \
    --cc=dtor@mail.ru \
    --cc=linux-input@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.