Subject: Re: Problem with IOCTL calls, READ THIS!
To: Robert Shady <>
From: Adam Glass <>
List: current-users
Date: 03/08/1994 13:35:56
> The following is information I had found in /usr/include/sys/ioctl.h, I then
> then wrote the appended program to test things out for myself (remember, I 
> the one trying to read the data carrier detect line on the serial ports...
> Anyways, it looks as if by using the TIOCMGET call, I get the proper 
> information back, but it seems to be off by one bit or so.  Run the
> attached program, then try to dial out via your modem, and you will see 
> what I mean.  It returns a TIOCM_RNG in place of the TIOCM_CAR, which I
> *think* is wrong, but maybe it's just me.  This is running kernels from
> about Feb 27 days ago.  Am I doing something wrong, or did something get
> screwed while we were updating something...

the implemtnation of the TIOCM* ioctls is broken.  this will hopefully
e fixed any day now, as part of a larger set of changes to com..
Right now the driver diddles the uart registers using the machine
independent bit values which is totally incorrect.  It also doesn't
translate between the uart specific bit values and the TIOCM_* values
when doing TIOCMGET.  This is why your values are screwed.

The origin of this bug is in the hp300 driver that com was based on.
I've reported this whole class of bugs to CSRG, as it is rampant in
their serial drivers as well.

Adam Glass