TTY/Serial fixes for 3.9-rc6

Here are 4 small tty/serial fixes for 3.9.
 
 One fixes a bug where we broke the documentation build, and the others
 fix reported problems in some serial drivers.
 
 All have been in linux-next for a while.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iEYEABECAAYFAlFl6bQACgkQMUfUDdst+yk1OQCcCCTj+kOPaBks2HLzJx6DgvXl
 OIoAoI7aDtxyjSgxVU96xQa1JRdobHQD
 =gVrB
 -----END PGP SIGNATURE-----

Merge tag 'tty-3.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

Pull tty/serial fixes from Greg Kroah-Hartman:
 "Here are 4 small tty/serial fixes for 3.9.

  One fixes a bug where we broke the documentation build, and the others
  fix reported problems in some serial drivers.

  All have been in linux-next for a while"

* tag 'tty-3.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  tty: mxser: fix cycle termination condition in mxser_probe() and mxser_module_init()
  Revert "tty/8250_pnp: serial port detection regression since v3.7"
  OMAP/serial: Revert bad fix of Rx FIFO threshold granularity
  tty: Documentation: fix a path in a DocBook template
This commit is contained in:
Linus Torvalds 2013-04-10 15:59:12 -07:00
commit 7a92bc3856
4 changed files with 21 additions and 12 deletions

View file

@ -227,7 +227,7 @@ X!Isound/sound_firmware.c
<chapter id="uart16x50">
<title>16x50 UART Driver</title>
!Edrivers/tty/serial/serial_core.c
!Edrivers/tty/serial/8250/8250.c
!Edrivers/tty/serial/8250/8250_core.c
</chapter>
<chapter id="fbdev">

View file

@ -2643,9 +2643,9 @@ static int mxser_probe(struct pci_dev *pdev,
mxvar_sdriver, brd->idx + i, &pdev->dev);
if (IS_ERR(tty_dev)) {
retval = PTR_ERR(tty_dev);
for (i--; i >= 0; i--)
for (; i > 0; i--)
tty_unregister_device(mxvar_sdriver,
brd->idx + i);
brd->idx + i - 1);
goto err_relbrd;
}
}
@ -2751,9 +2751,9 @@ static int __init mxser_module_init(void)
tty_dev = tty_port_register_device(&brd->ports[i].port,
mxvar_sdriver, brd->idx + i, NULL);
if (IS_ERR(tty_dev)) {
for (i--; i >= 0; i--)
for (; i > 0; i--)
tty_unregister_device(mxvar_sdriver,
brd->idx + i);
brd->idx + i - 1);
for (i = 0; i < brd->info->nports; i++)
tty_port_destroy(&brd->ports[i].port);
free_irq(brd->irq, brd);

View file

@ -429,7 +429,6 @@ serial_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *dev_id)
{
struct uart_8250_port uart;
int ret, line, flags = dev_id->driver_data;
struct resource *res = NULL;
if (flags & UNKNOWN_DEV) {
ret = serial_pnp_guess_board(dev);
@ -440,12 +439,11 @@ serial_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *dev_id)
memset(&uart, 0, sizeof(uart));
if (pnp_irq_valid(dev, 0))
uart.port.irq = pnp_irq(dev, 0);
if ((flags & CIR_PORT) && pnp_port_valid(dev, 2))
res = pnp_get_resource(dev, IORESOURCE_IO, 2);
else if (pnp_port_valid(dev, 0))
res = pnp_get_resource(dev, IORESOURCE_IO, 0);
if (pnp_resource_enabled(res)) {
uart.port.iobase = res->start;
if ((flags & CIR_PORT) && pnp_port_valid(dev, 2)) {
uart.port.iobase = pnp_port_start(dev, 2);
uart.port.iotype = UPIO_PORT;
} else if (pnp_port_valid(dev, 0)) {
uart.port.iobase = pnp_port_start(dev, 0);
uart.port.iotype = UPIO_PORT;
} else if (pnp_mem_valid(dev, 0)) {
uart.port.mapbase = pnp_mem_start(dev, 0);

View file

@ -886,6 +886,17 @@ serial_omap_set_termios(struct uart_port *port, struct ktermios *termios,
serial_out(up, UART_MCR, up->mcr | UART_MCR_TCRTLR);
/* FIFO ENABLE, DMA MODE */
up->scr |= OMAP_UART_SCR_RX_TRIG_GRANU1_MASK;
/*
* NOTE: Setting OMAP_UART_SCR_RX_TRIG_GRANU1_MASK
* sets Enables the granularity of 1 for TRIGGER RX
* level. Along with setting RX FIFO trigger level
* to 1 (as noted below, 16 characters) and TLR[3:0]
* to zero this will result RX FIFO threshold level
* to 1 character, instead of 16 as noted in comment
* below.
*/
/* Set receive FIFO threshold to 16 characters and
* transmit FIFO threshold to 16 spaces
*/