lkml.org 
[lkml]   [2001]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: CLOCAL and TIOCMIWAIT
   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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:28    [W:0.084 / U:0.680 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site