Skip to contentSkip to conversation

TTY fixes for 2.6.32-git

PATCH New Greg KH 1 participant 4 messages Dec 1, 2009 Char and misc drivers

lore
Share & tools
lore

Greg KH

author
#0 lore raw

PATCH 1/1 TTY fixes for 2.6.32-git

Here are 3 tty bugfixs for your kernel tree. One fixes a regression from 2.6.30, one fixes a build error, and the last one adds a new device id.

Please pull from:

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

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

Both patches will be sent to the linux-kernel mailing list, if anyone wants to see it.

thanks,

greg k-h

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

 drivers/char/tty_port.c       |    7 +++++--
 drivers/serial/bcm63xx_uart.c |    4 ++--
 drivers/serial/of_serial.c    |    1 +
 3 files changed, 8 insertions(+), 4 deletions(-)

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

Alan Cox (1):
tty_port: handle the nonblocking open of a dead port corner case

Maxime Bizon (1):
bcm63xx_uart: Fix serial driver compile breakage.

Michal Simek (1):
tty/of_serial: add missing ns16550a id

#1 lore raw

PATCH 1/3 tty_port: handle the nonblocking open of a dead port corner case

From: Alan Cox <[email protected]>

Some drivers allow O_NDELAY of a dead port (eg for setserial to work). In that situation we must not try to raise the carrier.

---
 drivers/char/tty_port.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
drivers/char/tty_port.c +5 -2
index 2e8552d..c63f3d3 100644
@@ -219,8 +219,11 @@ int tty_port_block_til_ready(struct tty_port *port,
 
 	/* if non-blocking mode is set we can pass directly to open unless
 	   the port has just hung up or is in another error state */
-	if ((filp->f_flags & O_NONBLOCK) ||
-			(tty->flags & (1 << TTY_IO_ERROR))) {
+	if (tty->flags & (1 << TTY_IO_ERROR)) {
+		port->flags |= ASYNC_NORMAL_ACTIVE;
+		return 0;
+	}
+	if (filp->f_flags & O_NONBLOCK) {
 		/* Indicate we are open */
 		if (tty->termios->c_cflag & CBAUD)
 			tty_port_raise_dtr_rts(port);
Signature · 1 line
1.6.4.2
#2 lore raw

PATCH 2/3 bcm63xx_uart: Fix serial driver compile breakage.

In reply to Greg KH

From: Maxime Bizon <[email protected]>

The driver missed a small API change while sitting in Ralf's tree, this patch makes it compile again.

---
 drivers/serial/bcm63xx_uart.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/serial/bcm63xx_uart.c +2 -2
index beddaa6..37ad0c4 100644
@@ -242,7 +242,7 @@ static void bcm_uart_do_rx(struct uart_port *port)
 	 * higher than fifo size anyway since we're much faster than
 	 * serial port */
 	max_count = 32;
-	tty = port->info->port.tty;
+	tty = port->state->port.tty;
 	do {
 		unsigned int iestat, c, cstat;
 		char flag;
@@ -318,7 +318,7 @@ static void bcm_uart_do_tx(struct uart_port *port)
 		return;
 	}
 
-	xmit = &port->info->xmit;
+	xmit = &port->state->xmit;
 	if (uart_circ_empty(xmit))
 		goto txq_empty;
 
Signature · 1 line
1.6.4.2
#3 lore raw

PATCH 3/3 tty/of_serial: add missing ns16550a id

In reply to Greg KH

From: Michal Simek <[email protected]>

Many boards have a bug-free ns16550 compatible serial port, which we should register as PORT_16550A. This introduces a new value "ns16550a" for the compatible property of of_serial to let a firmware choose that model instead of using the crippled PORT_16550 mode.

---
 drivers/serial/of_serial.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/serial/of_serial.c +1 -0
index 02406ba..cdf172e 100644
@@ -161,6 +161,7 @@ static int of_platform_serial_remove(struct of_device *ofdev)
 static struct of_device_id __devinitdata of_platform_serial_table[] = {
 	{ .type = "serial", .compatible = "ns8250",   .data = (void *)PORT_8250, },
 	{ .type = "serial", .compatible = "ns16450",  .data = (void *)PORT_16450, },
+	{ .type = "serial", .compatible = "ns16550a", .data = (void *)PORT_16550A, },
 	{ .type = "serial", .compatible = "ns16550",  .data = (void *)PORT_16550, },
 	{ .type = "serial", .compatible = "ns16750",  .data = (void *)PORT_16750, },
 	{ .type = "serial", .compatible = "ns16850",  .data = (void *)PORT_16850, },
Signature · 1 line
1.6.4.2