diff options
author | Matthias Goebl <matthias.goebl@goebl.net> | 2008-01-04 05:19:30 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-04 06:55:40 -0500 |
commit | 00409bb045887ec5e7b9e351bc080c38ab6bfd33 (patch) | |
tree | 829ec62282d291df72e0e1ab653bc4b5eb2da86e | |
parent | 134d99e302618eeb102c2a5be1f9e98696288bdd (diff) |
[ISDN] i4l: 'NO CARRIER' message lost after ldisc flush
The ISDN tty layer doesn't produce a 'NO CARRIER' message after hangup.
I suppose it broke when tty_buffer_flush() has been added to
tty_ldisc_flush() in the commit below.
For isdn_tty_modem_result(RESULT_NO_CARRIER..) the
message inserted via isdn_tty_at_cout() -> tty_insert_flip_char()
is flushed immediately by tty_ldisc_flush() -> tty_buffer_flush().
More annoyingly, the audio abort sequence DLE-ETX is also lost.
This patch fixes only active audio connections, because I assume that nobody
changes the line discipline for audio.
For non-audio connections the problem remains.
Maybe we can remove the tty_ldisc_flush() in isdn_tty_modem_result()
at all because it's done at tty_close?
On Mon, May 07, 2007 at 04:05:57PM -0500, Paul Fulghum wrote:
> Flush the tty flip buffer when the line discipline
> input queue is flushed, including the user call
> tcflush(TCIFLUSH/TCIOFLUSH). This prevents unexpected
> stale data after a user application calls tcflush().
>
> Cc: Alan Cox <alan@lxorguk.org.uk>
> Cc: Antonino Ingargiola <tritemio@gmail.com>
> Signed-off-by: Paul Fulghum <paulkf@microgate.com>
>
> --- a/drivers/char/tty_io.c 2007-05-04 05:46:55.000000000 -0500
> +++ b/drivers/char/tty_io.c 2007-05-05 03:23:46.000000000 -0500
> @@ -1240,6 +1263,7 @@ void tty_ldisc_flush(struct tty_struct *
> ld->flush_buffer(tty);
> tty_ldisc_deref(ld);
> }
> + tty_buffer_flush(tty);
[..]
Signed-off-by: Matthias Goebl <matthias.goebl@goebl.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/isdn/i4l/isdn_tty.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c index 4e5f87c1e714..24679a3f5596 100644 --- a/drivers/isdn/i4l/isdn_tty.c +++ b/drivers/isdn/i4l/isdn_tty.c | |||
@@ -2645,7 +2645,12 @@ isdn_tty_modem_result(int code, modem_info * info) | |||
2645 | if ((info->flags & ISDN_ASYNC_CLOSING) || (!info->tty)) { | 2645 | if ((info->flags & ISDN_ASYNC_CLOSING) || (!info->tty)) { |
2646 | return; | 2646 | return; |
2647 | } | 2647 | } |
2648 | #ifdef CONFIG_ISDN_AUDIO | ||
2649 | if ( !info->vonline ) | ||
2650 | tty_ldisc_flush(info->tty); | ||
2651 | #else | ||
2648 | tty_ldisc_flush(info->tty); | 2652 | tty_ldisc_flush(info->tty); |
2653 | #endif | ||
2649 | if ((info->flags & ISDN_ASYNC_CHECK_CD) && | 2654 | if ((info->flags & ISDN_ASYNC_CHECK_CD) && |
2650 | (!((info->flags & ISDN_ASYNC_CALLOUT_ACTIVE) && | 2655 | (!((info->flags & ISDN_ASYNC_CALLOUT_ACTIVE) && |
2651 | (info->flags & ISDN_ASYNC_CALLOUT_NOHUP)))) { | 2656 | (info->flags & ISDN_ASYNC_CALLOUT_NOHUP)))) { |