Greg KH | 26 Oct 2011 13:42
Picon

[GIT PATCH] TTY/serial driver patches for 3.2

Here is the tty/serial driver patchset for the 3.2 tree.

Nothing major here, with a lot of good cleanup of the tty layer from
Jiri Slaby, and some driver updates and additions.

Note, you will get a merge error in the following files when merging
with your tree:
	drivers/tty/serial/8250_pci.c
	drivers/tty/serial/atmel_serial.c

The one in 8250_pci.c is trivial to fix, the atmel_serial one isn't as
easy, but I'm sure you can figure it out :)  If you want me to do the
merge for it, I'll be glad to do so, just let me know.

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

All of these patches have been in the -mm and -next trees for a while.

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

thanks,

greg k-h

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

 Documentation/devicetree/bindings/serial/rs485.txt |   31 +
 .../devicetree/bindings/tty/serial/atmel-usart.txt |   27 +
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 01/79] tty/powerpc: introduce the ePAPR embedded hypervisor byte channel driver

From: Timur Tabi <timur <at> freescale.com>

The ePAPR embedded hypervisor specification provides an API for "byte
channels", which are serial-like virtual devices for sending and receiving
streams of bytes.  This driver provides Linux kernel support for byte
channels via three distinct interfaces:

1) An early-console (udbg) driver.  This provides early console output
through a byte channel.  The byte channel handle must be specified in a
Kconfig option.

2) A normal console driver.  Output is sent to the byte channel designated
for stdout in the device tree.  The console driver is for handling kernel
printk calls.

3) A tty driver, which is used to handle user-space input and output.  The
byte channel used for the console is designated as the default tty.

Signed-off-by: Timur Tabi <timur <at> freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 arch/powerpc/include/asm/udbg.h |    1 +
 arch/powerpc/kernel/udbg.c      |    2 +
 drivers/tty/Kconfig             |   34 ++
 drivers/tty/Makefile            |    1 +
 drivers/tty/ehv_bytechan.c      |  888 +++++++++++++++++++++++++++++++++++++++
 5 files changed, 926 insertions(+), 0 deletions(-)
 create mode 100644 drivers/tty/ehv_bytechan.c

diff --git a/arch/powerpc/include/asm/udbg.h b/arch/powerpc/include/asm/udbg.h
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 02/79] drivers/tty/synclink: remove double comment

From: Edwin van Vliet <edwin <at> cheatah.nl>

Redundant comment line was removed

Signed-off-by: Edwin van Vliet <edwin <at> cheatah.nl>
Reviewed-by: Jesper Juhl <jj <at> chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/synclink.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/tty/synclink.c b/drivers/tty/synclink.c
index 272e417..e67fb20 100644
--- a/drivers/tty/synclink.c
+++ b/drivers/tty/synclink.c
 <at>  <at>  -2124,7 +2124,6  <at>  <at>  static int mgsl_write(struct tty_struct * tty,
 	if ( info->params.mode == MGSL_MODE_HDLC ||
 			info->params.mode == MGSL_MODE_RAW ) {
 		/* operating in synchronous (frame oriented) mode */
-		/* operating in synchronous (frame oriented) mode */
 		if (info->tx_active) {

 			if ( info->params.mode == MGSL_MODE_HDLC ) {
--

-- 
1.7.7

--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 03/79] TTY: serial, remove BTM from wait_until_sent

From: Jiri Slaby <jslaby <at> suse.cz>

During the BKL removal process, the BKL was switched to tty_lock
(BTM). Now we should start pruning the BTM further. Let's start with
wait_until_sent of the serial layer. This will allow us to switch to
the tty port helpers and thus clean it up much.

In wait_until_sent there are some uport members accessed, but neither
of them is protected by BTM at the location they are set ('=>' means
function call):
* uport->fifosize (set in tty_ioctl => uart_ioctl => uart_set_info)
* uport->type (set in add_one_port prior to tty_register_device)
* uport->timeout (set usually in tty_ioctl => tty_mode_ioctl =>
  tty_set_termios => uart_set_termios => uart_change_speed =>
  uport->ops->set_termios => uart_update_timeout)
* call to uport->ops->tx_empty()

If the tx_empty hook needs some lock to protect accesses to registers,
it should take &uport->lock spinlock like 8250 does. Otherwise there
still might be races e.g. with ISRs.

This should also fix the issue Andreas is seeing (BTM in comparison to
BKL doesn't have any hidden functionality like unlocking during
sleeping).

Signed-off-by: Jiri Slaby <jslaby <at> suse.cz>
References: https://lkml.org/lkml/2011/5/25/562
Cc: Alan Cox <alan <at> linux.intel.com>
Acked-by: Arnd Bergmann <arnd <at> arndb.de>
Cc: Andreas Bombe <aeb <at> debian.org>
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 07/79] TTY: remove tty_locked

From: Jiri Slaby <jslaby <at> suse.cz>

We used it really only serial and ami_serial. The rest of the
callsites were BUG/WARN_ONs to check if BTM is held. Now that we
pruned tty_locked from both of the real users, we can get rid of
tty_lock along with __big_tty_mutex_owner.

Signed-off-by: Jiri Slaby <jslaby <at> suse.cz>
Acked-by: Arnd Bergmann <arnd <at> arndb.de>
Cc: Alan Cox <alan <at> linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/serial/serial_core.c |    4 ----
 drivers/tty/tty_ldisc.c          |    1 -
 drivers/tty/tty_mutex.c          |   12 ------------
 drivers/tty/vt/selection.c       |    4 ++--
 include/linux/tty.h              |    2 --
 5 files changed, 2 insertions(+), 21 deletions(-)

diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
index 4786232..44c2963 100644
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
 <at>  <at>  -1245,8 +1245,6  <at>  <at>  static void uart_close(struct tty_struct *tty, struct file *filp)
 	struct uart_port *uport;
 	unsigned long flags;

-	BUG_ON(!tty_locked());
-
 	if (!state)
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 04/79] TTY: msm_serial, remove unneeded console set

From: Jiri Slaby <jslaby <at> suse.cz>

It doesn't make sense to set console to uart_port in console->setup.
At that time the console is set by uart_add_one_port already.

The call chain looked like:
uart_add_one_port()
  uport->cons = drv->cons;   <= once
  uart_configure_port()
    register_console()
     console->setup()
       port->cons = co;      <= second time

Signed-off-by: Jiri Slaby <jslaby <at> suse.cz>
Cc: Alan Cox <alan <at> linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/serial/msm_serial.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/msm_serial.c b/drivers/tty/serial/msm_serial.c
index e6ba838..29cbfd8 100644
--- a/drivers/tty/serial/msm_serial.c
+++ b/drivers/tty/serial/msm_serial.c
 <at>  <at>  -804,8 +804,6  <at>  <at>  static int __init msm_console_setup(struct console *co, char *options)
 	if (unlikely(!port->membase))
 		return -ENXIO;

-	port->cons = co;
-
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 09/79] serial:blackfin: Correct coding style in bfin serial driver.

From: Sonic Zhang <sonic.zhang <at> analog.com>

Signed-off-by: Sonic Zhang <sonic.zhang <at> analog.com>
Acked-by: Alan Cox <alan <at> linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/serial/bfin_5xx.c |   25 ++++++++++++++++---------
 1 files changed, 16 insertions(+), 9 deletions(-)

diff --git a/drivers/tty/serial/bfin_5xx.c b/drivers/tty/serial/bfin_5xx.c
index ff69791..e08bc04 100644
--- a/drivers/tty/serial/bfin_5xx.c
+++ b/drivers/tty/serial/bfin_5xx.c
 <at>  <at>  -234,8 +234,8  <at>  <at>  static void bfin_serial_rx_chars(struct bfin_serial_port *uart)
 	status = UART_GET_LSR(uart);
 	UART_CLEAR_LSR(uart);

- 	ch = UART_GET_CHAR(uart);
- 	uart->port.icount.rx++;
+	ch = UART_GET_CHAR(uart);
+	uart->port.icount.rx++;

 #if defined(CONFIG_KGDB_SERIAL_CONSOLE) || \
 	defined(CONFIG_KGDB_SERIAL_CONSOLE_MODULE)
 <at>  <at>  -739,9 +739,8  <at>  <at>  static int bfin_serial_startup(struct uart_port *port)
 			pr_info("Unable to attach BlackFin UART CTS interrupt. So, disable it.\n");
 		}
 	}
-	if (uart->rts_pin >= 0) {
+	if (uart->rts_pin >= 0)
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 05/79] TTY: serial, remove tasklet for tty_wakeup

From: Jiri Slaby <jslaby <at> suse.cz>

tty_wakeup can be called from any context. So there is no need to have
an extra tasklet for calling that. Hence save some space and remove
the tasklet completely.

Signed-off-by: Jiri Slaby <jslaby <at> suse.cz>
Cc: Alan Cox <alan <at> linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/serial/serial_core.c |   20 +-------------------
 include/linux/serial_core.h      |    1 -
 2 files changed, 1 insertions(+), 20 deletions(-)

diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
index 2cbf1bd..4786232 100644
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
 <at>  <at>  -72,7 +72,7  <at>  <at>  void uart_write_wakeup(struct uart_port *port)
 	 * closed.  No cookie for you.
 	 */
 	BUG_ON(!state);
-	tasklet_schedule(&state->tlet);
+	tty_wakeup(state->port.tty);
 }

 static void uart_stop(struct tty_struct *tty)
 <at>  <at>  -107,12 +107,6  <at>  <at>  static void uart_start(struct tty_struct *tty)
 	spin_unlock_irqrestore(&port->lock, flags);
 }
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 06/79] TTY: ami_serial, remove BTM from wait_until_sent

From: Jiri Slaby <jslaby <at> suse.cz>

The same as in "TTY: serial, remove BTM from wait_until_sent" we don't
need to take BTM in wait_until_sent of ami_serial. Exactly the same
as serial, ami_serial accesses some "info" members (xmit_fifo_size,
timeout), but their assignment on other places in the code is not
protected by BTM anyway.

So the BTM protects nothing here. This removal helps us to get rid of
tty_locked() and __big_tty_mutex_owner in the following patch. This
was suggested by Arnd.

Signed-off-by: Jiri Slaby <jslaby <at> suse.cz>
Acked-by: Arnd Bergmann <arnd <at> arndb.de>
Cc: Alan Cox <alan <at> linux.intel.com>
Cc: Andreas Bombe <aeb <at> debian.org>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/amiserial.c |   10 +---------
 1 files changed, 1 insertions(+), 9 deletions(-)

diff --git a/drivers/tty/amiserial.c b/drivers/tty/amiserial.c
index 2205795..6d43f55 100644
--- a/drivers/tty/amiserial.c
+++ b/drivers/tty/amiserial.c
 <at>  <at>  -1529,7 +1529,6  <at>  <at>  static void rs_wait_until_sent(struct tty_struct *tty, int timeout)
 {
 	struct async_struct * info = tty->driver_data;
 	unsigned long orig_jiffies, char_time;
-	int tty_was_locked = tty_locked();
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 10/79] serial:blackfin: rename Blackfin serial driver to bfin_uart.c

From: Sonic Zhang <sonic.zhang <at> analog.com>

bfin_5xx.c is not a general name for all Blackfin chips.

Signed-off-by: Sonic Zhang <sonic.zhang <at> analog.com>
Acked-by: Alan Cox <alan <at> linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/serial/Kconfig                     |    2 +-
 drivers/tty/serial/Makefile                    |    2 +-
 drivers/tty/serial/{bfin_5xx.c => bfin_uart.c} |    0
 3 files changed, 2 insertions(+), 2 deletions(-)
 rename drivers/tty/serial/{bfin_5xx.c => bfin_uart.c} (100%)

diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
index 4dcb37b..a9b307f 100644
--- a/drivers/tty/serial/Kconfig
+++ b/drivers/tty/serial/Kconfig
 <at>  <at>  -722,7 +722,7  <at>  <at>  config SERIAL_BFIN
 	  Add support for the built-in UARTs on the Blackfin.

 	  To compile this driver as a module, choose M here: the
-	  module will be called bfin_5xx.
+	  module is named bfin_uart.ko.

 config SERIAL_BFIN_CONSOLE
 	bool "Console on Blackfin serial port"
diff --git a/drivers/tty/serial/Makefile b/drivers/tty/serial/Makefile
index 83b4da6..7874813 100644
--- a/drivers/tty/serial/Makefile
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 12/79] serial:bfin_uart: Put TX IRQ in individual platform resource.

From: Sonic Zhang <sonic.zhang <at> analog.com>

Serial TX IRQ is not RX IRQ plus 1 in some blackfin chips.
Give individual platform resources to both TX and RX irqs.

Signed-off-by: Sonic Zhang <sonic.zhang <at> analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/serial/bfin_uart.c |   36 ++++++++++++++++++++++--------------
 1 files changed, 22 insertions(+), 14 deletions(-)

