linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
To: Benjamin Herrenschmidt <benh@au1.ibm.com>
Cc: linux-s390@vger.kernel.org, brueckner@linux.vnet.com,
	gregkh@linuxfoundation.org, heiko.carstens@de.ibm.com,
	linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
	Hendrik Brueckner <brueckner@linux.vnet.ibm.com>,
	schwidefsky@de.ibm.com, jslaby@suse.cz
Subject: Re: [PATCH 1/2] tty/hvc_console: Add DTR/RTS callback to handle HUPCL control
Date: Thu, 17 Oct 2013 10:16:42 +0200	[thread overview]
Message-ID: <20131017081642.GA6134@linux.vnet.ibm.com> (raw)
In-Reply-To: <1381965672.17841.71.camel@pasglop>

On Wed, Oct 16, 2013 at 06:21:12PM -0500, Benjamin Herrenschmidt wrote:
> On Wed, 2013-10-16 at 11:04 +0200, Hendrik Brueckner wrote:
> > Indeed, two callbacks change the DTR line.  The main difference is that
> > tiocmget/tiocmset can be called from user space by ioctl.  That's not the case
> > for the dtr_cts callback.  Also, tiocmget/tiocmset provide more flags that can
> > be changed (ST, SR, CTS, CD, RNG, RI,  ...)
> > 
> > Assume we would like to unify them have a single callback to change DTR, then
> > we have to take care of these differences.  So the question to you now is
> > whether you plan for a) other modem flags to be changed and b) if changing the
> > DTR line (or other control flags) through an ioctl?
> > 
> > Depending on your results, I could work on sth that helps us both and reduces
> > the callbacks.
> 
> Can we not just have the users of dtr_cts just call the backend's tiocmset ?

That's possible.  The only concern is that the tiocmset() callback could be
triggered from within the hvc_console() layer as well as from user space via
ioctl.  For the hvc_iucv driver, I do not want to introduce this ioctl.

One option would be to add parameter to the hvc_callbacks that indicate the
origin so that a backend could filter.

> If they need to filter or clamp bits, we could handle all that in hvc_console
> by caching the user intended value and passing a cooked value down to the backend..

Sure the hvc_console layer could do as much as possible.

> 
> None of that is urgent or anything, it's just odd and would be nice to cleanup.

Thanks and kind regards,
  Hendrik

  reply	other threads:[~2013-10-17  8:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-02 15:07 [PATCH 0/2] hvc_console: Add DTR/RTS callbacks to handle HUPCL conditions Hendrik Brueckner
2013-07-02 15:07 ` [PATCH 1/2] tty/hvc_console: Add DTR/RTS callback to handle HUPCL control Hendrik Brueckner
2013-10-11  7:15   ` Benjamin Herrenschmidt
2013-10-11 12:47     ` Hendrik Brueckner
2013-10-11 20:43       ` Benjamin Herrenschmidt
2013-10-15 15:36         ` Hendrik Brueckner
2013-10-15 20:47           ` Benjamin Herrenschmidt
2013-10-16  9:04             ` Hendrik Brueckner
2013-10-16 23:21               ` Benjamin Herrenschmidt
2013-10-17  8:16                 ` Hendrik Brueckner [this message]
2013-07-02 15:07 ` [PATCH 2/2] tty/hvc_iucv: Disconnect IUCV connection when lowering DTR Hendrik Brueckner

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=20131017081642.GA6134@linux.vnet.ibm.com \
    --to=brueckner@linux.vnet.ibm.com \
    --cc=benh@au1.ibm.com \
    --cc=brueckner@linux.vnet.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=heiko.carstens@de.ibm.com \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=schwidefsky@de.ibm.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).