public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [GIT PATCH] TTY fixes for 2.6.34-git
@ 2010-03-19 15:13 Greg KH
  0 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2010-03-19 15:13 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel

Here are some tty bugfixes for your 2.6.34-git tree.

The biggest here is a revert of a patch that went into 2.6.34-rc1 that
shouldn't have gone in (no proper testing and no userspace need just
yet.)  Other than that, just a number of bugfixes.

Please pull from:
	master.kernel.org:/pub/scm/linux/kernel/git/gregkh/tty-2.6.git/

These patches have been in the linux-next tree for a while now.

Patches will be sent to the linux-kernel mailing list, if anyone wants
to see them.

thanks,

greg k-h

------------

 drivers/char/hvc_console.c              |   31 ++++++++++++++++--------
 drivers/char/tty_buffer.c               |    4 +-
 drivers/char/tty_port.c                 |    2 +-
 drivers/char/vt_ioctl.c                 |   39 +++++++++++++++----------------
 drivers/serial/cpm_uart/cpm_uart_cpm2.c |    4 +-
 drivers/serial/uartlite.c               |   10 ++++----
 drivers/usb/serial/console.c            |    1 +
 include/linux/tty.h                     |   10 ++++---
 include/linux/vt.h                      |    3 +-
 9 files changed, 58 insertions(+), 46 deletions(-)

---------------

Amit Shah (1):
      hvc_console: Fix race between hvc_close and hvc_remove

David Miller (1):
      uartlite: Fix build on sparc.

Fang Wenqi (1):
      tty_buffer: Fix distinct type warning

Greg Kroah-Hartman (1):
      Revert "tty: Add a new VT mode which is like VT_PROCESS but doesn't require a VT_RELDISP ioctl call"

Jason Wessel (1):
      tty_port,usb-console: Fix usb serial console open/close regression

Mel Gorman (1):
      tty: Take a 256 byte padding into account when buffering below sub-page units

Tobias Klauser (1):
      tty: cpm_uart: use resource_size()


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [GIT PATCH] TTY fixes for 2.6.34-git
@ 2010-04-30 16:36 Greg KH
  0 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2010-04-30 16:36 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel

Here are 2 bugfixes and one new device id for your 2.6.34-git tree.

Please pull from:
	master.kernel.org:/pub/scm/linux/kernel/git/gregkh/tty-2.6.git/

These patches have been in the linux-next tree for a while now.

Patches will be sent to the linux-kernel mailing list, if anyone wants
to see them.

thanks,

greg k-h

------------

 drivers/char/isicom.c       |    9 +++++++--
 drivers/char/istallion.c    |    2 ++
 drivers/char/mxser.c        |    3 ++-
 drivers/char/riscom8.c      |    1 +
 drivers/char/stallion.c     |    7 ++++---
 drivers/serial/8250_pnp.c   |    2 ++
 drivers/serial/pmac_zilog.c |    4 +++-
 7 files changed, 21 insertions(+), 7 deletions(-)

---------------

Alan Cox (1):
      tty: Fix regressions in the char driver conversion

Julia Lawall (1):
      serial: drivers/serial/pmac_zilog.c: add missing unlock