diff --git a/drivers/tty/serial/bfin_uart.c b/drivers/tty/serial/bfin_uart.c
index e08bc04..c7e592d 100644
--- a/drivers/tty/serial/bfin_uart.c
+++ b/drivers/tty/serial/bfin_uart.c
 <at>  <at>  -667,17 +667,17  <at>  <at>  static int bfin_serial_startup(struct uart_port *port)
 		kgdboc_break_enabled = 0;
 	else {
 # endif
-	if (request_irq(uart->port.irq, bfin_serial_rx_int, IRQF_DISABLED,
+	if (request_irq(uart->rx_irq, bfin_serial_rx_int, IRQF_DISABLED,
 	     "BFIN_UART_RX", uart)) {
 		printk(KERN_NOTICE "Unable to attach BlackFin UART RX interrupt\n");
 		return -EBUSY;
 	}

 	if (request_irq
-	    (uart->port.irq+1, bfin_serial_tx_int, IRQF_DISABLED,
+	    (uart->tx_irq, bfin_serial_tx_int, IRQF_DISABLED,
 	     "BFIN_UART_TX", uart)) {
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 08/79] TTY: mxser+cyclades remove wait_until_sent debug code

From: Jiri Slaby <jslaby <at> suse.cz>

It makes the code really ugly. And since it can be enabled only before
building and only in the source files, it can be barely used by users.
That said, I've not seen anybody to use it in the past few years.

This crap is copied to some more drivers over the tty tree. Since I'm
not their maintainer, I'm not sure if I should remove them too?

Signed-off-by: Jiri Slaby <jslaby <at> suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/cyclades.c |   12 +-----------
 drivers/tty/mxser.c    |   13 +------------
 2 files changed, 2 insertions(+), 23 deletions(-)

diff --git a/drivers/tty/cyclades.c b/drivers/tty/cyclades.c
index c0e8f2e..5beef49 100644
--- a/drivers/tty/cyclades.c
+++ b/drivers/tty/cyclades.c
 <at>  <at>  -45,7 +45,6  <at>  <at> 
 #undef	CY_DEBUG_IO
 #undef	CY_DEBUG_COUNT
 #undef	CY_DEBUG_DTR
-#undef	CY_DEBUG_WAIT_UNTIL_SENT
 #undef	CY_DEBUG_INTERRUPTS
 #undef	CY_16Y_HACK
 #undef	CY_ENABLE_MONITORING
 <at>  <at>  -1678,16 +1677,10  <at>  <at>  static void cy_wait_until_sent(struct tty_struct *tty, int timeout)
 	 */
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 11/79] tty: clearify structure initializer in notify_write()

From: Mathias Krause <minipli <at> googlemail.com>

Even though this is valid C we should not mix C99 initializers with
obfuscated ANSI C. Stick to C99 and initialize c by its name.

Found by clang:
drivers/tty/vt/vt.c:262:55: warning: explicitly assigning a variable of
type 'unsigned int' to itself [-Wself-assign]
    struct vt_notifier_param param = { .vc = vc, unicode = unicode };
                                                 ~~~~~~~ ^ ~~~~~~~

Signed-off-by: Mathias Krause <minipli <at> googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/vt/vt.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index b3915b7..e716839 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
 <at>  <at>  -259,7 +259,7  <at>  <at>  EXPORT_SYMBOL_GPL(unregister_vt_notifier);

 static void notify_write(struct vc_data *vc, unsigned int unicode)
 {
-	struct vt_notifier_param param = { .vc = vc, unicode = unicode };
+	struct vt_notifier_param param = { .vc = vc, .c = unicode };
 	atomic_notifier_call_chain(&vt_notifier_list, VT_WRITE, &param);
 }

(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 15/79] tty: serial: allow ports to override the irq handler

From: Jamie Iles <jamie <at> jamieiles.com>

Some serial ports may have unusal requirements for interrupt handling
(e.g. the Synopsys DesignWare 8250-alike port and it's busy detect
interrupt).  Add a .handle_irq callback that can be used for platforms
to override the interrupt behaviour in a similar fashion to the
.serial_out and .serial_in callbacks.

Signed-off-by: Jamie Iles <jamie <at> jamieiles.com>
Acked-by: Alan Cox <alan <at> linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 include/linux/serial_core.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index 76e1103..c31ae43 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
 <at>  <at>  -300,6 +300,7  <at>  <at>  struct uart_port {
 	void			(*set_termios)(struct uart_port *,
 				               struct ktermios *new,
 				               struct ktermios *old);
+	int			(*handle_irq)(struct uart_port *);
 	void			(*pm)(struct uart_port *, unsigned int state,
 				      unsigned int old);
 	unsigned int		irq;			/* irq number */
--

-- 
1.7.7

(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 19/79] tty: serial8250: remove UPIO_DWAPB{,32}

From: Jamie Iles <jamie <at> jamieiles.com>

Now that platforms can override the port IRQ handler and the only user
of these UPIO modes has been converted over, kill off UPIO_DWAPB and
UPIO_DWAPB32.

Acked-by: Alan Cox <alan <at> linux.intel.com>
Signed-off-by: Jamie Iles <jamie <at> jamieiles.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/serial/8250.c        |   68 --------------------------------------
 drivers/tty/serial/serial_core.c |    4 --
 include/linux/serial_core.h      |    4 +--
 3 files changed, 1 insertions(+), 75 deletions(-)

diff --git a/drivers/tty/serial/8250.c b/drivers/tty/serial/8250.c
index 833e011..6f594d2 100644
--- a/drivers/tty/serial/8250.c
+++ b/drivers/tty/serial/8250.c
 <at>  <at>  -461,42 +461,6  <at>  <at>  static void tsi_serial_out(struct uart_port *p, int offset, int value)
 		writeb(value, p->membase + offset);
 }

-/* Save the LCR value so it can be re-written when a Busy Detect IRQ occurs. */
-static inline void dwapb_save_out_value(struct uart_port *p, int offset,
-					int value)
-{
-	struct uart_8250_port *up =
-		container_of(p, struct uart_8250_port, port);
-
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 13/79] serial: samsung: Add unified interrupt handler for s3c64xx and later SoC's

From: Thomas Abraham <thomas.abraham <at> linaro.org>

s3c64xx and later SoC's include the interrupt mask and pending registers
in the uart controller, unlike the s3c24xx SoC's which have these registers
in the interrupt controller. When the mask and pending registers are part
of the uart controller, a unified interrupt handler can handle the tx/rx
interrupt. With this, the static reservation of interrupt numbers for the
uart tx/rx/err interrupts in the linux irq space is not required and
simplifies adding device tree support.

Suggested-by: Grant Likely <grant.likely <at> secretlab.ca>
CC: Ben Dooks <ben-linux <at> fluff.org>
Signed-off-by: Thomas Abraham <thomas.abraham <at> linaro.org>
Acked-by: Alan Cox <alan <at> linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/serial/samsung.c |  107 +++++++++++++++++++++++++++++++++++++-----
 drivers/tty/serial/samsung.h |    1 +
 2 files changed, 96 insertions(+), 12 deletions(-)

diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c
index afc6294..9b84654 100644
--- a/drivers/tty/serial/samsung.c
+++ b/drivers/tty/serial/samsung.c
 <at>  <at>  -83,6 +83,16  <at>  <at>  static int s3c24xx_serial_txempty_nofifo(struct uart_port *port)
 	return (rd_regl(port, S3C2410_UTRSTAT) & S3C2410_UTRSTAT_TXE);
 }

+/*
+ * s3c64xx and later SoC's include the interrupt mask and status registers in
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 16/79] tty: serial8250: allow platforms to override irq handler

From: Jamie Iles <jamie <at> jamieiles.com>

Some ports (e.g. Synopsys DesignWare 8250) have special requirements for
handling the interrupts.  Allow these platforms to specify their own
interrupt handler that will override the default.
serial8250_handle_irq() is provided so that platforms can extend the IRQ
handler rather than completely replacing it.

Signed-off-by: Jamie Iles <jamie <at> jamieiles.com>
Acked-by: Alan Cox <alan <at> linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/serial/8250.c   |   39 +++++++++++++++++++++++++++++++++++----
 include/linux/serial_8250.h |    2 ++
 2 files changed, 37 insertions(+), 4 deletions(-)

diff --git a/drivers/tty/serial/8250.c b/drivers/tty/serial/8250.c
index f2dfec8..833e011 100644
--- a/drivers/tty/serial/8250.c
+++ b/drivers/tty/serial/8250.c
 <at>  <at>  -509,6 +509,8  <at>  <at>  static void io_serial_out(struct uart_port *p, int offset, int value)
 	outb(value, p->iobase + offset);
 }

+static int serial8250_default_handle_irq(struct uart_port *port);
+
 static void set_io_from_upio(struct uart_port *p)
 {
 	struct uart_8250_port *up =
 <at>  <at>  -557,6 +559,7  <at>  <at>  static void set_io_from_upio(struct uart_port *p)
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 18/79] mips: msp71xx/serial: add workaround for DW UART

From: Jamie Iles <jamie <at> jamieiles.com>

The Synopsys DesignWare UART in pmc-sierra msp71xx has an extra feature
where the UART detects a write attempt to the LCR whilst busy and raises
an interrupt.  The driver needs to clear the interrupt and rewrite the
LCR.  Move this into platform code and out of the 8250 driver.

Acked-by: Ralf Baechle <ralf <at> linux-mips.org>
Acked-by: Alan Cox <alan <at> linux.intel.com>
Signed-off-by: Jamie Iles <jamie <at> jamieiles.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 arch/mips/pmc-sierra/msp71xx/msp_serial.c |   69 +++++++++++++++++++++++++++--
 1 files changed, 65 insertions(+), 4 deletions(-)

diff --git a/arch/mips/pmc-sierra/msp71xx/msp_serial.c b/arch/mips/pmc-sierra/msp71xx/msp_serial.c
index c3247b5..a1c7c7d 100644
--- a/arch/mips/pmc-sierra/msp71xx/msp_serial.c
+++ b/arch/mips/pmc-sierra/msp71xx/msp_serial.c
 <at>  <at>  -27,6 +27,7  <at>  <at> 
 #include <linux/serial.h>
 #include <linux/serial_core.h>
 #include <linux/serial_reg.h>
+#include <linux/slab.h>

 #include <asm/bootinfo.h>
 #include <asm/io.h>
 <at>  <at>  -38,6 +39,55  <at>  <at> 
 #include <msp_int.h>
 #include <msp_regs.h>
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 28/79] jsm: remove buggy write queue

From: Thadeu Lima de Souza Cascardo <cascardo <at> linux.vnet.ibm.com>

jsm uses a write queue that copies from uart_core circular buffer. This
copying however has some bugs, like not wrapping the head counter. Since
this write queue is also a circular buffer, the consumer function is
ready to use the uart_core circular buffer directly.

This buggy copying function was making some bytes be dropped when
transmitting to a raw tty, doing something like this.

[root <at> hostname ~]$ cat /dev/ttyn1 > cascardo/dump &
[1] 2658
[root <at> hostname ~]$ cat /proc/tty/drivers > /dev/ttyn0
[root <at> hostname ~]$ cat /proc/tty/drivers
/dev/tty             /dev/tty        5       0 system:/dev/tty
/dev/console         /dev/console    5       1 system:console
/dev/ptmx            /dev/ptmx       5       2 system
/dev/vc/0            /dev/vc/0       4       0 system:vtmaster
jsm                  /dev/ttyn     250 0-31 serial
serial               /dev/ttyS       4 64-95 serial
hvc                  /dev/hvc      229 0-7 system
pty_slave            /dev/pts      136 0-1048575 pty:slave
pty_master           /dev/ptm      128 0-1048575 pty:master
unknown              /dev/tty        4 1-63 console
[root <at> hostname ~]$ cat cascardo/dump
/dev/tty             /dev/tty        5       0 system:/dev/tty
/dev/console         /dev/console    5       1 system:console
/dev/ptmx            /dev/ptmx       5       2 system
/dev/vc/0            /dev/vc/0       4       0 system:vtmaste[root <at> hostname ~]$

(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 17/79] mips: msp71xx/serial: convert to pr_foo() helpers

From: Jamie Iles <jamie <at> jamieiles.com>

Convert to pr_foo() helpers rather than printk(KERN_.*).

Acked-by: Ralf Baechle <ralf <at> linux-mips.org>
Acked-by: Anoop P A<Anoop_P.A <at> pmc-sierra.com>
Acked-by: Alan Cox <alan <at> linux.intel.com>
Signed-off-by: Jamie Iles <jamie <at> jamieiles.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 arch/mips/pmc-sierra/msp71xx/msp_serial.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/mips/pmc-sierra/msp71xx/msp_serial.c b/arch/mips/pmc-sierra/msp71xx/msp_serial.c
index f726162..c3247b5 100644
--- a/arch/mips/pmc-sierra/msp71xx/msp_serial.c
+++ b/arch/mips/pmc-sierra/msp71xx/msp_serial.c
 <at>  <at>  -65,7 +65,7  <at>  <at>  void __init msp_serial_setup(void)
 	up.line         = 0;
 	up.private_data		= (void*)UART0_STATUS_REG;
 	if (early_serial_setup(&up))
-		printk(KERN_ERR "Early serial init of port 0 failed\n");
+		pr_err("Early serial init of port 0 failed\n");

 	/* Initialize the second serial port, if one exists */
 	switch (mips_machtype) {
 <at>  <at>  -89,5 +89,5  <at>  <at>  void __init msp_serial_setup(void)
 	up.line         = 1;
 	up.private_data		= (void*)UART1_STATUS_REG;
 	if (early_serial_setup(&up))
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 27/79] jsm: remove remaining flip buffer code

From: Thadeu Lima de Souza Cascardo <cascardo <at> linux.vnet.ibm.com>

The flip buffer is not used anymore. Remove its allocation and
declaration in the board structure.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo <at> linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/serial/jsm/jsm.h        |    3 ---
 drivers/tty/serial/jsm/jsm_driver.c |   18 ------------------
 2 files changed, 0 insertions(+), 21 deletions(-)

diff --git a/drivers/tty/serial/jsm/jsm.h b/drivers/tty/serial/jsm/jsm.h
index b704c8c..cd53bdd 100644
--- a/drivers/tty/serial/jsm/jsm.h
+++ b/drivers/tty/serial/jsm/jsm.h
 <at>  <at>  -88,7 +88,6  <at>  <at>  enum {

 /* 4 extra for alignment play space */
 #define WRITEBUFLEN	((4096) + 4)
-#define MYFLIPLEN	N_TTY_BUF_SIZE

 #define JSM_VERSION	"jsm: 1.2-1-INKERNEL"
 #define JSM_PARTNUM	"40002438_A-INKERNEL"
 <at>  <at>  -150,7 +149,6  <at>  <at>  struct jsm_board
 	u32		bd_uart_offset;	/* Space between each UART */

 	struct jsm_channel *channels[MAXPORTS]; /* array of pointers to our channels. */
-	char		*flipbuf;	/* Our flip buffer, alloced if board is found */

(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 24/79] serial/imx: support to handle break character

From: Hui Wang <jason77.wang <at> gmail.com>

The imx UART hardware controller can identify BREAK character and the
imx_set_termios() can accept BRKINT set by users, but current existing
imx_rxint() can't pass BREAK character and TTY_BREAK to the tty layer
as other serial drivers do (8250.c omap_serial.c).

Here add code to handle BREAK character and pass it to tty layer.

To detect error occurrence, i use URXD_ERR to replace (URXD_OVRRUN |
URXD_FRMERR | ...) because any kind of error occurs, URXD_ERR will
always be set to 1.

I put the URXD_BRK to the first place to check since when BREAK error
occurs, not only URXD_BRK is set to 1, but also URXD_PRERR and
URXD_FRMERR are all set to 1. This arrangement can filter out fake
parity and frame errors when BREAK error occurs.

Signed-off-by: Hui Wang <jason77.wang <at> gmail.com>
Acked-by: Sascha Hauer <s.hauer <at> pengutronix.de>
Acked-by: Alan Cox <alan <at> linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/serial/imx.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 7e91b3d..54ffdc6 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 14/79] ARM: SAMSUNG: Remove uart irq handling from plaform code

From: Thomas Abraham <thomas.abraham <at> linaro.org>

With uart tx/rx/err interrupt handling moved into the driver for s3c64xx
and later SoC's, the uart interrupt handling in plaform code can be removed.
The uart device irq resources is reduced to one and the related unused
macros are removed.

Suggested-by: Grant Likely <grant.likely <at> secretlab.ca>
CC: Ben Dooks <ben-linux <at> fluff.org>
Signed-off-by: Thomas Abraham <thomas.abraham <at> linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 arch/arm/Kconfig                                 |    1 -
 arch/arm/mach-s3c64xx/dev-uart.c                 |   60 ++------------
 arch/arm/mach-s3c64xx/include/mach/irqs.h        |   30 -------
 arch/arm/mach-s3c64xx/irq.c                      |   25 ------
 arch/arm/plat-s5p/Kconfig                        |    1 -
 arch/arm/plat-s5p/dev-uart.c                     |   84 +++----------------
 arch/arm/plat-s5p/include/plat/irqs.h            |   35 --------
 arch/arm/plat-s5p/irq.c                          |   34 --------
 arch/arm/plat-samsung/Kconfig                    |    5 -
 arch/arm/plat-samsung/Makefile                   |    1 -
 arch/arm/plat-samsung/include/plat/regs-serial.h |    5 +
 arch/arm/plat-samsung/irq-uart.c                 |   96 ----------------------
 12 files changed, 25 insertions(+), 352 deletions(-)
 delete mode 100644 arch/arm/plat-samsung/irq-uart.c

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 5ebc5d9..325d2f5 100644
--- a/arch/arm/Kconfig
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 35/79] hsu: add runtime pm support

From: Kristen Carlson Accardi <kristen <at> linux.intel.com>

Doesn't appear to be much to do here, however having the suspend/resume
functions will allow the d3/d0 transitions to be sent by the pci core.

Signed-off-by: Kristen Carlson Accardi <kristen <at> linux.intel.com>
Signed-off-by: Alan Cox <alan <at> linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/serial/mfd.c |   47 ++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 47 insertions(+), 0 deletions(-)

diff --git a/drivers/tty/serial/mfd.c b/drivers/tty/serial/mfd.c
index cab52f4..cfa7501 100644
--- a/drivers/tty/serial/mfd.c
+++ b/drivers/tty/serial/mfd.c
 <at>  <at>  -38,6 +38,7  <at>  <at> 
 #include <linux/pci.h>
 #include <linux/io.h>
 #include <linux/debugfs.h>
+#include <linux/pm_runtime.h>

 #define HSU_DMA_BUF_SIZE	2048

 <at>  <at>  -764,6 +765,8  <at>  <at>  static int serial_hsu_startup(struct uart_port *port)
 		container_of(port, struct uart_hsu_port, port);
 	unsigned long flags;

+	pm_runtime_get_sync(up->dev);
+
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 33/79] TTY: use tty_wait_until_sent_from_close in tty_port_close_start

