Serial fixes for 3.14-rc1

Here are tiny and assorted serial driver fixes that have been in a
 branch in my tree for a while and somehow did not get properly merged
 into my big TTY / Serial pull request for 3.14-rc1.  Sorry about that.
 
 All have been in linux-next for a while with no issues.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iEYEABECAAYFAlLm74UACgkQMUfUDdst+ylviACcC4eubO3yOgJzG5A69+Ncl7t6
 sy0An2Kb3x0evfvmR6O+fT67rFrvBijA
 =Iv/6
 -----END PGP SIGNATURE-----

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

Pull serial fixes from Greg KH:
 "Here are tiny and assorted serial driver fixes that have been in a
  branch in my tree for a while and somehow did not get properly merged
  into my big TTY / Serial pull request for 3.14-rc1.  Sorry about that.

  All have been in linux-next for a while with no issues"

* tag 'tty-3.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  tty: xuartps: Properly guard sysrq specific code
  serial: 8250: Fix initialisation of Quatech cards with the AMCC PCI chip
  serial: icom: dereference after free in load_code()
  serial: 8250_dw: add new ACPI IDs
  tty: serial: pch: don't crash if DMA enabled but not loaded
  serial: samsung: move clock deactivation below uart registration
This commit is contained in:
Linus Torvalds 2014-01-28 18:50:24 -08:00
commit 2ad48ee810
3 changed files with 16 additions and 6 deletions

View file

@ -455,11 +455,11 @@ static void load_code(struct icom_port *icom_port)
for (index = 0; index < fw->size; index++) for (index = 0; index < fw->size; index++)
new_page[index] = fw->data[index]; new_page[index] = fw->data[index];
release_firmware(fw);
writeb((char) ((fw->size + 16)/16), &icom_port->dram->mac_length); writeb((char) ((fw->size + 16)/16), &icom_port->dram->mac_length);
writel(temp_pci, &icom_port->dram->mac_load_addr); writel(temp_pci, &icom_port->dram->mac_load_addr);
release_firmware(fw);
/*Setting the syncReg to 0x80 causes adapter to start downloading /*Setting the syncReg to 0x80 causes adapter to start downloading
the personality code into adapter instruction RAM. the personality code into adapter instruction RAM.
Once code is loaded, it will begin executing and, based on Once code is loaded, it will begin executing and, based on

View file

@ -1508,10 +1508,14 @@ static int pch_uart_verify_port(struct uart_port *port,
__func__); __func__);
return -EOPNOTSUPP; return -EOPNOTSUPP;
#endif #endif
dev_info(priv->port.dev, "PCH UART : Use DMA Mode\n"); if (!priv->use_dma) {
if (!priv->use_dma)
pch_request_dma(port); pch_request_dma(port);
priv->use_dma = 1; if (priv->chan_rx)
priv->use_dma = 1;
}
dev_info(priv->port.dev, "PCH UART: %s\n",
priv->use_dma ?
"Use DMA Mode" : "No DMA");
} }
return 0; return 0;

View file

@ -1209,7 +1209,6 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport,
/* reset the fifos (and setup the uart) */ /* reset the fifos (and setup the uart) */
s3c24xx_serial_resetport(port, cfg); s3c24xx_serial_resetport(port, cfg);
clk_disable_unprepare(ourport->clk);
return 0; return 0;
} }
@ -1287,6 +1286,13 @@ static int s3c24xx_serial_probe(struct platform_device *pdev)
uart_add_one_port(&s3c24xx_uart_drv, &ourport->port); uart_add_one_port(&s3c24xx_uart_drv, &ourport->port);
platform_set_drvdata(pdev, &ourport->port); platform_set_drvdata(pdev, &ourport->port);
/*
* Deactivate the clock enabled in s3c24xx_serial_init_port here,
* so that a potential re-enablement through the pm-callback overlaps
* and keeps the clock enabled in this case.
*/
clk_disable_unprepare(ourport->clk);
#ifdef CONFIG_SAMSUNG_CLOCK #ifdef CONFIG_SAMSUNG_CLOCK
ret = device_create_file(&pdev->dev, &dev_attr_clock_source); ret = device_create_file(&pdev->dev, &dev_attr_clock_source);
if (ret < 0) if (ret < 0)