kernel_optimize_test/drivers/isdn
Matthias Goebl 00409bb045 [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>
2008-01-04 03:55:40 -08:00
..
act2000 isdn/act2000: fix major bug. clean irq handler. 2007-10-23 19:53:16 -04:00
capi [ISDN] capidrv: address two longstanding warnings 2007-10-29 04:45:06 -04:00
divert [NET]: Make /proc/net per network namespace 2007-10-10 16:49:06 -07:00
gigaset Add missing newlines to some uses of dev_<level> messages 2007-10-18 14:37:28 -07:00
hardware Spelling fix: explicitly 2007-10-19 23:22:55 +02:00
hisax isdn: bootup crash fix 2007-11-29 09:24:53 -08:00
hysdn [ISDN] hysdn: convert to PCI hotplug API 2007-10-12 09:14:49 -04:00
i4l [ISDN] i4l: 'NO CARRIER' message lost after ldisc flush 2008-01-04 03:55:40 -08:00
icn Use menuconfig objects - CONFIG_ISDN_I4L 2007-07-21 17:49:17 -07:00
isdnloop ISDN: Spinlock initializer cleanup 2007-05-08 11:15:17 -07:00
pcbit Convert files to UTF-8 and some cleanups 2007-10-19 23:21:04 +02:00
sc [ISDN] sc: Really, really fix warning 2007-11-14 15:59:43 -08:00
Kconfig Use menuconfig objects: ISDN 2007-07-21 17:49:17 -07:00
Makefile [PATCH] isdn4linux: Siemens Gigaset drivers - Kconfigs and Makefiles 2006-03-26 08:57:05 -08:00