From: Jiri Slaby <jslaby <at> suse.cz>

Let's use the newly added helper to avoid stalls in drivers which are
already ported to tty_port helpers.

We have to ensure here, that there is no user of tty_port_close_start
and tty_port_close which holds port->mutex (or other) lock over them.
And sure, there is none.

Signed-off-by: Jiri Slaby <jslaby <at> suse.cz>
Acked-by: Arnd Bergmann <arnd <at> arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/tty_port.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/tty/tty_port.c b/drivers/tty/tty_port.c
index 33d37d2..ef9dd62 100644
--- a/drivers/tty/tty_port.c
+++ b/drivers/tty/tty_port.c
 <at>  <at>  -350,7 +350,7  <at>  <at>  int tty_port_close_start(struct tty_port *port,
 		tty_driver_flush_buffer(tty);
 	if (test_bit(ASYNCB_INITIALIZED, &port->flags) &&
 			port->closing_wait != ASYNC_CLOSING_WAIT_NONE)
-		tty_wait_until_sent(tty, port->closing_wait);
+		tty_wait_until_sent_from_close(tty, port->closing_wait);
 	if (port->drain_delay) {
 		unsigned int bps = tty_get_baud_rate(tty);
 		long timeout;
--

-- 
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 34/79] TTY: use tty_wait_until_sent_from_close in other drivers

From: Jiri Slaby <jslaby <at> suse.cz>

Let's use the newly added helper to avoid stalls in drivers which are
not yet ported to tty_port helpers.

Those which are broken (call tty_wait_until_sent with irqs disabled)
are left untouched. They are in a deeper trouble than we are trying to
solve here. This includes amiserial, 68328serial, 68360serial and
crisv10.

Signed-off-by: Jiri Slaby <jslaby <at> suse.cz>
Acked-by: Arnd Bergmann <arnd <at> arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/isdn/i4l/isdn_tty.c      |    2 +-
 drivers/tty/hvc/hvc_console.c    |    2 +-
 drivers/tty/hvc/hvcs.c           |    2 +-
 drivers/tty/serial/serial_core.c |    3 ++-
 net/irda/ircomm/ircomm_tty.c     |    2 +-
 5 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c
index d850427..e5546cb 100644
--- a/drivers/isdn/i4l/isdn_tty.c
+++ b/drivers/isdn/i4l/isdn_tty.c
 <at>  <at>  -1693,7 +1693,7  <at>  <at>  isdn_tty_close(struct tty_struct *tty, struct file *filp)
 	 * line status register.
 	 */
 	if (info->flags & ISDN_ASYNC_INITIALIZED) {
-		tty_wait_until_sent(tty, 3000);	/* 30 seconds timeout */
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 25/79] atmel_serial: RS485: receiving enabled when sending data

From: Bernhard Roth <br <at> pwrnet.de>

By default the atmel_serial driver in RS485 mode disables receiving data until
all data in the send buffer has been sent. This flag allows to receive data
even whilst sending data.

Signed-off-by: Bernhard Roth <br <at> pwrnet.de>
Signed-off-by: Claudio Scordino <claudio <at> evidence.eu.com>
Acked-by: Alan Cox <alan <at> linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 Documentation/serial/serial-rs485.txt |    3 +++
 drivers/tty/serial/atmel_serial.c     |    9 ++++++---
 include/linux/serial.h                |    1 +
 3 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/Documentation/serial/serial-rs485.txt b/Documentation/serial/serial-rs485.txt
index a493238..c8878f8 100644
--- a/Documentation/serial/serial-rs485.txt
+++ b/Documentation/serial/serial-rs485.txt
 <at>  <at>  -104,6 +104,9  <at>  <at> 
 	rs485conf.flags |= SER_RS485_RTS_AFTER_SEND;
 	rs485conf.delay_rts_after_send = ...;

+	/* Set this flag if you want to receive data even whilst sending data */
+	rs485conf.flags |= SER_RS485_RX_DURING_TX;
+
 	if (ioctl (fd, TIOCSRS485, &rs485conf) < 0) {
 		/* Error handling. See errno. */
 	}
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 23/79] Revert "tty: serial8250: add helpers for the DesignWare 8250"

This reverts commit 6b1a98d1c4851235d9b6764b3f7b7db7909fc760.

It causes a build error that needs to be resolved differently.

Cc: Alan Cox <alan <at> linux.intel.com>
Cc: Arnd Bergmann <arnd <at> arndb.de>
Cc: Jamie Iles <jamie <at> jamieiles.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/serial/8250_dw.c |   99 ------------------------------------------
 drivers/tty/serial/Kconfig   |    7 ---
 drivers/tty/serial/Makefile  |    1 -
 include/linux/serial_8250.h  |    8 ---
 4 files changed, 0 insertions(+), 115 deletions(-)
 delete mode 100644 drivers/tty/serial/8250_dw.c

diff --git a/drivers/tty/serial/8250_dw.c b/drivers/tty/serial/8250_dw.c
deleted file mode 100644
index e25782a..0000000
--- a/drivers/tty/serial/8250_dw.c
+++ /dev/null
 <at>  <at>  -1,99 +0,0  <at>  <at> 
-/*
- * Synopsys DesignWare specific 8250 operations.
- *
- * Copyright 2011 Picochip, Jamie Iles.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 22/79] Revert "tty: of_serial: add support for the DesignWare 8250"

This reverts commit 14a8d47d4e9f51372996914c16bdbf1c34e209b5.

It causes a build error that needs to be resolved differently.

Cc: Alan Cox <alan <at> linux.intel.com>
Cc: Arnd Bergmann <arnd <at> arndb.de>
Cc: Jamie Iles <jamie <at> jamieiles.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 .../devicetree/bindings/tty/serial/of-serial.txt   |    1 -
 drivers/tty/serial/of_serial.c                     |    7 -------
 2 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/Documentation/devicetree/bindings/tty/serial/of-serial.txt b/Documentation/devicetree/bindings/tty/serial/of-serial.txt
index b7ceaaa..b8b27b0 100644
--- a/Documentation/devicetree/bindings/tty/serial/of-serial.txt
+++ b/Documentation/devicetree/bindings/tty/serial/of-serial.txt
 <at>  <at>  -3,7 +3,6  <at>  <at> 
 Required properties:
 - compatible : one of:
 	- "ns8250"
-	- "ns8250dw"
 	- "ns16450"
 	- "ns16550a"
 	- "ns16550"
diff --git a/drivers/tty/serial/of_serial.c b/drivers/tty/serial/of_serial.c
index 024926c..e58cece 100644
--- a/drivers/tty/serial/of_serial.c
+++ b/drivers/tty/serial/of_serial.c
 <at>  <at>  -78,12 +78,6  <at>  <at>  static int __devinit of_platform_serial_setup(struct platform_device *ofdev,
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 43/79] tty: 8250: export serial8250_handle_irq

From: Jamie Iles <jamie <at> jamieiles.com>

Allow modules to use the normal 8250 irq handler inside their own.

Cc: Arnd Bergmann <arnd <at> arndb.de>
Signed-off-by: Jamie Iles <jamie <at> jamieiles.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/serial/8250.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/tty/serial/8250.c b/drivers/tty/serial/8250.c
index 6f594d2..435ce14 100644
--- a/drivers/tty/serial/8250.c
+++ b/drivers/tty/serial/8250.c
 <at>  <at>  -1588,6 +1588,7  <at>  <at>  int serial8250_handle_irq(struct uart_port *port, unsigned int iir)

 	return 0;
 }
+EXPORT_SYMBOL_GPL(serial8250_handle_irq);

 static int serial8250_default_handle_irq(struct uart_port *port)
 {
--

-- 
1.7.7

--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 21/79] tty: of_serial: add support for the DesignWare 8250

From: Jamie Iles <jamie <at> jamieiles.com>

Support the DesignWare 8250 by a new compatible string and registering
the DesignWare helpers.  If the registration of the helpers fails, then
continue as a normal 8250 as we may still get some useful debug out.

Cc: Alan Cox <alan <at> linux.intel.com>
Cc: Arnd Bergmann <arnd <at> arndb.de>
Signed-off-by: Jamie Iles <jamie <at> jamieiles.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 .../devicetree/bindings/tty/serial/of-serial.txt   |    1 +
 drivers/tty/serial/of_serial.c                     |    7 +++++++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/Documentation/devicetree/bindings/tty/serial/of-serial.txt b/Documentation/devicetree/bindings/tty/serial/of-serial.txt
index b8b27b0..b7ceaaa 100644
--- a/Documentation/devicetree/bindings/tty/serial/of-serial.txt
+++ b/Documentation/devicetree/bindings/tty/serial/of-serial.txt
 <at>  <at>  -3,6 +3,7  <at>  <at> 
 Required properties:
 - compatible : one of:
 	- "ns8250"
+	- "ns8250dw"
 	- "ns16450"
 	- "ns16550a"
 	- "ns16550"
diff --git a/drivers/tty/serial/of_serial.c b/drivers/tty/serial/of_serial.c
index e58cece..024926c 100644
--- a/drivers/tty/serial/of_serial.c
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 42/79] tty/powerpc: fix build break with ehv_bytechan.c on allyesconfig

From: Timur Tabi <timur <at> freescale.com>

The ePAPR hypervisor byte channel driver is supposed to work on all
ePAPR-compliant embedded PowerPC systems, but it had a reference to the MSR_GS
bit, which is available only on Book-E systems.

Also fix a couple integer-to-pointer typecast problems.

Reported-by: Stephen Rothwell <sfr <at> canb.auug.org.au>
Signed-off-by: Timur Tabi <timur <at> freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/ehv_bytechan.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/tty/ehv_bytechan.c b/drivers/tty/ehv_bytechan.c
index e67f70b..f733718 100644
--- a/drivers/tty/ehv_bytechan.c
+++ b/drivers/tty/ehv_bytechan.c
 <at>  <at>  -226,10 +226,6  <at>  <at>  void __init udbg_init_ehv_bc(void)
 	unsigned int rx_count, tx_count;
 	unsigned int ret;

-	/* Check if we're running as a guest of a hypervisor */
-	if (!(mfmsr() & MSR_GS))
-		return;
-
 	/* Verify the byte channel handle */
 	ret = ev_byte_channel_poll(CONFIG_PPC_EARLY_DEBUG_EHV_BC_HANDLE,
 				   &rx_count, &tx_count);
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 39/79] x86/mrst: Add platform data for Max3110 devices

From: Feng Tang <feng.tang <at> intel.com>

Those info will be used when spi controller driver setup
max3110 as a slave device

Signed-off-by: Feng Tang <feng.tang <at> intel.com>
Signed-off-by: Alan Cox <alan <at> linux.intel.com>
Signed-off-by: Dirk Brandewie <dirk.brandewie <at> gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 arch/x86/platform/mrst/mrst.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/x86/platform/mrst/mrst.c b/arch/x86/platform/mrst/mrst.c
index 7000e74..b8da1b9 100644
--- a/arch/x86/platform/mrst/mrst.c
+++ b/arch/x86/platform/mrst/mrst.c
 <at>  <at>  -14,6 +14,8  <at>  <at> 

 #include <linux/init.h>
 #include <linux/kernel.h>
