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
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);
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
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) {
drivers/tty/serial/msm_serial.c+4−1
@@ -860,6 +860,7 @@ static void msm_handle_tx(struct uart_port *port) · 859 unmodified lines
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) · 3 unmodified lines
869 else870 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;
drivers/tty/serial/sh-sci.c+7−0
@@ -1557,6 +1557,13 @@ static void sci_request_dma(struct uart_port *port) · 1556 unmodified lines
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
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
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 */ · 41 unmodified lines
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) · 222 unmodified lines
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;
drivers/video/fbdev/core/fbcon.c+1−1
@@ -1248,7 +1248,7 @@ finished: · 1247 unmodified lines
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))

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