aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-05-31 11:28:44 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2019-05-31 11:28:44 -0400
commitdbde71df810c62e72e2aa6d88a0686a6092956cd (patch)
tree31863f62bcfbd03fd9f519535cfbaa71c629c658 /drivers
parente49c8547fb940982a04c98377bf5468a3b4a3fd4 (diff)
parenta1ad1cc9704f64c169261a76e1aee1cf1ae51832 (diff)
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
Diffstat (limited to 'drivers')
-rw-r--r--drivers/tty/serial/imx.c1
-rw-r--r--drivers/tty/serial/max310x.c2
-rw-r--r--drivers/tty/serial/msm_serial.c5
-rw-r--r--drivers/tty/serial/sh-sci.c7
-rw-r--r--drivers/tty/vt/vt.c11
-rw-r--r--drivers/video/fbdev/core/fbcon.c2
6 files changed, 22 insertions, 6 deletions
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index dff75dc94731..8b752e895053 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -1165,7 +1165,6 @@ static void imx_uart_clear_rx_errors(struct imx_port *sport)
1165 sport->port.icount.buf_overrun++; 1165 sport->port.icount.buf_overrun++;
1166 tty_flip_buffer_push(port); 1166 tty_flip_buffer_push(port);
1167 } else { 1167 } else {
1168 dev_err(sport->port.dev, "DMA transaction error.\n");
1169 if (usr1 & USR1_FRAMERR) { 1168 if (usr1 & USR1_FRAMERR) {
1170 sport->port.icount.frame++; 1169 sport->port.icount.frame++;
1171 imx_uart_writel(sport, USR1_FRAMERR, USR1); 1170 imx_uart_writel(sport, USR1_FRAMERR, USR1);
diff --git a/drivers/tty/serial/max310x.c b/drivers/tty/serial/max310x.c
index 450ba6d7996c..e5aebbf5f302 100644
--- a/drivers/tty/serial/max310x.c
+++ b/drivers/tty/serial/max310x.c
@@ -581,7 +581,7 @@ static int max310x_set_ref_clk(struct device *dev, struct max310x_port *s,
581 } 581 }
582 582
583 /* Configure clock source */ 583 /* Configure clock source */
584 clksrc = xtal ? MAX310X_CLKSRC_CRYST_BIT : MAX310X_CLKSRC_EXTCLK_BIT; 584 clksrc = MAX310X_CLKSRC_EXTCLK_BIT | (xtal ? MAX310X_CLKSRC_CRYST_BIT : 0);
585 585
586 /* Configure PLL */ 586 /* Configure PLL */
587 if (pllcfg) { 587 if (pllcfg) {
diff --git a/drivers/tty/serial/msm_serial.c b/drivers/tty/serial/msm_serial.c
index 109096033bb1..23833ad952ba 100644
--- a/drivers/tty/serial/msm_serial.c
+++ b/drivers/tty/serial/msm_serial.c
@@ -860,6 +860,7 @@ static void msm_handle_tx(struct uart_port *port)
860 struct circ_buf *xmit = &msm_port->uart.state->xmit; 860 struct circ_buf *xmit = &msm_port->uart.state->xmit;
861 struct msm_dma *dma = &msm_port->tx_dma; 861 struct msm_dma *dma = &msm_port->tx_dma;
862 unsigned int pio_count, dma_count, dma_min; 862 unsigned int pio_count, dma_count, dma_min;
863 char buf[4] = { 0 };
863 void __iomem *tf; 864 void __iomem *tf;
864 int err = 0; 865 int err = 0;
865 866
@@ -869,10 +870,12 @@ static void msm_handle_tx(struct uart_port *port)
869 else 870 else
870 tf = port->membase + UART_TF; 871 tf = port->membase + UART_TF;
871 872
873 buf[0] = port->x_char;
874
872 if (msm_port->is_uartdm) 875 if (msm_port->is_uartdm)
873 msm_reset_dm_count(port, 1); 876 msm_reset_dm_count(port, 1);
874 877
875 iowrite8_rep(tf, &port->x_char, 1); 878 iowrite32_rep(tf, buf, 1);
876 port->icount.tx++; 879 port->icount.tx++;
877 port->x_char = 0; 880 port->x_char = 0;
878 return; 881 return;
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index 3cd139752d3f..abc705716aa0 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -1557,6 +1557,13 @@ static void sci_request_dma(struct uart_port *port)
1557 1557
1558 dev_dbg(port->dev, "%s: port %d\n", __func__, port->line); 1558 dev_dbg(port->dev, "%s: port %d\n", __func__, port->line);
1559 1559
1560 /*
1561 * DMA on console may interfere with Kernel log messages which use
1562 * plain putchar(). So, simply don't use it with a console.
1563 */
1564 if (uart_console(port))
1565 return;
1566
1560 if (!port->dev->of_node) 1567 if (!port->dev->of_node)
1561 return; 1568 return;
1562 1569
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index fdd12f8c3deb..5c0ca1c24b6f 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -1056,6 +1056,13 @@ static void visual_init(struct vc_data *vc, int num, int init)
1056 vc->vc_screenbuf_size = vc->vc_rows * vc->vc_size_row; 1056 vc->vc_screenbuf_size = vc->vc_rows * vc->vc_size_row;
1057} 1057}
1058 1058
1059
1060static void visual_deinit(struct vc_data *vc)
1061{
1062 vc->vc_sw->con_deinit(vc);
1063 module_put(vc->vc_sw->owner);
1064}
1065
1059int vc_allocate(unsigned int currcons) /* return 0 on success */ 1066int vc_allocate(unsigned int currcons) /* return 0 on success */
1060{ 1067{
1061 struct vt_notifier_param param; 1068 struct vt_notifier_param param;
@@ -1103,6 +1110,7 @@ int vc_allocate(unsigned int currcons) /* return 0 on success */
1103 1110
1104 return 0; 1111 return 0;
1105err_free: 1112err_free:
1113 visual_deinit(vc);
1106 kfree(vc); 1114 kfree(vc);
1107 vc_cons[currcons].d = NULL; 1115 vc_cons[currcons].d = NULL;
1108 return -ENOMEM; 1116 return -ENOMEM;
@@ -1331,9 +1339,8 @@ struct vc_data *vc_deallocate(unsigned int currcons)
1331 param.vc = vc = vc_cons[currcons].d; 1339 param.vc = vc = vc_cons[currcons].d;
1332 atomic_notifier_call_chain(&vt_notifier_list, VT_DEALLOCATE, &param); 1340 atomic_notifier_call_chain(&vt_notifier_list, VT_DEALLOCATE, &param);
1333 vcs_remove_sysfs(currcons); 1341 vcs_remove_sysfs(currcons);
1334 vc->vc_sw->con_deinit(vc); 1342 visual_deinit(vc);
1335 put_pid(vc->vt_pid); 1343 put_pid(vc->vt_pid);
1336 module_put(vc->vc_sw->owner);
1337 vc_uniscr_set(vc, NULL); 1344 vc_uniscr_set(vc, NULL);
1338 kfree(vc->vc_screenbuf); 1345 kfree(vc->vc_screenbuf);
1339 vc_cons[currcons].d = NULL; 1346 vc_cons[currcons].d = NULL;
diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c
index 786f9aab55df..a9c69ae30878 100644
--- a/drivers/video/fbdev/core/fbcon.c
+++ b/drivers/video/fbdev/core/fbcon.c
@@ -1248,7 +1248,7 @@ finished:
1248 if (free_font) 1248 if (free_font)
1249 vc->vc_font.data = NULL; 1249 vc->vc_font.data = NULL;
1250 1250
1251 if (vc->vc_hi_font_mask) 1251 if (vc->vc_hi_font_mask && vc->vc_screenbuf)
1252 set_vc_hi_font(vc, false); 1252 set_vc_hi_font(vc, false);
1253 1253
1254 if (!con_is_bound(&fb_con)) 1254 if (!con_is_bound(&fb_con))