+#include <linux/interrupt.h>
+#include <linux/scatterlist.h>
 #include <linux/sfi.h>
 #include <linux/intel_pmic_gpio.h>
 #include <linux/spi/spi.h>
 <at>  <at>  -392,6 +394,7  <at>  <at>  static void __init *max3111_platform_data(void *info)
 	struct spi_board_info *spi_info = info;
 	int intr = get_gpio_by_name("max3111_int");

(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 30/79] TTY: serial, use ASYNCB_CLOSING in uart_close

From: Jiri Slaby <jslaby <at> suse.cz>

We need to move port->mutex locking after wait_until_sent in
uart_close (for rationale see next patches). But if we did it now, we
would introduce a race between close and open. This is exactly why
port->mutex is locked at the top of uart_close.

To avoid the race, we add ASYNCB_CLOSING to uart_close. Like every
other sane TTY driver. Thanks to tty_port_block_til_ready used in
uart_open we will have this for free. Then we can move the port->mutex
lock.

Also note that this will make the conversion to tty_port helpers
easier. They are currently handling ASYNC_CLOSING flag correctly.

Signed-off-by: Jiri Slaby <jslaby <at> suse.cz>
Acked-by: Arnd Bergmann <arnd <at> arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/serial/serial_core.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
index 3844980..849bd0d 100644
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
 <at>  <at>  -1288,6 +1288,7  <at>  <at>  static void uart_close(struct tty_struct *tty, struct file *filp)
 	 * the line discipline to only process XON/XOFF characters by
 	 * setting tty->closing.
 	 */
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 20/79] tty: serial8250: add helpers for the DesignWare 8250

From: Jamie Iles <jamie <at> jamieiles.com>

The Synopsys DesignWare 8250 is an 8250 that has an extra interrupt that
gets raised when writing to the LCR when busy.  To handle this we need
special serial_out, serial_in and handle_irq methods.  Add a new
function serial8250_use_designware_io() that configures a uart_port with
these accessors.

Cc: Alan Cox <alan <at> linux.intel.com>
Acked-by: Arnd Bergmann <arnd <at> arndb.de>
Signed-off-by: Jamie Iles <jamie <at> jamieiles.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/serial/8250_dw.c |   99 ++++++++++++++++++++++++++++++++++++++++++
 drivers/tty/serial/Kconfig   |    7 +++
 drivers/tty/serial/Makefile  |    1 +
 include/linux/serial_8250.h  |    8 +++
 4 files changed, 115 insertions(+), 0 deletions(-)
 create mode 100644 drivers/tty/serial/8250_dw.c

diff --git a/drivers/tty/serial/8250_dw.c b/drivers/tty/serial/8250_dw.c
new file mode 100644
index 0000000..e25782a
--- /dev/null
+++ b/drivers/tty/serial/8250_dw.c
 <at>  <at>  -0,0 +1,99  <at>  <at> 
+/*
+ * Synopsys DesignWare specific 8250 operations.
+ *
+ * Copyright 2011 Picochip, Jamie Iles.
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 29/79] jsm: print byte we are dequeing

From: Thadeu Lima de Souza Cascardo <cascardo <at> linux.vnet.ibm.com>

Instead of printing the head of the buffer, we should print the tail,
which is the byte we are sending to the device.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo <at> linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/serial/jsm/jsm_neo.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/tty/serial/jsm/jsm_neo.c b/drivers/tty/serial/jsm/jsm_neo.c
index bd6e846..81dfafa 100644
--- a/drivers/tty/serial/jsm/jsm_neo.c
+++ b/drivers/tty/serial/jsm/jsm_neo.c
 <at>  <at>  -522,7 +522,7  <at>  <at>  static void neo_copy_data_from_queue_to_uart(struct jsm_channel *ch)

 			writeb(circ->buf[circ->tail], &ch->ch_neo_uart->txrx);
 			jsm_printk(WRITE, INFO, &ch->ch_bd->pci_dev,
-					"Tx data: %x\n", circ->buf[circ->head]);
+					"Tx data: %x\n", circ->buf[circ->tail]);
 			circ->tail = (circ->tail + 1) & (UART_XMIT_SIZE - 1);
 			ch->ch_txcount++;
 		}
--

-- 
1.7.7

--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo <at> vger.kernel.org
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 44/79] tty: add a DesignWare 8250 driver

From: Jamie Iles <jamie <at> jamieiles.com>

The Synopsys DesignWare 8250 is an 8250 that has an extra interrupt that
gets raised when writing to the LCR when busy.  To handle this we need
special serial_out, serial_in and handle_irq methods.  Add a new
platform driver that uses these accessors.

Cc: Alan Cox <alan <at> linux.intel.com>
Cc: Arnd Bergmann <arnd <at> arndb.de>
Signed-off-by: Jamie Iles <jamie <at> jamieiles.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 .../bindings/tty/serial/snps-dw-apb-uart.txt       |   25 +++
 drivers/tty/serial/8250_dw.c                       |  194 ++++++++++++++++++++
 drivers/tty/serial/Kconfig                         |    7 +
 drivers/tty/serial/Makefile                        |    1 +
 4 files changed, 227 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/tty/serial/snps-dw-apb-uart.txt
 create mode 100644 drivers/tty/serial/8250_dw.c

diff --git a/Documentation/devicetree/bindings/tty/serial/snps-dw-apb-uart.txt b/Documentation/devicetree/bindings/tty/serial/snps-dw-apb-uart.txt
new file mode 100644
index 0000000..f13f1c5
--- /dev/null
+++ b/Documentation/devicetree/bindings/tty/serial/snps-dw-apb-uart.txt
 <at>  <at>  -0,0 +1,25  <at>  <at> 
+* Synopsys DesignWare ABP UART
+
+Required properties:
+- compatible : "snps,dw-apb-uart"
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 37/79] n_gsm: Send CLD command on exit

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

A DISC on DLCI 0 should close down the mux but Michael Lauer reports this
is not the case for some modems. Send a CLD as well.

Signed-off-by: Alan Cox <alan <at> linux.intel.com>
Tested-by: Michael Lauer
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/n_gsm.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
index ed42908..8d7766b 100644
--- a/drivers/tty/n_gsm.c
+++ b/drivers/tty/n_gsm.c
 <at>  <at>  -2003,6 +2003,7  <at>  <at>  void gsm_cleanup_mux(struct gsm_mux *gsm)
 	int i;
 	struct gsm_dlci *dlci = gsm->dlci[0];
 	struct gsm_msg *txq;
+	struct gsm_control *gc;

 	gsm->dead = 1;

 <at>  <at>  -2016,6 +2017,13  <at>  <at>  void gsm_cleanup_mux(struct gsm_mux *gsm)
 	spin_unlock(&gsm_mux_lock);
 	WARN_ON(i == MAX_MUX);

+	/* In theory disconnecting DLCI 0 is sufficient but for some
+	   modems this is apparently not the case. */
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 32/79] TTY: define tty_wait_until_sent_from_close

From: Jiri Slaby <jslaby <at> suse.cz>

We need this helper to fix system stalls. The issue is that the rest
of the system TTYs wait for us to finish waiting. This wasn't an issue
with BKL. BKL used to unlock implicitly.

This is based on the Arnd suggestion.

Signed-off-by: Jiri Slaby <jslaby <at> suse.cz>
Acked-by: Arnd Bergmann <arnd <at> arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 include/linux/tty.h |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/include/linux/tty.h b/include/linux/tty.h
index 6d5eceb..0ad6888 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
 <at>  <at>  -602,6 +602,24  <at>  <at>  extern void __lockfunc tty_lock(void) __acquires(tty_lock);
 extern void __lockfunc tty_unlock(void) __releases(tty_lock);

 /*
+ * this shall be called only from where BTM is held (like close)
+ *
+ * We need this to ensure nobody waits for us to finish while we are waiting.
+ * Without this we were encountering system stalls.
+ *
+ * This should be indeed removed with BTM removal later.
+ *
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 38/79] max3110: wake up fixes

From: Dirk Brandewie <dirk.brandewie <at> gmail.com>

The main thread is waiting on on a wait_queue but wake_up_process() is
used to wake the thread. This reads weirdly. Change wake_up_process() to
wake_up().

Tested on the Moorestown tablet build

Signed-off-by: Dirk Brandewie <dirk.brandewie <at> gmail.com>
Signed-off-by: Alan Cox <alan <at> linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/serial/mrst_max3110.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/tty/serial/mrst_max3110.c b/drivers/tty/serial/mrst_max3110.c
index a764bf9..c8f9868 100644
--- a/drivers/tty/serial/mrst_max3110.c
+++ b/drivers/tty/serial/mrst_max3110.c
 <at>  <at>  -207,7 +207,7  <at>  <at>  static void serial_m3110_con_write(struct console *co,
 	uart_console_write(&pmax->port, s, count, serial_m3110_con_putchar);

 	if (!test_and_set_bit(CON_TX_NEEDED, &pmax->uart_flags))
-		wake_up_process(pmax->main_thread);
+		wake_up(&pmax->wq);
 }

 static int __init
 <at>  <at>  -301,6 +301,7  <at>  <at>  static void send_circ_buf(struct uart_max3110 *max,
 			}
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 36/79] n_gsm: update TODO list

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

This is now out of date so fix it

Signed-off-by: Alan Cox <alan <at> linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/n_gsm.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
index 8a50e4e..ed42908 100644
--- a/drivers/tty/n_gsm.c
+++ b/drivers/tty/n_gsm.c
 <at>  <at>  -21,7 +21,6  <at>  <at> 
  *	Mostly done:	ioctls for setting modes/timing
  *	Partly done:	hooks so you can pull off frames to non tty devs
  *	Restart DLCI 0 when it closes ?
- *	Test basic encoding
  *	Improve the tx engine
  *	Resolve tx side locking by adding a queue_head and routing
  *		all control traffic via it
--

-- 
1.7.7

--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 26/79] tty: Add support serial for EXYNOS4212 SoC

From: Kukjin Kim <kgene.kim <at> samsung.com>

According to add support EXYNOS4212 SoC, we need to enable
SERIAL_S5PV210 on EXYNOS4212.

Cc: Alan Cox <alan <at> lxorguk.ukuu.org.uk>
Cc: Greg Kroah-Hartman <gregkh <at> suse.de>
Signed-off-by: Kukjin Kim <kgene.kim <at> samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/serial/Kconfig |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
index a9b307f..10babe2 100644
--- a/drivers/tty/serial/Kconfig
+++ b/drivers/tty/serial/Kconfig
 <at>  <at>  -522,8 +522,8  <at>  <at>  config SERIAL_S3C6400

 config SERIAL_S5PV210
 	tristate "Samsung S5PV210 Serial port support"
-	depends on SERIAL_SAMSUNG && (CPU_S5PV210 || CPU_EXYNOS4210)
-	select SERIAL_SAMSUNG_UARTS_4 if (CPU_S5PV210 || CPU_EXYNOS4210)
+	depends on SERIAL_SAMSUNG && (CPU_S5PV210 || CPU_EXYNOS4210 || SOC_EXYNOS4212)
+	select SERIAL_SAMSUNG_UARTS_4 if (CPU_S5PV210 || CPU_EXYNOS4210 || SOC_EXYNOS4212)
 	default y
 	help
 	  Serial port support for Samsung's S5P Family of SoC's
--

-- 
1.7.7
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 31/79] TTY: serial, move locking in uart_close

From: Jiri Slaby <jslaby <at> suse.cz>

So now, when we handle CLOSING flag, there is no point to hold
port->mutex over the start of uart_close.

Yes, there are still several things to reason about:
* port->count etc is and always was protected by a spinlock
* ->stop_rx is protected by a spinlock. Otherwise it would
  race with interrupts.
* uart_wait_until_sent -- that one is already called without
  port->mutex from set_termios and tty_set_ldisc. Should anything
  be protected there, it would be tx_empty. And by a spinlock.
  8250 does this internally...

This step is needed to fix system stalls. To not create an AB-BA lock
dependency (see next patches).

Signed-off-by: Jiri Slaby <jslaby <at> suse.cz>
Acked-by: Arnd Bergmann <arnd <at> arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/serial/serial_core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
index 849bd0d..0464360 100644
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
 <at>  <at>  -1253,7 +1253,6  <at>  <at>  static void uart_close(struct tty_struct *tty, struct file *filp)

(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 49/79] cris: fix a build error in drivers/tty/serial/crisv10.c

From: WANG Cong <xiyou.wangcong <at> gmail.com>

This patch fixes the following build error:

drivers/tty/serial/crisv10.c:4453: error: 'if_ser0' undeclared (first use in this function): 2
errors in 2 logs
        v3.1-rc4/cris/cris-allmodconfig v3.1-rc4/cris/cris-allyesconfig
drivers/tty/serial/crisv10.c:4453: error: (Each undeclared identifier is reported only once: 2
errors in 2 logs
        v3.1-rc4/cris/cris-allmodconfig v3.1-rc4/cris/cris-allyesconfig
drivers/tty/serial/crisv10.c:4453: error: for each function it appears in.): 2 errors in 2 logs
        v3.1-rc4/cris/cris-allmodconfig v3.1-rc4/cris/cris-allyesconfig

"if_ser0" is a typo, it should be "if_serial_0".

Cc: Mikael Starvik <starvik <at> axis.com>
Cc: Jesper Nilsson <jesper.nilsson <at> axis.com>
Signed-off-by: WANG Cong <xiyou.wangcong <at> gmail.com>
Cc: stable <stable <at> kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/serial/crisv10.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/crisv10.c b/drivers/tty/serial/crisv10.c
index 225123b..58be715 100644
--- a/drivers/tty/serial/crisv10.c
+++ b/drivers/tty/serial/crisv10.c
 <at>  <at>  -4450,7 +4450,7  <at>  <at>  static int __init rs_init(void)

(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 45/79] serial: pxa: work around for errata #20

From: Marcus Folkesson <marcus.folkesson <at> gmail.com>

Errata E20: UART: Character Timeout interrupt remains set under certain
software conditions.

Implication: The software servicing the UART can be trapped in an infinite loop.

Signed-off-by: Marcus Folkesson <marcus.folkesson <at> gmail.com>
Cc: stable <stable <at> kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/serial/pxa.c |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/drivers/tty/serial/pxa.c b/drivers/tty/serial/pxa.c
index 531931c..5c8e3bb 100644
--- a/drivers/tty/serial/pxa.c
+++ b/drivers/tty/serial/pxa.c
 <at>  <at>  -100,6 +100,16  <at>  <at>  static inline void receive_chars(struct uart_pxa_port *up, int *status)
 	int max_count = 256;

 	do {
+		/* work around Errata #20 according to
+		 * Intel(R) PXA27x Processor Family
+		 * Specification Update (May 2005)
+		 *
+		 * Step 2
+		 * Disable the Reciever Time Out Interrupt via IER[RTOEI]
+		 */
+		up->ier &= ~UART_IER_RTOIE;
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 47/79] TTY: serial, remove dead code from 68328

