History

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

Linus Torvalds committed 7 years ago

Commit dbde71d2 parents e49c854 a1ad1cc6 files · +22 −6Browse files

Unified · Split

6 files
  1. drivers/tty/serial/imx.c +0 −1
  2. drivers/tty/serial/max310x.c +1 −1
  3. drivers/tty/serial/msm_serial.c +4 −1
  4. drivers/tty/serial/sh-sci.c +7 −0
  5. drivers/tty/vt/vt.c +9 −2
  6. drivers/video/fbdev/core/fbcon.c +1 −1
drivers/tty/serial/imx.c+0−1
@@ -1165,7 +1165,6 @@ static void imx_uart_clear_rx_errors(struct imx_port *sport) · 1164 unmodified lines
11651165 sport->port.icount.buf_overrun++;
11661166 tty_flip_buffer_push(port);
11671167 } else {
1168− dev_err(sport->port.dev, "DMA transaction error.\n");
11691168 if (usr1 & USR1_FRAMERR) {
11701169 sport->port.icount.frame++;
11711170 imx_uart_writel(sport, USR1_FRAMERR, USR1);
drivers/tty/serial/max310x.c+1−1
@@ -581,7 +581,7 @@ static int max310x_set_ref_clk(struct device *dev, struct max310x_port *s, · 580 unmodified lines
581581 }
582582
583583 /* 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);
585585
586586 /* Configure PLL */
587587 if (pllcfg) {
drivers/tty/serial/msm_serial.c+4−1
@@ -860,6 +860,7 @@ static void msm_handle_tx(struct uart_port *port) · 859 unmodified lines
860860 struct circ_buf *xmit = &msm_port->uart.state->xmit;
861861 struct msm_dma *dma = &msm_port->tx_dma;
862862 unsigned int pio_count, dma_count, dma_min;
863+ char buf[4] = { 0 };
863864 void __iomem *tf;
864865 int err = 0;
865866
@@ -869,10 +870,12 @@ static void msm_handle_tx(struct uart_port *port) · 3 unmodified lines
869870 else
870871 tf = port->membase + UART_TF;
871872
873+ buf[0] = port->x_char;
874+
872875 if (msm_port->is_uartdm)
873876 msm_reset_dm_count(port, 1);
874877
875− iowrite8_rep(tf, &port->x_char, 1);
878+ iowrite32_rep(tf, buf, 1);
876879 port->icount.tx++;
877880 port->x_char = 0;
878881 return;
drivers/tty/serial/sh-sci.c+7−0
@@ -1557,6 +1557,13 @@ static void sci_request_dma(struct uart_port *port) · 1556 unmodified lines
15571557
15581558 dev_dbg(port->dev, "%s: port %d\n", __func__, port->line);
15591559
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+
15601567 if (!port->dev->of_node)
15611568 return;
15621569
drivers/tty/vt/vt.c+9−2
@@ -1056,6 +1056,13 @@ static void visual_init(struct vc_data *vc, int num, int init) · 1055 unmodified lines
10561056 vc->vc_screenbuf_size = vc->vc_rows * vc->vc_size_row;
10571057 }
10581058
1059+
1060+static void visual_deinit(struct vc_data *vc)
1061+{
1062+ vc->vc_sw->con_deinit(vc);
1063+ module_put(vc->vc_sw->owner);
1064+}
1065+
10591066 int vc_allocate(unsigned int currcons) /* return 0 on success */
10601067 {
10611068 struct vt_notifier_param param;
@@ -1103,6 +1110,7 @@ int vc_allocate(unsigned int currcons) /* return 0 on success */ · 41 unmodified lines
11031110
11041111 return 0;
11051112 err_free:
1113+ visual_deinit(vc);
11061114 kfree(vc);
11071115 vc_cons[currcons].d = NULL;
11081116 return -ENOMEM;
@@ -1331,9 +1339,8 @@ struct vc_data *vc_deallocate(unsigned int currcons) · 222 unmodified lines
13311339 param.vc = vc = vc_cons[currcons].d;
13321340 atomic_notifier_call_chain(&vt_notifier_list, VT_DEALLOCATE, &param);
13331341 vcs_remove_sysfs(currcons);
1334− vc->vc_sw->con_deinit(vc);
1342+ visual_deinit(vc);
13351343 put_pid(vc->vt_pid);
1336− module_put(vc->vc_sw->owner);
13371344 vc_uniscr_set(vc, NULL);
13381345 kfree(vc->vc_screenbuf);
13391346 vc_cons[currcons].d = NULL;
drivers/video/fbdev/core/fbcon.c+1−1
@@ -1248,7 +1248,7 @@ finished: · 1247 unmodified lines
12481248 if (free_font)
12491249 vc->vc_font.data = NULL;
12501250
1251− if (vc->vc_hi_font_mask)
1251+ if (vc->vc_hi_font_mask && vc->vc_screenbuf)
12521252 set_vc_hi_font(vc, false);
12531253
12541254 if (!con_is_bound(&fb_con))

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t