Commit dbde71df authored by Linus Torvalds's avatar Linus Torvalds

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

Pull tty/serial driver fixes from Greg KH:
 "Here are some small serial and TTY driver fixes for 5.2-rc3.

  Nothing major, just a number of fixes for reported issues. The fbcon
  core fix also resolves an issue, and was acked by the relevant
  maintainer to go through this tree.

  All of these have been in linux-next with no reported issues"

* tag 'tty-5.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  vt/fbcon: deinitialize resources in visual_init() after failed memory allocation
  tty: max310x: Fix external crystal register setup
  serial: sh-sci: disable DMA for uart_console
  serial: imx: remove log spamming error message
  tty: serial: msm_serial: Fix XON/XOFF
parents e49c8547 a1ad1cc9
...@@ -1165,7 +1165,6 @@ static void imx_uart_clear_rx_errors(struct imx_port *sport) ...@@ -1165,7 +1165,6 @@ static void imx_uart_clear_rx_errors(struct imx_port *sport)
sport->port.icount.buf_overrun++; sport->port.icount.buf_overrun++;
tty_flip_buffer_push(port); tty_flip_buffer_push(port);
} else { } else {
dev_err(sport->port.dev, "DMA transaction error.\n");
if (usr1 & USR1_FRAMERR) { if (usr1 & USR1_FRAMERR) {
sport->port.icount.frame++; sport->port.icount.frame++;
imx_uart_writel(sport, USR1_FRAMERR, USR1); imx_uart_writel(sport, USR1_FRAMERR, USR1);
......
...@@ -581,7 +581,7 @@ static int max310x_set_ref_clk(struct device *dev, struct max310x_port *s, ...@@ -581,7 +581,7 @@ static int max310x_set_ref_clk(struct device *dev, struct max310x_port *s,
} }
/* Configure clock source */ /* Configure clock source */
clksrc = xtal ? MAX310X_CLKSRC_CRYST_BIT : MAX310X_CLKSRC_EXTCLK_BIT; clksrc = MAX310X_CLKSRC_EXTCLK_BIT | (xtal ? MAX310X_CLKSRC_CRYST_BIT : 0);
/* Configure PLL */ /* Configure PLL */
if (pllcfg) { if (pllcfg) {
......
...@@ -860,6 +860,7 @@ static void msm_handle_tx(struct uart_port *port) ...@@ -860,6 +860,7 @@ static void msm_handle_tx(struct uart_port *port)
struct circ_buf *xmit = &msm_port->uart.state->xmit; struct circ_buf *xmit = &msm_port->uart.state->xmit;
struct msm_dma *dma = &msm_port->tx_dma; struct msm_dma *dma = &msm_port->tx_dma;
unsigned int pio_count, dma_count, dma_min; unsigned int pio_count, dma_count, dma_min;
char buf[4] = { 0 };
void __iomem *tf; void __iomem *tf;
int err = 0; int err = 0;
...@@ -869,10 +870,12 @@ static void msm_handle_tx(struct uart_port *port) ...@@ -869,10 +870,12 @@ static void msm_handle_tx(struct uart_port *port)
else else
tf = port->membase + UART_TF; tf = port->membase + UART_TF;
buf[0] = port->x_char;
if (msm_port->is_uartdm) if (msm_port->is_uartdm)
msm_reset_dm_count(port, 1); msm_reset_dm_count(port, 1);
iowrite8_rep(tf, &port->x_char, 1); iowrite32_rep(tf, buf, 1);
port->icount.tx++; port->icount.tx++;
port->x_char = 0; port->x_char = 0;
return; return;
......
...@@ -1557,6 +1557,13 @@ static void sci_request_dma(struct uart_port *port) ...@@ -1557,6 +1557,13 @@ static void sci_request_dma(struct uart_port *port)
dev_dbg(port->dev, "%s: port %d\n", __func__, port->line); dev_dbg(port->dev, "%s: port %d\n", __func__, port->line);
/*
* DMA on console may interfere with Kernel log messages which use
* plain putchar(). So, simply don't use it with a console.
*/
if (uart_console(port))
return;
if (!port->dev->of_node) if (!port->dev->of_node)
return; return;
......
...@@ -1056,6 +1056,13 @@ static void visual_init(struct vc_data *vc, int num, int init) ...@@ -1056,6 +1056,13 @@ static void visual_init(struct vc_data *vc, int num, int init)
vc->vc_screenbuf_size = vc->vc_rows * vc->vc_size_row; vc->vc_screenbuf_size = vc->vc_rows * vc->vc_size_row;
} }
static void visual_deinit(struct vc_data *vc)
{
vc->vc_sw->con_deinit(vc);
module_put(vc->vc_sw->owner);
}
int vc_allocate(unsigned int currcons) /* return 0 on success */ int vc_allocate(unsigned int currcons) /* return 0 on success */
{ {
struct vt_notifier_param param; struct vt_notifier_param param;
...@@ -1103,6 +1110,7 @@ int vc_allocate(unsigned int currcons) /* return 0 on success */ ...@@ -1103,6 +1110,7 @@ int vc_allocate(unsigned int currcons) /* return 0 on success */
return 0; return 0;
err_free: err_free:
visual_deinit(vc);
kfree(vc); kfree(vc);
vc_cons[currcons].d = NULL; vc_cons[currcons].d = NULL;
return -ENOMEM; return -ENOMEM;
...@@ -1331,9 +1339,8 @@ struct vc_data *vc_deallocate(unsigned int currcons) ...@@ -1331,9 +1339,8 @@ struct vc_data *vc_deallocate(unsigned int currcons)
param.vc = vc = vc_cons[currcons].d; param.vc = vc = vc_cons[currcons].d;
atomic_notifier_call_chain(&vt_notifier_list, VT_DEALLOCATE, &param); atomic_notifier_call_chain(&vt_notifier_list, VT_DEALLOCATE, &param);
vcs_remove_sysfs(currcons); vcs_remove_sysfs(currcons);
vc->vc_sw->con_deinit(vc); visual_deinit(vc);
put_pid(vc->vt_pid); put_pid(vc->vt_pid);
module_put(vc->vc_sw->owner);
vc_uniscr_set(vc, NULL); vc_uniscr_set(vc, NULL);
kfree(vc->vc_screenbuf); kfree(vc->vc_screenbuf);
vc_cons[currcons].d = NULL; vc_cons[currcons].d = NULL;
......
...@@ -1248,7 +1248,7 @@ static void fbcon_deinit(struct vc_data *vc) ...@@ -1248,7 +1248,7 @@ static void fbcon_deinit(struct vc_data *vc)
if (free_font) if (free_font)
vc->vc_font.data = NULL; vc->vc_font.data = NULL;
if (vc->vc_hi_font_mask) if (vc->vc_hi_font_mask && vc->vc_screenbuf)
set_vc_hi_font(vc, false); set_vc_hi_font(vc, false);
if (!con_is_bound(&fb_con)) if (!con_is_bound(&fb_con))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment