public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: David Woodhouse <dwmw2@infradead.org>
Cc: Andrew Morton <akpm@osdl.org>,
	rmk@arm.linux.org.uk,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Correctly flush 8250 buffers, notify ldisc of line status changes.
Date: Tue, 09 Nov 2004 11:15:30 +0000	[thread overview]
Message-ID: <1099998926.15462.21.camel@localhost.localdomain> (raw)
In-Reply-To: <1099998437.6081.68.camel@localhost.localdomain>

On Maw, 2004-11-09 at 11:07, David Woodhouse wrote:
> + *	tty_status_change -	notify of line status changes
> + *	@tty: terminal
> + *
> + *	Helper for informing the line discipline that the modem
> + *	status lines may have changed.
> + */
> +
> +void tty_status_changed(struct tty_struct *tty)
> +{
> +	struct tty_ldisc *ld = tty_ldisc_ref(tty);
> +	if(ld) {
> +		if(ld->status_changed)
> +			ld->status_changed(tty);
> +		tty_ldisc_deref(ld);
> +	}
> +}
> +

This is the wrong way to do it. I've been trying this and discarded it.
The problem is that data arrival is asynchronous to the event which
means you've not got a clue how to combine the status change and the
data stream. This in itself makes the whole feature useless.

Modem changes have to go inline with the data just like break and
parity.

> + *
> + * void (*status_changed)(struct tty_struct *)
> + *
> + *	Called when the modem status lines (CTS, DSR, DCD etc.) are
> + *	changed. May not sleep. 
>   */

You also forgot to update the Documentation directory.


  reply	other threads:[~2004-11-09 12:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-05 13:06 [PATCH] Correctly flush 8250 buffers, notify ldisc of line status changes David Woodhouse
2004-11-05 13:08 ` David Woodhouse
2004-11-09  9:22 ` Andrew Morton
2004-11-09 11:07   ` David Woodhouse
2004-11-09 11:15     ` Alan Cox [this message]
2004-11-09 13:28       ` Russell King
2004-11-09 13:17         ` Alan Cox
2004-11-09 14:39           ` David Woodhouse
2004-11-09 13:49             ` Alan Cox
2004-11-09 14:47           ` Russell King
2004-11-09 14:47             ` Alan Cox
2004-11-13 18:10               ` Russell King
2004-11-13 20:52                 ` Alan Cox
2004-11-13 22:40                   ` Nicolas Pitre
2004-11-09 14:39       ` David Woodhouse

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=1099998926.15462.21.camel@localhost.localdomain \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=akpm@osdl.org \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk@arm.linux.org.uk \
    /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