From: Jiri Slaby <jslaby <at> suse.cz>

The code is dead at least since 2002. So remove it to not distort git
grep output (about port.tty usage).

Remove the whole do_softirq tasklet as it's noop now.

Signed-off-by: Jiri Slaby <jslaby <at> suse.cz>
Cc: Geert Uytterhoeven <geert <at> linux-m68k.org>
Cc: Alan Cox <alan <at> linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/serial/68328serial.c |   35 -----------------------------------
 drivers/tty/serial/68328serial.h |    1 -
 2 files changed, 0 insertions(+), 36 deletions(-)

diff --git a/drivers/tty/serial/68328serial.c b/drivers/tty/serial/68328serial.c
index e0a7754..f549231 100644
--- a/drivers/tty/serial/68328serial.c
+++ b/drivers/tty/serial/68328serial.c
 <at>  <at>  -235,22 +235,6  <at>  <at>  static void batten_down_hatches(void)

 static void status_handle(struct m68k_serial *info, unsigned short status)
 {
-#if 0
-	if(status & DCD) {
-		if((info->port.tty->termios->c_cflag & CRTSCTS) &&
-		   ((info->curregs[3] & AUTO_ENAB)==0)) {
-			info->curregs[3] |= AUTO_ENAB;
-			info->pendregs[3] |= AUTO_ENAB;
(Continue reading)

Geert Uytterhoeven | 26 Oct 2011 14:26

Re: [PATCH 47/79] TTY: serial, remove dead code from 68328

m68knommu => Greg

On Wed, Oct 26, 2011 at 14:12, Greg Kroah-Hartman <gregkh <at> suse.de> wrote:
> From: Jiri Slaby <jslaby <at> suse.cz>
>
> The code is dead at least since 2002. So remove it to not distort git
> grep output (about port.tty usage).
>
> Remove the whole do_softirq tasklet as it's noop now.
>
> Signed-off-by: Jiri Slaby <jslaby <at> suse.cz>
> Cc: Geert Uytterhoeven <geert <at> linux-m68k.org>
> Cc: Alan Cox <alan <at> linux.intel.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
> ---
>  drivers/tty/serial/68328serial.c |   35 -----------------------------------
>  drivers/tty/serial/68328serial.h |    1 -
>  2 files changed, 0 insertions(+), 36 deletions(-)
>
> diff --git a/drivers/tty/serial/68328serial.c b/drivers/tty/serial/68328serial.c
> index e0a7754..f549231 100644
> --- a/drivers/tty/serial/68328serial.c
> +++ b/drivers/tty/serial/68328serial.c
>  <at>  <at>  -235,22 +235,6  <at>  <at>  static void batten_down_hatches(void)
>
>  static void status_handle(struct m68k_serial *info, unsigned short status)
>  {
> -#if 0
> -       if(status & DCD) {
> -               if((info->port.tty->termios->c_cflag & CRTSCTS) &&
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 53/79] keyboard: Do not include <linux/irq.>

From: Geert Uytterhoeven <geert <at> linux-m68k.org>

The top of <linux/irq.h> has this comment:

 * Please do not include this file in generic code.  There is currently
 * no requirement for any architecture to implement anything held
 * within this file.
 *
 * Thanks. --rmk

Remove inclusion of <linux/irq.>, to prevent the following compile error
from happening soon:

| include/linux/irq.h:132: error: redefinition of ‘struct irq_data’
| include/linux/irq.h:286: error: redefinition of ‘struct irq_chip’

drivers/tty/vt/keyboard.c needs to include <asm/irq_regs.h> for get_irq_regs():

| drivers/tty/vt/keyboard.c:497: error: implicit declaration of function ‘get_irq_regs’
| drivers/tty/vt/keyboard.c:497: warning: initialization makes pointer from integer without a cast

Signed-off-by: Geert Uytterhoeven <geert <at> linux-m68k.org>
Acked-by: Thomas Gleixner <tglx <at> linutronix.de>
Cc: Greg Kroah-Hartman <gregkh <at> suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/vt/keyboard.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/tty/vt/keyboard.c b/drivers/tty/vt/keyboard.c
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 51/79] cris: lower the printk level in cris serial driver

From: WANG Cong <xiyou.wangcong <at> gmail.com>

KERN_CRIT is too high, replace those KERN_CRIT with KERN_ERR or KERN_WARNING.

Cc: Geert Uytterhoeven <geert <at> linux-m68k.org>
Cc: Mikael Starvik <starvik <at> axis.com>
Cc: Jesper Nilsson <jesper.nilsson <at> axis.com>
Signed-off-by: WANG Cong <xiyou.wangcong <at> gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/serial/crisv10.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/tty/serial/crisv10.c b/drivers/tty/serial/crisv10.c
index 58be715..a931524 100644
--- a/drivers/tty/serial/crisv10.c
+++ b/drivers/tty/serial/crisv10.c
 <at>  <at>  -1788,7 +1788,7  <at>  <at>  static unsigned int handle_descr_data(struct e100_serial *info,
 	struct etrax_recv_buffer *buffer = phys_to_virt(descr->buf) - sizeof *buffer;

 	if (info->recv_cnt + recvl > 65536) {
-		printk(KERN_CRIT
+		printk(KERN_WARNING
 		       "%s: Too much pending incoming serial data! Dropping %u bytes.\n", __func__, recvl);
 		return 0;
 	}
 <at>  <at>  -3813,13 +3813,13  <at>  <at>  rs_close(struct tty_struct *tty, struct file * filp)
 		 * one, we've got real problems, since it means the
 		 * serial port won't be shutdown.
 		 */
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:13
Picon

[PATCH 60/79] tty/n_gsm: fix a bug in gsm_dlci_data_output (adaption = 2 case)

From: Mikhail Kshevetskiy <mikhail.kshevetskiy <at> gmail.com>

in adaption=2 case we should put 1 or 2 byte with modem status bits
at the beginning of a buffer pointed by "dp". n_gsm use 1 byte case,
so it allocate a buffer of len + 1 size. As result we should:
  * put 1 byte of modem status bits
  * increase data pointer
  * put "len" bytes of data
but actually we have:
  * increase first byte with the value of modem status bits
  * decrease "len"
  * put orig_len - 1 bytes of data starting from the buffer beggining
This is evidently wrong.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy <at> gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/n_gsm.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
index da3b31a..14c26cd 100644
--- a/drivers/tty/n_gsm.c
+++ b/drivers/tty/n_gsm.c
 <at>  <at>  -833,8 +833,7  <at>  <at>  static int gsm_dlci_data_output(struct gsm_mux *gsm, struct gsm_dlci *dlci)
 		break;
 	case 2:	/* Unstructed with modem bits. Always one byte as we never
 		   send inline break data */
-		*dp += gsm_encode_modem(dlci);
-		len--;
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:13
Picon

[PATCH 61/79] tty/n_gsm: avoid fifo overflow in gsm_dlci_data_output

From: Mikhail Kshevetskiy <mikhail.kshevetskiy <at> gmail.com>

n_gsm use a simple approach: every writing to fifo correspond exactly one
reading from fifo. There are no problem in this approach until we read
less bytes then we write. As result fifo may owerflow. This leads to packet
loss and very slow responce.

For example, this happens with ping packets (about 96 byte each) and default
gsm->mtu = 64. As result we get 50 sec ping timeout and 20% packet loss.

Fix the problem by reading and sending all data from the fifo

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy <at> gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/n_gsm.c |   52 +++++++++++++++++++++++++++-----------------------
 1 files changed, 28 insertions(+), 24 deletions(-)

diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
index 14c26cd..4cb0d0a 100644
--- a/drivers/tty/n_gsm.c
+++ b/drivers/tty/n_gsm.c
 <at>  <at>  -809,37 +809,41  <at>  <at>  static int gsm_dlci_data_output(struct gsm_mux *gsm, struct gsm_dlci *dlci)
 {
 	struct gsm_msg *msg;
 	u8 *dp;
-	int len, size;
+	int len, total_size, size;
 	int h = dlci->adaption - 1;

(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 46/79] TTY: serial: Move mutex_unlock in uart_close function

From: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj <at> renesas.com>

When mutex_lock is not called, mutex_unlock is sometimes called.
This deletes unnecessary goto and makes modifications so that
mutex_unlock is called.

[    8.304000] WARNING: at kernel/muex-debug.c:78
[    8.304000] Modules linked in:
[    8.304000]
[    8.304000] Pid : 114, Comm:                 modprobe
[    8.304000] CPU : 0                  Not tainted  (3.1.0-rc3-next-20110826 #810)
[    8.304000]
[    8.304000] PC is at debug_mutex_unlock+0xf4/0x120
[    8.304000] PR is at debug_mutex_unlock+0xe6/0x120
[    8.304000] PC  : 80051114 SP  : 9f02de58 SR  : 400081f1 TEA : 295cf4f2
[    8.304000] R0  : 00000001 R1  : 00000000 R2  : 0000000f R3  : 00000000
[    8.304000] R4  : 9fc63158 R5  : 00000000 R6  : 00000001 R7  : 9fe1de78
[    8.304000] R8  : 805c6b2c R9  : 80003920 R10 : 00000000 R11 : 805c6b2c
[    8.304000] R12 : 80425ca0 R13 : 00000000 R14 : 9f02de58
[    8.304000] MACH: 00000003 MACL: 00000000 GBR : 296e1678 PR  : 80051106
[    8.304000]
[    8.304000] Call trace:
[    8.304000]  [<804236c6>] __mutex_unlock_slowpath+0x46/0x120
[    8.304000]  [<804237aa>] mutex_unlock+0xa/0x20
[    8.304000]  [<80240ed6>] uart_close+0x76/0x2c0
[    8.304000]  [<80223b98>] tty_release+0xf8/0x5c0
[    8.304000]  [<800a93a6>] lookup_object+0x26/0xa0
[    8.304000]  [<80063f6a>] call_rcu+0x8a/0xc0
[    8.304000]  [<800a944a>] put_object+0x2a/0x60
[    8.304000]  [<80003920>] arch_local_irq_restore+0x0/0x40
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:13
Picon

[PATCH 63/79] hvc_console: display printk messages on console.

From: Miche Baker-Harvey <miche <at> google.com>

printk only works for "registered consoles."  Currently, the hvc_console
code calls register_console() from hvc_instantiate(), but that's only
used in the early console case.  In hvc_alloc(), register_console() was
not called.

Add a call to register_console() in hvc_alloc(), set up the index in
the hvc_console, and set up the necessary vtermnos[] and cons_op[]
entries so that printk functions work.

Signed-off-by: Miche Baker-Harvey <miche <at> google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/hvc/hvc_console.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/drivers/tty/hvc/hvc_console.c b/drivers/tty/hvc/hvc_console.c
index b6b2d18..7430bc3 100644
--- a/drivers/tty/hvc/hvc_console.c
+++ b/drivers/tty/hvc/hvc_console.c
 <at>  <at>  -852,7 +852,7  <at>  <at>  struct hvc_struct *hvc_alloc(uint32_t vtermno, int data,
 	 * find index to use:
 	 * see if this vterm id matches one registered for console.
 	 */
-	for (i=0; i < MAX_NR_HVC_CONSOLES; i++)
+	for (i = 0; i < MAX_NR_HVC_CONSOLES; i++)
 		if (vtermnos[i] == hp->vtermno &&
 		    cons_ops[i] == hp->ops)
 			break;
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:13
Picon

[PATCH 62/79] TTY: snyclinkmp: forever loop in tx_load_dma_buffer()

From: Dan Carpenter <dan.carpenter <at> oracle.com>

My main concern here was the line that said:
	copy_count = min_t(unsigned short,count,SCABUFSIZE);
"count" is an unsigned int here so the cast to unsigned short
truncates the upper bits.  So if count is 0x10000 then copy_count is
0 and the loop never exits.

"count" comes from skb->len in hdlcdev_xmit().

The other min_t() changes are just cleanups.

Signed-off-by: Dan Carpenter <dan.carpenter <at> oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/synclinkmp.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/tty/synclinkmp.c b/drivers/tty/synclinkmp.c
index c77831c..0f6b796 100644
--- a/drivers/tty/synclinkmp.c
+++ b/drivers/tty/synclinkmp.c
 <at>  <at>  -4950,7 +4950,7  <at>  <at>  CheckAgain:

 	if ( debug_level >= DEBUG_LEVEL_DATA )
 		trace_block(info,info->rx_buf_list_ex[StartIndex].virt_addr,
-			min_t(int, framesize,SCABUFSIZE),0);
+			min_t(unsigned int, framesize, SCABUFSIZE), 0);

 	if (framesize) {
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 54/79] serial: mfd: Initconst section fixes

From: Andi Kleen <ak <at> linux.intel.com>

Cc: gregkh <at> suse.de
Signed-off-by: Andi Kleen <ak <at> linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/serial/mfd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/tty/serial/mfd.c b/drivers/tty/serial/mfd.c
index cfa7501..286c386 100644
--- a/drivers/tty/serial/mfd.c
+++ b/drivers/tty/serial/mfd.c
 <at>  <at>  -1467,7 +1467,7  <at>  <at>  static void serial_hsu_remove(struct pci_dev *pdev)
 }

 /* First 3 are UART ports, and the 4th is the DMA */
-static const struct pci_device_id pci_ids[] __devinitdata = {
+static const struct pci_device_id pci_ids[] __devinitconst = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x081B) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x081C) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x081D) },
--

-- 
1.7.7

--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:13
Picon

[PATCH 56/79] TTY: irq: Remove IRQF_DISABLED

From: Yong Zhang <yong.zhang0 <at> gmail.com>

Since commit [e58aa3d2: genirq: Run irq handlers with interrupts disabled],
We run all interrupt handlers with interrupts disabled
and we even check and yell when an interrupt handler
returns with interrupts enabled (see commit [b738a50a:
genirq: Warn when handler enables interrupts]).

So now this flag is a NOOP and can be removed.

Signed-off-by: Yong Zhang <yong.zhang0 <at> gmail.com>
Acked-by: Tobias Klauser <tklauser <at> distanz.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/amiserial.c              |    2 +-
 drivers/tty/cyclades.c               |    2 +-
 drivers/tty/hvc/hvc_irq.c            |    2 +-
 drivers/tty/hvc/hvcs.c               |    2 +-
 drivers/tty/hvc/hvsi.c               |    2 +-
 drivers/tty/isicom.c                 |    2 +-
 drivers/tty/serial/68328serial.c     |    2 +-
 drivers/tty/serial/altera_jtaguart.c |    2 +-
 drivers/tty/serial/altera_uart.c     |    2 +-
 drivers/tty/serial/bfin_sport_uart.c |    2 +-
 drivers/tty/serial/bfin_uart.c       |    8 ++++----
 drivers/tty/serial/crisv10.c         |   18 +++++++++---------
 drivers/tty/serial/icom.c            |    2 +-
 drivers/tty/serial/lantiq.c          |    6 +++---
 drivers/tty/serial/mcf.c             |    2 +-
 drivers/tty/serial/mpc52xx_uart.c    |    2 +-
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 52/79] TTY: serial, move 68360 driver to staging

From: Jiri Slaby <jslaby <at> suse.cz>

This driver has been broken at least since 2008. At that time,
a88487c79b (Fix compile errors in SGI console drivers) broke this
driver completely.

And since nobody noticed for the past 3 years, move it into staging. I
think this will rot there and we will throw it away completely after
some time. Or maybe someone will volunteer to fix it ;).

Signed-off-by: Jiri Slaby <jslaby <at> suse.cz>
Cc: Geert Uytterhoeven <geert <at> linux-m68k.org>
Cc: Alan Cox <alan <at> linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/staging/Kconfig                       |    2 ++
 drivers/staging/Makefile                      |    1 +
 drivers/{tty => staging}/serial/68360serial.c |    0
 drivers/staging/serial/Kconfig                |   16 ++++++++++++++++
 drivers/staging/serial/Makefile               |    1 +
 drivers/staging/serial/TODO                   |    6 ++++++
 drivers/tty/serial/Kconfig                    |   17 -----------------
 drivers/tty/serial/Makefile                   |    1 -
 8 files changed, 26 insertions(+), 18 deletions(-)
 rename drivers/{tty => staging}/serial/68360serial.c (100%)
 create mode 100644 drivers/staging/serial/Kconfig
 create mode 100644 drivers/staging/serial/Makefile
 create mode 100644 drivers/staging/serial/TODO

diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig
(Continue reading)

Geert Uytterhoeven | 26 Oct 2011 14:27

Re: [PATCH 52/79] TTY: serial, move 68360 driver to staging

m68knommu => Greg

On Wed, Oct 26, 2011 at 14:12, Greg Kroah-Hartman <gregkh <at> suse.de> wrote:
> From: Jiri Slaby <jslaby <at> suse.cz>
>
> This driver has been broken at least since 2008. At that time,
> a88487c79b (Fix compile errors in SGI console drivers) broke this
> driver completely.
>
> And since nobody noticed for the past 3 years, move it into staging. I
> think this will rot there and we will throw it away completely after
> some time. Or maybe someone will volunteer to fix it ;).
>
> Signed-off-by: Jiri Slaby <jslaby <at> suse.cz>
> Cc: Geert Uytterhoeven <geert <at> linux-m68k.org>
> Cc: Alan Cox <alan <at> linux.intel.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
> ---
>  drivers/staging/Kconfig                       |    2 ++
>  drivers/staging/Makefile                      |    1 +
>  drivers/{tty => staging}/serial/68360serial.c |    0
>  drivers/staging/serial/Kconfig                |   16 ++++++++++++++++
>  drivers/staging/serial/Makefile               |    1 +
>  drivers/staging/serial/TODO                   |    6 ++++++
>  drivers/tty/serial/Kconfig                    |   17 -----------------
>  drivers/tty/serial/Makefile                   |    1 -
>  8 files changed, 26 insertions(+), 18 deletions(-)
>  rename drivers/{tty => staging}/serial/68360serial.c (100%)
>  create mode 100644 drivers/staging/serial/Kconfig
>  create mode 100644 drivers/staging/serial/Makefile
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 40/79] max3110: add sysrq support

