linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Theodore Y. Ts'o" <tytso@MIT.EDU>
To: Jeremy Jackson <jerj@coplanar.net>
Cc: Ivan Passos <lists@cyclades.com>,
	Linux Kernel List <linux-kernel@vger.kernel.org>,
	Linux Serial List <linux-serial@vger.kernel.org>
Subject: Re: CLOCAL and TIOCMIWAIT
Date: Tue, 27 Feb 2001 17:59:03 -0500	[thread overview]
Message-ID: <200102272259.RAA13893@tsx-prime.MIT.EDU> (raw)
In-Reply-To: Jeremy Jackson's message of Mon, 26 Feb 2001 22:19:20 -0500, <3A9B1CB8.B989A10@coplanar.net>

   Date: 	Mon, 26 Feb 2001 22:19:20 -0500
   From: Jeremy Jackson <jerj@coplanar.net>

   I had written a simple program 10-20 lines C to count pulses at rate
   of 1 per second give or take.  It turned out that the driver disabled
   the UART's generation of interrupts completely for certain signals.
   I don't remember which exactly, but I think it was DCD; I was using
   CLOCAL so the hangups wouldn't close the descriptor.  The problems
   was that by disabling the interrupt at the source, the ioctl's to
   read the bits stopped working!  not what I wanted.

This was a bug which was fixed for 2.2 in the 8250/16550 serial driver;
CLOCAL should change the behaviour open/close/hangup processing, as per
POSIX, but it shouldn't change the behaviour of TIOCMIWAIT or TIOCMGET.

   > My question is: what's the correct interpretation of CLOCAL?? If the
   > serial driver's interpretation is the correct one, I'll be more than happy
   > to change the Cyclades' driver to comply with that, I just want to make
   > sure that this is the expected behavior before I patch the driver.

CLOCAL's behaviour is defined under POSIX, although the behaviour of
TIOCMIWAIT and TIOMGET aren't.  So one could make the argument that 
(to use Al Gore's words) there "no controlling legal authority" saying
that an implementation where TIOCMIWAIT depending on CLOCAL being clear
is illegal or violates some standard.  However, it seems downright silly.

So I would argue that it would be better to make things consistent by
making CLOCAL only affect those things which are specifically specified
by POSIX.1, and not make it affect the behaviour of TIOCMIWAIT and
TIOCMGET, et. al.

							- Ted

      reply	other threads:[~2001-02-27 22:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-27  0:56 CLOCAL and TIOCMIWAIT Ivan Passos
2001-02-27  1:27 ` Paul Fulghum
2001-02-27  3:19 ` Jeremy Jackson
2001-02-27 22:59   ` Theodore Y. Ts'o [this message]

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=200102272259.RAA13893@tsx-prime.MIT.EDU \
    --to=tytso@mit.edu \
    --cc=jerj@coplanar.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=lists@cyclades.com \
    /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;
as well as URLs for NNTP newsgroup(s).