Ping Cheng (1):
      serial: 8250_pnp - add Fujitsu Wacom device


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [GIT PATCH] TTY fixes for 2.6.34-git
@ 2010-05-13 19:16 Greg KH
  2010-05-13 19:16 ` [PATCH 1/3] serial: mpc52xx_uart: fix null pointer dereference Greg Kroah-Hartman
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Greg KH @ 2010-05-13 19:16 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel

Here are 3 bugfixes for your 2.6.34-git tree.

One is a regression from .33, and the other 2 fix reported problems and
are being sent to the -stable trees as well.

Please pull from:
	master.kernel.org:/pub/scm/linux/kernel/git/gregkh/tty-2.6.git/

These patches have been in the linux-next tree for a while now.

Patches will be sent to the linux-kernel mailing list, if anyone wants
to see them.

thanks,

greg k-h

------------

 drivers/char/tty_io.c         |    1 +
 drivers/serial/imx.c          |   10 +++++++++-
 drivers/serial/mpc52xx_uart.c |    2 +-
 3 files changed, 11 insertions(+), 2 deletions(-)

---------------

Alan Cox (1):
      tty: Fix unbalanced BKL handling in error path

Anatolij Gustschin (1):
      serial: mpc52xx_uart: fix null pointer dereference

Valentin Longchamp (1):
      serial: imx.c: fix CTS trigger level lower to avoid lost chars


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/3] serial: mpc52xx_uart: fix null pointer dereference
  2010-05-13 19:16 [GIT PATCH] TTY fixes for 2.6.34-git Greg KH
@ 2010-05-13 19:16 ` Greg Kroah-Hartman
  2010-05-13 19:16 ` [PATCH 2/3] tty: Fix unbalanced BKL handling in error path Greg Kroah-Hartman
  2010-05-13 19:16 ` [PATCH 3/3] serial: imx.c: fix CTS trigger level lower to avoid lost chars Greg Kroah-Hartman
  2 siblings, 0 replies; 6+ messages in thread
From: Greg Kroah-Hartman @ 2010-05-13 19:16 UTC (permalink / raw)
  To: linux-kernel; +Cc: Anatolij Gustschin, Greg Kroah-Hartman

From: Anatolij Gustschin <agust@denx.de>

Commit 6acc6833510db8f72b5ef343296d97480555fda9
introduced NULL pointer dereference and kernel crash
on ppc32 machines while booting. Fix this bug now.

Reported-by: Leonardo Chiquitto <leonardo.lists@gmail.com>
Tested-by: Leonardo Chiquitto <leonardo.lists@gmail.com>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/serial/mpc52xx_uart.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c
index a176ab4..02469c3 100644
--- a/drivers/serial/mpc52xx_uart.c
+++ b/drivers/serial/mpc52xx_uart.c
@@ -1467,7 +1467,7 @@ mpc52xx_uart_init(void)
 	/*
 	 * Map the PSC FIFO Controller and init if on MPC512x.
 	 */
