Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757972AbYJNJP7 (ORCPT ); Tue, 14 Oct 2008 05:15:59 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755726AbYJNJPS (ORCPT ); Tue, 14 Oct 2008 05:15:18 -0400 Received: from mtagate7.de.ibm.com ([195.212.29.156]:41242 "EHLO mtagate7.de.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757392AbYJNJPP (ORCPT ); Tue, 14 Oct 2008 05:15:15 -0400 Message-Id: <20081014091413.003841094@linux.vnet.ibm.com> References: <20081014091247.433079967@linux.vnet.ibm.com> User-Agent: quilt/0.46-1 Date: Tue, 14 Oct 2008 11:12:49 +0200 From: Hendrik Brueckner To: Benjamin Herrenschmidt , Linux PPC devel , Jeremy Fitzhardinge , Rusty Russell , "Ryan S. Arnold" Cc: LKML , Christian Borntraeger , Heiko Carstens , Martin Schwidefsky , Hendrik Brueckner Subject: [RFC PATCH 2/5] hvc_console: Add tty driver flag TTY_DRIVER_RESET_TERMIOS Content-Disposition: inline; filename=hvc/common/02_hvc_termios.patch Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1826 Lines: 49 From: Hendrik Brueckner After a tty hangup() or close() operation, processes might not reset the termio settings to a sane state. In order to reset the termios to its default settings the tty driver flag TTY_DRIVER_RESET_TERMIOS has been added. TTY driver flag description from include/linux/tty_driver.h: TTY_DRIVER_RESET_TERMIOS --- requests the tty layer to reset the termios setting when the last process has closed the device. Used for PTY's, in particular. Acked-by: Christian Borntraeger Signed-off-by: Hendrik Brueckner --- drivers/char/hvc_console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/char/hvc_console.c +++ b/drivers/char/hvc_console.c @@ -796,7 +796,7 @@ static int hvc_init(void) drv->minor_start = HVC_MINOR; drv->type = TTY_DRIVER_TYPE_SYSTEM; drv->init_termios = tty_std_termios; - drv->flags = TTY_DRIVER_REAL_RAW; + drv->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_RESET_TERMIOS; tty_set_operations(drv, &hvc_ops); /* Always start the kthread because there can be hotplug vty adapters -- Hendrik Brueckner D/3303 Linux on System z Development Tel: +49 7031 16-1073 Fax: +49 7031 16-3456 eMail: brueckner@linux.vnet.ibm.com IBM Deutschland Research & Development GmbH, Schoenaicher Str. 220, 71032 Boeblingen IBM Deutschland Research & Development GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Erich Baier Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/