From: Alexander Shishkin <alexander.shishkin <at> linux.intel.com>

This patch moves several occurences of similar code inside receive_chars(),
which now also takes care of checking for break and calling sysrq handling
code.

Signed-off-by: Alexander Shishkin <alexander.shishkin <at> linux.intel.com>
Signed-off-by: Alan Cox <alan <at> linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/serial/mrst_max3110.c |   99 ++++++++++++++++---------------------
 drivers/tty/serial/mrst_max3110.h |    1 +
 2 files changed, 44 insertions(+), 56 deletions(-)

diff --git a/drivers/tty/serial/mrst_max3110.c b/drivers/tty/serial/mrst_max3110.c
index c8f9868..42aa439 100644
--- a/drivers/tty/serial/mrst_max3110.c
+++ b/drivers/tty/serial/mrst_max3110.c
 <at>  <at>  -27,6 +27,10  <at>  <at> 
  *    interrupt for a low speed UART device
  */

+#ifdef CONFIG_MAGIC_SYSRQ
+#define SUPPORT_SYSRQ
+#endif
+
 #include <linux/module.h>
 #include <linux/ioport.h>
 #include <linux/irq.h>
 <at>  <at>  -73,9 +77,9  <at>  <at>  struct uart_max3110 {
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:13
Picon

[PATCH 55/79] serial-core: power up uart port early before we do set_termios when resuming

From: Ning Jiang <ning.jiang <at> marvell.com>

The following patch removed uart_change_pm() in uart_resume_port():

commit 5933a161abcb8d83a2c145177f48027c3c0a8995
Author: Yin Kangkai <kangkai.yin <at> linux.intel.com>
    serial-core: reset the console speed on resume

It will break the pxa serial driver when the system resumes from suspend mode
as it will try to set baud rate divider register in set_termios but with
clock off. The register value can not be set correctly on some platform if
the clock is disabled. The pxa driver will check the value and report the
following warning:

------------[ cut here ]------------
WARNING: at drivers/tty/serial/pxa.c:545 serial_pxa_set_termios+0x1dc/0x250()
Modules linked in:
[<c0281f30>] (unwind_backtrace+0x0/0xf0) from [<c029341c>] (warn_slowpath_common+0x4c/0x64)
[<c029341c>] (warn_slowpath_common+0x4c/0x64) from [<c029344c>] (warn_slowpath_null+0x18/0x1c)
[<c029344c>] (warn_slowpath_null+0x18/0x1c) from [<c044b1e4>] (serial_pxa_set_termios+0x1dc/0x250)
[<c044b1e4>] (serial_pxa_set_termios+0x1dc/0x250) from [<c044a840>] (uart_resume_port+0x128/0x2dc)
[<c044a840>] (uart_resume_port+0x128/0x2dc) from [<c044bbe0>] (serial_pxa_resume+0x18/0x24)
[<c044bbe0>] (serial_pxa_resume+0x18/0x24) from [<c0454d34>] (platform_pm_resume+0x40/0x4c)
[<c0454d34>] (platform_pm_resume+0x40/0x4c) from [<c0457ebc>] (pm_op+0x68/0xb4)
[<c0457ebc>] (pm_op+0x68/0xb4) from [<c0458368>] (device_resume+0xb0/0xec)
[<c0458368>] (device_resume+0xb0/0xec) from [<c04584c8>] (dpm_resume+0xe0/0x194)
[<c04584c8>] (dpm_resume+0xe0/0x194) from [<c0458588>] (dpm_resume_end+0xc/0x18)
[<c0458588>] (dpm_resume_end+0xc/0x18) from [<c02c518c>] (suspend_devices_and_enter+0x16c/0x1ac)
[<c02c518c>] (suspend_devices_and_enter+0x16c/0x1ac) from [<c02c5278>] (enter_state+0xac/0xdc)
[<c02c5278>] (enter_state+0xac/0xdc) from [<c02c48ec>] (state_store+0xa0/0xbc)
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:13
Picon

[PATCH 58/79] tty/n_gsm: fix bug in tiocmset

From: Nikola Diklic-Perin <diklic.perin.nikola <at> gmail.com>

Clear bitmask was not inverted before masking modem_tx.

Calling ioctl(fd, TIOCMBIC, TIOCM_RTS) results in:

[  197.430000] pre_modem_tx:	0x00000006
[  197.430000] clear:			0x00000004
[  197.430000] set:			0x00000000
[  197.440000] post_modem_tx:	0x00000004

which is wrong.

Signed-off-by: Nikola Diklic-Perin <diklic.perin.nikola <at> gmail.com>
Acked-by: Alan Cox <alan <at> linx.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/n_gsm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
index 8d7766b..da3b31a 100644
--- a/drivers/tty/n_gsm.c
+++ b/drivers/tty/n_gsm.c
 <at>  <at>  -2989,7 +2989,7  <at>  <at>  static int gsmtty_tiocmset(struct tty_struct *tty,
 	struct gsm_dlci *dlci = tty->driver_data;
 	unsigned int modem_tx = dlci->modem_tx;

-	modem_tx &= clear;
+	modem_tx &= ~clear;
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 48/79] TTY: serial, fix includes in some drivers

From: Jiri Slaby <jslaby <at> suse.cz>

linux/tty_flip.h is included in linux/serial_core.h. But this may (and
will) change in the future. Then we would get build errors such as:
.../tty/serial/max3107.c: In function ‘put_data_to_circ_buf’:
.../tty/serial/max3107.c:149:2: error: implicit declaration of function ‘tty_insert_flip_string’

So fix all the drviers which call tty flip buffer helpers to really
include linux/tty_flip.h. And also make sure that those include
linux/tty.h when operating with struct tty_struct.

Signed-off-by: Jiri Slaby <jslaby <at> suse.cz>
Cc: Alan Cox <alan <at> linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/serial/apbuart.c                |    1 +
 drivers/tty/serial/cpm_uart/cpm_uart_core.c |    1 +
 drivers/tty/serial/dz.c                     |    1 +
 drivers/tty/serial/ioc3_serial.c            |    1 +
 drivers/tty/serial/ioc4_serial.c            |    1 +
 drivers/tty/serial/m32r_sio.c               |    1 +
 drivers/tty/serial/max3100.c                |    2 ++
 drivers/tty/serial/max3107.c                |    2 ++
 drivers/tty/serial/mpc52xx_uart.c           |    1 +
 drivers/tty/serial/msm_serial_hs.c          |    2 ++
 drivers/tty/serial/mux.c                    |    2 ++
 drivers/tty/serial/nwpserial.c              |    1 +
 drivers/tty/serial/pch_uart.c               |    2 ++
 drivers/tty/serial/sb1250-duart.c           |    1 +
 drivers/tty/serial/serial_ks8695.c          |    1 +
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:13
Picon

[PATCH 66/79] h8300: drivers/serial/Kconfig was moved

From: Paul Bolle <pebolle <at> tiscali.nl>

commit ab4382d27412e7e3e7c936e8d50d8888dfac3df8 moved
drivers/serial/Kconfig to drivers/tty/serial/Kconfig, so we need to
source the latter file.

Signed-off-by: Paul Bolle <pebolle <at> tiscali.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 arch/h8300/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/h8300/Kconfig b/arch/h8300/Kconfig
index 091ed61..2b1eee7 100644
--- a/arch/h8300/Kconfig
+++ b/arch/h8300/Kconfig
 <at>  <at>  -195,7 +195,7  <at>  <at>  config UNIX98_PTYS

 source "drivers/char/pcmcia/Kconfig"

-source "drivers/serial/Kconfig"
+source "drivers/tty/serial/Kconfig"

 source "drivers/i2c/Kconfig"

--

-- 
1.7.7

--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 41/79] max3110: Fix up port->tty backreferencing

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

We want to keep refcounts properly on this against hangup.

Signed-off-by: Alan Cox <alan <at> linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/serial/mrst_max3110.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/mrst_max3110.c b/drivers/tty/serial/mrst_max3110.c
index 42aa439..1aa2c3c 100644
--- a/drivers/tty/serial/mrst_max3110.c
+++ b/drivers/tty/serial/mrst_max3110.c
 <at>  <at>  -347,7 +347,7  <at>  <at>  receive_chars(struct uart_max3110 *max, unsigned short *str, int len)
 	if (!port->state)
 		return 0;

-	tty = port->state->port.tty;
+	tty = tty_port_tty_get(&port->state->port);
 	if (!tty)
 		return 0;

 <at>  <at>  -364,8 +364,10  <at>  <at>  receive_chars(struct uart_max3110 *max, unsigned short *str, int len)
 		}
 	}