-	if (psc_ops->fifoc_init) {
+	if (psc_ops && psc_ops->fifoc_init) {
 		ret = psc_ops->fifoc_init();
 		if (ret)
 			return ret;
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/3] tty: Fix unbalanced BKL handling in error path
  2010-05-13 19:16 [GIT PATCH] TTY fixes for 2.6.34-git Greg KH
  2010-05-13 19:16 ` [PATCH 1/3] serial: mpc52xx_uart: fix null pointer dereference Greg Kroah-Hartman
@ 2010-05-13 19:16 ` Greg Kroah-Hartman
  2010-05-13 19:16 ` [PATCH 3/3] serial: imx.c: fix CTS trigger level lower to avoid lost chars Greg Kroah-Hartman
  2 siblings, 0 replies; 6+ messages in thread
From: Greg Kroah-Hartman @ 2010-05-13 19:16 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alan Cox, stable, Greg Kroah-Hartman

From: Alan Cox <alan@linux.intel.com>

Arnd noted:

After the "retry_open:" label, we first get the tty_mutex
and then the BKL. However a the end of tty_open, we jump
back to retry_open with the BKL still held. If we run into
this case, the tty_open function will be left with the BKL
still held.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/char/tty_io.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index 6da962c..d71f0fc 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -1875,6 +1875,7 @@ got_driver:
 		 */
 		if (filp->f_op == &hung_up_tty_fops)
 			filp->f_op = &tty_fops;
+		unlock_kernel();
 		goto retry_open;
 	}
 	unlock_kernel();
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/3] serial: imx.c: fix CTS trigger level lower to avoid lost chars
  2010-05-13 19:16 [GIT PATCH] TTY fixes for 2.6.34-git Greg KH
  2010-05-13 19:16 ` [PATCH 1/3] serial: mpc52xx_uart: fix null pointer dereference Greg Kroah-Hartman
  2010-05-13 19:16 ` [PATCH 2/3] tty: Fix unbalanced BKL handling in error path Greg Kroah-Hartman
@ 2010-05-13 19:16 ` Greg Kroah-Hartman
  2 siblings, 0 replies; 6+ messages in thread
From: Greg Kroah-Hartman @ 2010-05-13 19:16 UTC (permalink / raw)
  To: linux-kernel; +Cc: Valentin Longchamp, stable, Greg Kroah-Hartman

From: Valentin Longchamp <valentin.longchamp@epfl.ch>

The imx CTS trigger level is left at its reset value that is 32
chars. Since the RX FIFO has 32 entries, when CTS is raised, the
FIFO already is full. However, some serial port devices first empty
their TX FIFO before stopping when CTS is raised, resulting in lost
chars.

This patch sets the trigger level lower so that other chars arrive
after CTS is raised, there is still room for 16 of them.

Signed-off-by: Valentin Longchamp<valentin.longchamp@epfl.ch>
Tested-by: Philippe Rétornaz<philippe.retornaz@epfl.ch>
Acked-by: Wolfram Sang<w.sang@pengutronix.de>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/serial/imx.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/drivers/serial/imx.c b/drivers/serial/imx.c
index 4315b23..eacb588 100644
--- a/drivers/serial/imx.c
+++ b/drivers/serial/imx.c
@@ -120,7 +120,8 @@
 #define  MX2_UCR3_RXDMUXSEL	 (1<<2)  /* RXD Muxed Input Select, on mx2/mx3 */
 #define  UCR3_INVT  	 (1<<1)  /* Inverted Infrared transmission */
 #define  UCR3_BPEN  	 (1<<0)  /* Preset registers enable */
-#define  UCR4_CTSTL_32   (32<<10) /* CTS trigger level (32 chars) */
+#define  UCR4_CTSTL_SHF  10      /* CTS trigger level shift */
+#define  UCR4_CTSTL_MASK 0x3F    /* CTS trigger is 6 bits wide */
 #define  UCR4_INVR  	 (1<<9)  /* Inverted infrared reception */
 #define  UCR4_ENIRI 	 (1<<8)  /* Serial infrared interrupt enable */
 #define  UCR4_WKEN  	 (1<<7)  /* Wake interrupt enable */
@@ -591,6 +592,9 @@ static int imx_setup_ufcr(struct imx_port *sport, unsigned int mode)
 	return 0;
 }
 
+/* half the RX buffer size */
+#define CTSTL 16
+
 static int imx_startup(struct uart_port *port)
 {
 	struct imx_port *sport = (struct imx_port *)port;
@@ -607,6 +611,10 @@ static int imx_startup(struct uart_port *port)
 	if (USE_IRDA(sport))
 		temp |= UCR4_IRSC;
 
+	/* set the trigger level for CTS */
+	temp &= ~(UCR4_CTSTL_MASK<<  UCR4_CTSTL_SHF);
+	temp |= CTSTL<<  UCR4_CTSTL_SHF;
+
 	writel(temp & ~UCR4_DREN, sport->port.membase + UCR4);
 
 	if (USE_IRDA(sport)) {
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-05-13 19:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-13 19:16 [GIT PATCH] TTY fixes for 2.6.34-git Greg KH
2010-05-13 19:16 ` [PATCH 1/3] serial: mpc52xx_uart: fix null pointer dereference Greg Kroah-Hartman
2010-05-13 19:16 ` [PATCH 2/3] tty: Fix unbalanced BKL handling in error path Greg Kroah-Hartman
2010-05-13 19:16 ` [PATCH 3/3] serial: imx.c: fix CTS trigger level lower to avoid lost chars Greg Kroah-Hartman
  -- strict thread matches above, loose matches on Subject: below --
2010-04-30 16:36 [GIT PATCH] TTY fixes for 2.6.34-git Greg KH
2010-03-19 15:13 Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox