From: Mark Hounschell <markh@compro.net>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Linux-kernel <linux-kernel@vger.kernel.org>,
Mark Hounschell <dmarkh@cfl.rr.com>
Subject: Re: tty TTY_HUPPED anomaly
Date: Wed, 04 Jan 2012 13:59:19 -0500 [thread overview]
Message-ID: <4F04A187.2050705@compro.net> (raw)
In-Reply-To: <20120104162745.76fc3852@pyramind.ukuu.org.uk>
On 01/04/2012 11:27 AM, Alan Cox wrote:
>> But what has carrier dropping got to do with an TIOCSETD ioctl. For that
>
> When the carrier is dropped and HUPCL is set then the tty is disconnected
> from the physical interface. It's specified behaviour and required for
> security. So by the time you go to issue the TIOCSETD you are no longer
> connected to the tty. That may well just be a timing change.
>
>> What can be done to prevent tty_hangup from being called after opening
>> the port? And if this is really supposed to happen, why does it not
>> always happen?
>
> It should only happen if the carrier is dropped.
>
>> Even if the first thing I do after opening the port is to clear HUPCL
>> and set CLOCAL, this still randomly happens the first time I open the
>> port after booting.
>
> I'd expect the behaviour to either be
>
> carrier high, stays high - open works, no hangup events seen
>
> or
>
> carrier low, stays low - open blocks, but open with O_NDELAY works,
> hangup events not seen.
>
> It's the act of the drop which is a hangup not the presence of low
> carrier if I remember the spec properly. The Synclink GT correctly does
> this as far as I can tell (I have no hardware or docs for it) but the
> code indicates that the hardware reports changes and it acts on them
> properly (checking CLOCAL etc).
>
>
> I would guess (given the distro change is the trigger) that you've got a
> SuSE problem not a kernel one. The kernel behaviour and code looks
> correct. My guess therefore is that newer SuSE is running stuff in the
> boot which is probing serial ports and messing with the carrier wrongly
> and in ways it didn't use to. That would fit the fact that something
> similarly broken has apparently also appeared in the Fedora user space
> bootup.
>
Yes, I never really though it was a kernel problem. All though I can't
say I agree with the HUPCL/security thing. In any case, with the
Synclink cards, at first open after boot of SuSE-12.1, CLOCAL is not
set. Whereas all pre SuSE-12.1 releases do have CLOCAL set.
Mark
next prev parent reply other threads:[~2012-01-04 18:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-23 14:51 tty TTY_HUPPED anomaly Mark Hounschell
2011-12-23 18:46 ` Mark Hounschell
2011-12-23 20:40 ` Alan Cox
2012-01-04 15:59 ` Mark Hounschell
2012-01-04 16:27 ` Alan Cox
2012-01-04 18:59 ` Mark Hounschell [this message]
2012-01-04 20:28 ` Jiri Slaby
2012-01-04 20:35 ` Mark Hounschell
2012-01-04 20:40 ` Jiri Slaby
2012-01-04 20:50 ` Mark Hounschell
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=4F04A187.2050705@compro.net \
--to=markh@compro.net \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=dmarkh@cfl.rr.com \
--cc=linux-kernel@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.