-	if (!w)
+	if (!w) {
+		tty_kref_put(tty);
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:12
Picon

[PATCH 50/79] serial: Support the EFR-register of XR1715x uarts.

From: Søren Holm <sgh <at> sgh.dk>

The EFR (Enhenced-Features-Register) is located at a different offset
than the other devices supporting UART_CAP_EFR. This change add a special
setup quick to set UPF_EXAR_EFR on the port. UPF_EXAR_EFR is then used to
the port type to PORT_XR17D15X since it is for sure a XR17D15X uart.

Signed-off-by: Søren Holm <sgh <at> sgh.dk>
Acked-by: Alan Cox <alan <at> linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/serial/8250.c     |   20 +++++++++++++++++++-
 drivers/tty/serial/8250_pci.c |   33 +++++++++++++++++++++++++++++++++
 include/linux/serial_core.h   |    4 +++-
 include/linux/serial_reg.h    |    1 +
 4 files changed, 56 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/8250.c b/drivers/tty/serial/8250.c
index 435ce14..82ca71a 100644
--- a/drivers/tty/serial/8250.c
+++ b/drivers/tty/serial/8250.c
 <at>  <at>  -309,6 +309,13  <at>  <at>  static const struct serial8250_config uart_config[] = {
 				  UART_FCR_T_TRIG_01,
 		.flags		= UART_CAP_FIFO | UART_CAP_RTOIE,
 	},
+	[PORT_XR17D15X] = {
+		.name		= "XR17D15X",
+		.fifo_size	= 64,
+		.tx_loadsz	= 64,
+		.fcr		= UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_10,
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:13
Picon

[PATCH 65/79] parport_pc: release IO region properly if unsupported ITE887x card is found

From: Jiri Kosina <jkosina <at> suse.cz>

sio_ite_8872_probe() bails out if it detects no-parallel (1S, 2S) or
unknown card.

It doesn't call release_region() on the previously allocated resource
though.  This causes

  (a) leak of the resource
  (b) kernel oops when parport module is removed and /proc/ioports is read. This
      is because the string that has been associated to the IO port region
      is a static char array inside the already removed module.

Let's call release_region() properly before baling out.

Signed-off-by: Jiri Kosina <jkosina <at> suse.cz>
Acked-by: Niels de Vos <ndevos <at> redhat.com>
Cc: Bjorn Helgaas <bjorn.helgaas <at> hp.com>
Cc: Alan Cox <alan <at> linux.intel.com>
Cc: Joe Krahn <krahn <at> niehs.nih.gov>
Signed-off-by: Andrew Morton <akpm <at> google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/parport/parport_pc.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c
index d1cdb94..d0b597b 100644
--- a/drivers/parport/parport_pc.c
+++ b/drivers/parport/parport_pc.c
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:13
Picon

[PATCH 57/79] drivers/tty: don't use the byte channel handle as a parameter in ehv_bytechan.c

From: Timur Tabi <timur <at> freescale.com>

The ePAPR hypervisor byte channel console driver only supports one byte
channel as a console, and the byte channel handle is stored in a global
variable.  It doesn't make any sense to pass that handle as a parameter
to the console functions, since these functions already have access to the
global variable.

Signed-off-by: Timur Tabi <timur <at> freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/ehv_bytechan.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/tty/ehv_bytechan.c b/drivers/tty/ehv_bytechan.c
index f733718..1595dba 100644
--- a/drivers/tty/ehv_bytechan.c
+++ b/drivers/tty/ehv_bytechan.c
 <at>  <at>  -282,7 +282,6  <at>  <at>  static int ehv_bc_console_byte_channel_send(unsigned int handle, const char *s,
 static void ehv_bc_console_write(struct console *co, const char *s,
 				 unsigned int count)
 {
-	unsigned int handle = (uintptr_t)co->data;
 	char s2[EV_BYTE_CHANNEL_MAX_BYTES];
 	unsigned int i, j = 0;
 	char c;
 <at>  <at>  -295,14 +294,14  <at>  <at>  static void ehv_bc_console_write(struct console *co, const char *s,

 		s2[j++] = c;
 		if (j >= (EV_BYTE_CHANNEL_MAX_BYTES - 1)) {
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:13
Picon

[PATCH 59/79] 8250: ratelimit LSR safety check engaged warning.

From: Konrad Rzeszutek Wilk <konrad.wilk <at> oracle.com>

On my BIOSTAR TA890FXE the ttyS0 ends up spewing:

[904682.485933] ttyS0: LSR safety check engaged!
[904692.505895] ttyS0: LSR safety check engaged!
[904702.525972] ttyS0: LSR safety check engaged!
[904712.545967] ttyS0: LSR safety check engaged!
[904722.566125] ttyS0: LSR safety check engaged!
..
lets limit it so it won't be the only thing visible
in the ring buffer.

CC: Alan Cox <alan <at> linux.intel.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk <at> oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/serial/8250.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/8250.c b/drivers/tty/serial/8250.c
index 82ca71a..076e9c6 100644
--- a/drivers/tty/serial/8250.c
+++ b/drivers/tty/serial/8250.c
 <at>  <at>  -2055,8 +2055,8  <at>  <at>  static int serial8250_startup(struct uart_port *port)
 	 */
 	if (!(up->port.flags & UPF_BUGGY_UART) &&
 	    (serial_inp(up, UART_LSR) == 0xff)) {
-		printk(KERN_INFO "ttyS%d: LSR safety check engaged!\n",
-		       serial_index(&up->port));
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:13
Picon

[PATCH 64/79] tty: Support compat_ioctl get/set termios_locked

From: Thomas Meyer <thomas <at> m3y3r.de>

When running a Fedora 15 (x86) on an x86_64 kernel, in the boot process
plymouthd complains about those two missing ioctls:
[    2.581783] ioctl32(plymouthd:186): Unknown cmd fd(10) cmd(00005457){t:'T';sz:0} arg(ffb6a5d0) on /dev/tty1
[    2.581803] ioctl32(plymouthd:186): Unknown cmd fd(10) cmd(00005456){t:'T';sz:0} arg(ffb6a680) on /dev/tty1

both ioctl functions work on the 'struct termios' resp. 'struct termios2',
which has the same size (36 bytes resp. 44 bytes) on x86 and x86_64,
so it's just a matter of converting the pointer from userland.

Signed-off-by: Thomas Meyer <thomas <at> m3y3r.de>
Cc: Arnd Bergmann <arnd <at> arndb.de>
Cc: Alan Cox <alan <at> lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm <at> google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/tty_io.c    |    2 ++
 drivers/tty/tty_ioctl.c |   17 +++++++++++++++++
 include/linux/tty.h     |    2 ++
 3 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index 150e4f7..4ca4bcd 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
 <at>  <at>  -2717,6 +2717,8  <at>  <at>  static long tty_compat_ioctl(struct file *file, unsigned int cmd,
 	ld = tty_ldisc_ref_wait(tty);
 	if (ld->ops->compat_ioctl)
 		retval = ld->ops->compat_ioctl(tty, file, cmd, arg);
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:13
Picon

[PATCH 73/79] tty/serial: atmel_serial: change platform_data variable name

From: Nicolas Ferre <nicolas.ferre <at> atmel.com>

Easier to follow if platform_data name is pdata.

Signed-off-by: Nicolas Ferre <nicolas.ferre <at> atmel.com>
Acked-by: Grant Likely <grant.likely <at> secretlab.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/serial/atmel_serial.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index c7232a9..a507daa 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
 <at>  <at>  -1417,13 +1417,13  <at>  <at>  static void __devinit atmel_init_port(struct atmel_uart_port *atmel_port,
 				      struct platform_device *pdev)
 {
 	struct uart_port *port = &atmel_port->uart;
-	struct atmel_uart_data *data = pdev->dev.platform_data;
+	struct atmel_uart_data *pdata = pdev->dev.platform_data;

 	port->iotype		= UPIO_MEM;
 	port->flags		= UPF_BOOT_AUTOCONF;
 	port->ops		= &atmel_pops;
 	port->fifosize		= 1;
-	port->line		= data->num;
+	port->line		= pdata->num;
 	port->dev		= &pdev->dev;
 	port->mapbase	= pdev->resource[0].start;
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:13
Picon

[PATCH 72/79] tty/serial: RS485 bindings for device tree

From: Nicolas Ferre <nicolas.ferre <at> atmel.com>

Generic bindings for RS485 feature included in some UARTs.
Those bindings have to be used withing an UART device tree node.
Documentation updated to link to the bindings definition.

Signed-off-by: Nicolas Ferre <nicolas.ferre <at> atmel.com>
Acked-by: Grant Likely <grant.likely <at> secretlab.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 Documentation/devicetree/bindings/serial/rs485.txt |   31 ++++++++++++++++++++
 .../devicetree/bindings/tty/serial/atmel-usart.txt |   27 +++++++++++++++++
 Documentation/serial/serial-rs485.txt              |    5 +++
 3 files changed, 63 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/serial/rs485.txt
 create mode 100644 Documentation/devicetree/bindings/tty/serial/atmel-usart.txt

diff --git a/Documentation/devicetree/bindings/serial/rs485.txt b/Documentation/devicetree/bindings/serial/rs485.txt
new file mode 100644
index 0000000..1e753c6
--- /dev/null
+++ b/Documentation/devicetree/bindings/serial/rs485.txt
 <at>  <at>  -0,0 +1,31  <at>  <at> 
+* RS485 serial communications
+
+The RTS signal is capable of automatically controlling line direction for
+the built-in half-duplex mode.
+The properties described hereafter shall be given to a half-duplex capable
+UART node.
+
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:13
Picon

[PATCH 68/79] TTY: drop driver reference in tty_open fail path

From: Jiri Slaby <jslaby <at> suse.cz>

When tty_driver_lookup_tty fails in tty_open, we forget to drop a
reference to the tty driver. This was added by commit 4a2b5fddd5 (Move
tty lookup/reopen to caller).

Fix that by adding tty_driver_kref_put to the fail path.

I will refactor the code later. This is for the ease of backporting to
stable.

Introduced-in: v2.6.28-rc2
Signed-off-by: Jiri Slaby <jslaby <at> suse.cz>
Cc: stable <stable <at> vger.kernel.org>
Cc: Alan Cox <alan <at> lxorguk.ukuu.org.uk>
Acked-by: Sukadev Bhattiprolu <sukadev <at> linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/tty_io.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index 4ca4bcd..6913da8 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
 <at>  <at>  -1873,6 +1873,7  <at>  <at>  got_driver:
 		if (IS_ERR(tty)) {
 			tty_unlock();
 			mutex_unlock(&tty_mutex);
+			tty_driver_kref_put(driver);
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:13
Picon

[PATCH 75/79] tty/serial: atmel_serial: auto-enumerate ports

From: Nicolas Ferre <nicolas.ferre <at> atmel.com>

If no platform data provided to enumerate ports, use a bit field
to choose port number and check if port is already initialized.
Use this mechanism for both console and plain serial ports.

Signed-off-by: Nicolas Ferre <nicolas.ferre <at> atmel.com>
Acked-by: Grant Likely <grant.likely <at> secretlab.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/serial/atmel_serial.c |   44 ++++++++++++++++++++++++++++++------
 1 files changed, 36 insertions(+), 8 deletions(-)

diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index bb72354..1074329 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
 <at>  <at>  -157,6 +157,7  <at>  <at>  struct atmel_uart_port {
 };

 static struct atmel_uart_port atmel_ports[ATMEL_MAX_UART];
+static unsigned long atmel_ports_in_use;

 #ifdef SUPPORT_SYSRQ
 static struct console atmel_console;
 <at>  <at>  -1423,7 +1424,6  <at>  <at>  static void __devinit atmel_init_port(struct atmel_uart_port *atmel_port,
 	port->flags		= UPF_BOOT_AUTOCONF;
 	port->ops		= &atmel_pops;
 	port->fifosize		= 1;
-	port->line		= pdata->num;
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:13
Picon

[PATCH 70/79] TTY: pty, release tty in all ptmx_open fail paths

From: Jiri Slaby <jslaby <at> suse.cz>

Mistakenly, commit 64ba3dc3143d (tty: never hold BTM while getting
tty_mutex) switched one fail path in ptmx_open to not free the newly
allocated tty.

Fix that by jumping to the appropriate place. And rename the labels so
that it's clear what is going on there.

Introduced-in: v2.6.36-rc2
Signed-off-by: Jiri Slaby <jslaby <at> suse.cz>
Cc: stable <stable <at> vger.kernel.org>
Cc: Arnd Bergmann <arnd <at> arndb.de>
Cc: Alan Cox <alan <at> lxorguk.ukuu.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/pty.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c
index 7613f95..2feea63 100644
--- a/drivers/tty/pty.c
+++ b/drivers/tty/pty.c
 <at>  <at>  -686,15 +686,15  <at>  <at>  static int ptmx_open(struct inode *inode, struct file *filp)

 	retval = devpts_pty_new(inode, tty->link);
 	if (retval)
-		goto out1;
+		goto err_release;

(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:13
Picon

[PATCH 71/79] TTY: call tty_driver_lookup_tty unconditionally

From: Jiri Slaby <jslaby <at> suse.cz>

Commit 4a2b5fddd5 (Move tty lookup/reopen to caller) made the call to
tty_driver_lookup_tty conditional in tty_open. It doesn't look like it
was an intention. Or if it was, it was not documented in the changelog
and the code now looks weird. For example there would be no need to
remember the tty driver and tty index. Further the condition depends
on a tty which we drop a reference of already.

If I'm looking correctly, this should not matter thanks to the locking
currently done there. Thus, tty_driver->ttys[idx] cannot change under
our hands. But anyway, it makes sense to change that to the old
behaviour.

Introduced-in: v2.6.28-rc2
Signed-off-by: Jiri Slaby <jslaby <at> suse.cz>
Cc: stable <stable <at> vger.kernel.org>
Cc: Sukadev Bhattiprolu <sukadev <at> us.ibm.com>
Cc: Alan Cox <alan <at> redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/tty_io.c |   21 +++++++++------------
 1 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index 767ecbb..0425170 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
 <at>  <at>  -1821,7 +1821,7  <at>  <at>  int tty_release(struct inode *inode, struct file *filp)

(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:13
Picon

[PATCH 77/79] Revert "TTY: call tty_driver_lookup_tty unconditionally"

This reverts commit 631180aca723cb92e128fdac5fd144e913ca84e5.

It caused problems when /dev/tty is a pty:
	https://lkml.org/lkml/2011/10/12/401

Cc: Jiri Slaby <jslaby <at> suse.cz>
Cc: stable <stable <at> vger.kernel.org>
Cc: Sukadev Bhattiprolu <sukadev <at> us.ibm.com>
Cc: Alan Cox <alan <at> redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/tty_io.c |   21 ++++++++++++---------
 1 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index 0425170..767ecbb 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
 <at>  <at>  -1821,7 +1821,7  <at>  <at>  int tty_release(struct inode *inode, struct file *filp)

 static int tty_open(struct inode *inode, struct file *filp)
 {
-	struct tty_struct *tty;
+	struct tty_struct *tty = NULL;
 	int noctty, retval;
 	struct tty_driver *driver;
 	int index;
 <at>  <at>  -1892,14 +1892,17  <at>  <at>  retry_open:
 		return -ENODEV;
 	}
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:13
Picon

[PATCH 78/79] tty/serial: atmel_serial: bootconsole removed from auto-enumerates

From: Nicolas Ferre <nicolas.ferre <at> atmel.com>

Auto-enumerate mechanism conflicts with bootconsoles: remove
the usage counter for this type of consoles.

Signed-off-by: Nicolas Ferre <nicolas.ferre <at> atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/serial/atmel_serial.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index fc4081e..358bbb2 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
 <at>  <at>  -1674,7 +1674,6  <at>  <at>  static int __init atmel_console_init(void)
 		int id = atmel_default_console_device->id;
 		struct atmel_uart_port *port = &atmel_ports[id];

-		set_bit(id, &atmel_ports_in_use);
 		port->backup_imr = 0;
 		port->uart.line = id;

--

-- 
1.7.7

--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:13
Picon

[PATCH 79/79] TTY: serial_core: Fix crash if DCD drop during suspend

From: Doug Anderson <dianders <at> chromium.org>

This crash was showing up 100% of the time on Tegra CPUs when an
agetty was running on the serial port and the console was not running
on the serial port.  The reason the Tegra saw it so reliably is that
the Tegra CPU internally ties DTR to DCD/DSR.  That means when we
dropped DTR during suspend we would get always get an immediate DCD
drop.

The specific order of operations that were running:
* uart_suspend_port() would be called to put the uart in suspend mode
* we'd drop DTR (ops->set_mctrl(uport, 0)).
* the DTR drop would be looped back in the CPU to be a DCD drop.
* the DCD drop would look to the serial driver as a hangup
* the hangup would call uart_shutdown()
* ... suspend / resume happens ...
* uart_resume_port() would be called and run the code in the
  (port->flags & ASYNC_SUSPENDED) block, which would startup the port
  (and enable tx again).
* Since the UART would be available for tx, we'd immediately get
  an interrupt, eventually calling transmit_chars()
* The transmit_chars() function would crash.  The first crash would
  be a dereference of a NULL tty member, but since the port has been
  shutdown that was just a symptom.

I have proposed a patch that would fix the Tegra CPUs here (see
https://lkml.org/lkml/2011/10/11/444 - tty/serial: Prevent drop of DCD
on suspend for Tegra UARTs).  However, even with that fix it is still
possible for systems that have an externally visible DCD line to see a
crash if the DCD drops at just the right time during suspend: thus
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:13
Picon

[PATCH 67/79] 8250_pci: Fix kernel panic when pch_uart is disabled

From: Tomoya MORINAGA <tomoya-linux <at> dsn.lapis-semi.com>

Currently, ".setup" function is not set.
As a result, when detecting our IOH's uart device without pch_uart, kernel panic
occurs at the following of pciserial_init_ports().

	for (i = 0; i < nr_ports; i++) {
		if (quirk->setup(priv, board, &serial_port, i))
			break;

So, this patch adds the ".setup" function.
We can use pci_default_setup because our IOH's uart is compatible with 16550.

Signed-off-by: Tomoya MORINAGA <tomoya-linux <at> dsn.lapis-semi.com>
Acked-by: Alan Cox <alan <at> linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/serial/8250_pci.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/drivers/tty/serial/8250_pci.c b/drivers/tty/serial/8250_pci.c
index a79caba..1b449b7 100644
--- a/drivers/tty/serial/8250_pci.c
+++ b/drivers/tty/serial/8250_pci.c
 <at>  <at>  -1591,51 +1591,61  <at>  <at>  static struct pci_serial_quirk pci_serial_quirks[] __refdata = {
 		.vendor         = PCI_VENDOR_ID_INTEL,
 		.device         = 0x8811,
 		.init		= pci_eg20t_init,
+		.setup		= pci_default_setup,
 	},
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:13
Picon

[PATCH 74/79] tty/serial: atmel_serial: whitespace and braces modifications

From: Nicolas Ferre <nicolas.ferre <at> atmel.com>

Signed-off-by: Nicolas Ferre <nicolas.ferre <at> atmel.com>
Acked-by: Grant Likely <grant.likely <at> secretlab.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/serial/atmel_serial.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index a507daa..bb72354 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
 <at>  <at>  -1433,10 +1433,10  <at>  <at>  static void __devinit atmel_init_port(struct atmel_uart_port *atmel_port,

 	memset(&atmel_port->rx_ring, 0, sizeof(atmel_port->rx_ring));

-	if (pdata->regs)
+	if (pdata->regs) {
 		/* Already mapped by setup code */
 		port->membase = pdata->regs;
-	else {
+	} else {
 		port->flags	|= UPF_IOREMAP;
 		port->membase	= NULL;
 	}
 <at>  <at>  -1450,9 +1450,10  <at>  <at>  static void __devinit atmel_init_port(struct atmel_uart_port *atmel_port,
 		/* only enable clock when USART is in use */
 	}

(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:13
Picon

[PATCH 69/79] TTY: make tty_add_file non-failing

From: Jiri Slaby <jslaby <at> suse.cz>

If tty_add_file fails at the point it is now, we have to revert all
the changes we did to the tty. It means either decrease all refcounts
if this was a tty reopen or delete the tty if it was newly allocated.

There was a try to fix this in v3.0-rc2 using tty_release in 0259894c7
(TTY: fix fail path in tty_open). But instead it introduced a NULL
dereference. It's because tty_release dereferences
filp->private_data, but that one is set even in our tty_add_file. And
when tty_add_file fails, it's still NULL/garbage. Hence tty_release
cannot be called there.

To circumvent the original leak (and the current NULL deref) we split
tty_add_file into two functions, making the latter non-failing. In
that case we may do the former early in open, where handling failures
is easy. The latter stays as it is now. So there is no change in
functionality.

The original bug (leak) was introduced by f573bd176 (tty: Remove
__GFP_NOFAIL from tty_add_file()). Thanks Dan for reporting this.

Later, we may split tty_release into more functions and call only some
of them in this fail path instead. (If at all possible.)

Introduced-in: v2.6.37-rc2
Signed-off-by: Jiri Slaby <jslaby <at> suse.cz>
Reported-by: Dan Carpenter <dan.carpenter <at> oracle.com>
Cc: stable <stable <at> vger.kernel.org>
Cc: Alan Cox <alan <at> lxorguk.ukuu.org.uk>
(Continue reading)

Greg Kroah-Hartman | 26 Oct 2011 14:13
Picon

[PATCH 76/79] tty/serial: atmel_serial: add device tree support

From: Nicolas Ferre <nicolas.ferre <at> atmel.com>

Will use aliases to enumerate ports, if available.

Signed-off-by: Nicolas Ferre <nicolas.ferre <at> atmel.com>
Acked-by: Grant Likely <grant.likely <at> secretlab.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh <at> suse.de>
---
 drivers/tty/serial/atmel_serial.c |   79 +++++++++++++++++++++++++++++++++----
 1 files changed, 71 insertions(+), 8 deletions(-)

diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index 1074329..fc4081e 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
 <at>  <at>  -33,6 +33,8  <at>  <at> 
 #include <linux/sysrq.h>
 #include <linux/tty_flip.h>
 #include <linux/platform_device.h>
+#include <linux/of.h>
+#include <linux/of_device.h>
 #include <linux/dma-mapping.h>
 #include <linux/atmel_pdc.h>
 #include <linux/atmel_serial.h>
 <at>  <at>  -163,6 +165,16  <at>  <at>  static unsigned long atmel_ports_in_use;
 static struct console atmel_console;
 #endif

+#if defined(CONFIG_OF)
+static const struct of_device_id atmel_serial_dt_ids[] = {
(Continue reading)

Linus Torvalds | 26 Oct 2011 15:18
Gravatar

Re: [GIT PATCH] TTY/serial driver patches for 3.2

On Wed, Oct 26, 2011 at 1:42 PM, Greg KH <gregkh <at> suse.de> wrote:
>
> The one in 8250_pci.c is trivial to fix, the atmel_serial one isn't as
> easy, but I'm sure you can figure it out :)  If you want me to do the
> merge for it, I'll be glad to do so, just let me know.

So I figured it out, but please double-check, especially since it
seems to be some arm-only driver that I can't even compile-test my
resolution.

                 Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Greg KH | 26 Oct 2011 15:34
Picon

Re: [GIT PATCH] TTY/serial driver patches for 3.2

On Wed, Oct 26, 2011 at 03:18:21PM +0200, Linus Torvalds wrote:
> On Wed, Oct 26, 2011 at 1:42 PM, Greg KH <gregkh <at> suse.de> wrote:
> >
> > The one in 8250_pci.c is trivial to fix, the atmel_serial one isn't as
> > easy, but I'm sure you can figure it out :)  If you want me to do the
> > merge for it, I'll be glad to do so, just let me know.
> 
> So I figured it out, but please double-check, especially since it
> seems to be some arm-only driver that I can't even compile-test my
> resolution.

I think it looks correct, but yeah, as I can't build it either, it's
tough to tell.

Nicolas, can you verify that Linus's merge was done correctly?  If not,
can you send a patch?  It is commit
efb8d21b2c6db3497655cc6a033ae8a9883e4063 in Linus's tree right now.

thanks,

greg k-h
Domenico Andreoli | 26 Oct 2011 16:16
Picon
Gravatar

Re: [GIT PATCH] TTY/serial driver patches for 3.2

On Wed, Oct 26, 2011 at 03:34:38PM +0200, Greg KH wrote:
> On Wed, Oct 26, 2011 at 03:18:21PM +0200, Linus Torvalds wrote:
> > On Wed, Oct 26, 2011 at 1:42 PM, Greg KH <gregkh <at> suse.de> wrote:
> > >
> > > The one in 8250_pci.c is trivial to fix, the atmel_serial one isn't as
> > > easy, but I'm sure you can figure it out :)  If you want me to do the
> > > merge for it, I'll be glad to do so, just let me know.
> > 
> > So I figured it out, but please double-check, especially since it
> > seems to be some arm-only driver that I can't even compile-test my
> > resolution.
> 
> I think it looks correct, but yeah, as I can't build it either, it's
> tough to tell.
> 
> Nicolas, can you verify that Linus's merge was done correctly?  If not,
> can you send a patch?  It is commit
> efb8d21b2c6db3497655cc6a033ae8a9883e4063 in Linus's tree right now.

tryed to build efb8d21 with at91cap9adk_defconfig + DT + 8250 but it fails:

drivers/tty/serial/atmel_serial.c: In function 'atmel_serial_probe':
drivers/tty/serial/atmel_serial.c:1788:3: error: implicit declaration of function
'of_alias_get_id' [-Werror=implicit-function-declaration]
drivers/tty/serial/atmel_serial.c: At top level:
drivers/tty/serial/atmel_serial.c:1893:3: error: implicit declaration of function 'of_match_ptr' [-Werror=implicit-function-declaration]
drivers/tty/serial/atmel_serial.c:1893:3: error: initializer element is not constant
drivers/tty/serial/atmel_serial.c:1893:3: error: (near initialization for 'atmel_serial_driver.driver.of_match_table')
cc1: some warnings being treated as errors

(Continue reading)

Jiri Kosina | 26 Oct 2011 23:38
Picon

Re: [GIT PATCH] TTY/serial driver patches for 3.2

On Wed, 26 Oct 2011, Domenico Andreoli wrote:

> > > > The one in 8250_pci.c is trivial to fix, the atmel_serial one isn't as
> > > > easy, but I'm sure you can figure it out :)  If you want me to do the
> > > > merge for it, I'll be glad to do so, just let me know.
> > > 
> > > So I figured it out, but please double-check, especially since it
> > > seems to be some arm-only driver that I can't even compile-test my
> > > resolution.
> > 
> > I think it looks correct, but yeah, as I can't build it either, it's
> > tough to tell.
> > 
> > Nicolas, can you verify that Linus's merge was done correctly?  If not,
> > can you send a patch?  It is commit
> > efb8d21b2c6db3497655cc6a033ae8a9883e4063 in Linus's tree right now.
> 
> tryed to build efb8d21 with at91cap9adk_defconfig + DT + 8250 but it fails:
> 
> drivers/tty/serial/atmel_serial.c: In function 'atmel_serial_probe':
> drivers/tty/serial/atmel_serial.c:1788:3: error: implicit declaration of function
'of_alias_get_id' [-Werror=implicit-function-declaration]
> drivers/tty/serial/atmel_serial.c: At top level:
> drivers/tty/serial/atmel_serial.c:1893:3: error: implicit declaration of function
'of_match_ptr' [-Werror=implicit-function-declaration]
> drivers/tty/serial/atmel_serial.c:1893:3: error: initializer element is not constant
> drivers/tty/serial/atmel_serial.c:1893:3: error: (near initialization for 'atmel_serial_driver.driver.of_match_table')
> cc1: some warnings being treated as errors
> 
> there is not mention of such (new) of_match_ptr macro anywhere in Linus' tree.
(Continue reading)

Nicolas Ferre | 26 Oct 2011 17:01
Favicon
Gravatar

Re: [GIT PATCH] TTY/serial driver patches for 3.2

On 10/26/2011 03:34 PM, Greg KH :
> On Wed, Oct 26, 2011 at 03:18:21PM +0200, Linus Torvalds wrote:
>> On Wed, Oct 26, 2011 at 1:42 PM, Greg KH <gregkh <at> suse.de> wrote:
>>>
>>> The one in 8250_pci.c is trivial to fix, the atmel_serial one isn't as
>>> easy, but I'm sure you can figure it out :)  If you want me to do the
>>> merge for it, I'll be glad to do so, just let me know.
>>
>> So I figured it out, but please double-check, especially since it
>> seems to be some arm-only driver that I can't even compile-test my
>> resolution.
> 
> I think it looks correct, but yeah, as I can't build it either, it's
> tough to tell.
> 
> Nicolas, can you verify that Linus's merge was done correctly?  If not,
> can you send a patch?  It is commit
> efb8d21b2c6db3497655cc6a033ae8a9883e4063 in Linus's tree right now.

Yes, I have verified Linus's merge and it is correct.

Stephen hit this merge conflict in linux-next yesterday and I sent the
fixup as "[PATCH] tty/serial: atmel_serial: fixup merge conflict".
Anyway, sorry for the noise it has produced...

For the functions and macros that has been highlighted by Domenico in
his attempt to compile the atmel_serial driver, they shall come with
"device tree" git tree pull.

Best regards,
(Continue reading)


Gmane