Subject: tty driver vs. CLOCAL
To: None <tech-kern@NetBSD.ORG>
From: Martin Husemann <martin@duskware.de>
List: tech-kern
Date: 09/19/2003 21:25:49
This may be a stupid question, but neither the docs nor the current state
of the source tree did answer it clearly for me:

Imagine a driver for a (not semi-intelligent) serial chip. Is the driver
supposed to check for CLOCAL before activating CTS/RTS? From an applications
POV I always thought setting CLOCAL would override any handshake options, but
it's not clear to me which kernel part takes care of this.

So should it be:

  if (ISSET(t->c_cflag, CRTSCTS) && !ISSET(t->c_cflag, CLOCAL))
    /* change hardware to RTS/CTS mode */

or just

  if (ISSET(t->c_cflag, CRTSCTS))
    /* change hardware to RTS/CTS mode */

?

Or is my application view of the issue wrong?

Martin