Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

Pull tty/serial fixes from Greg KH:
"Here are some small tty fixes for 4.20-rc2

One of these missed the original 4.19-final release, I missed that I
hadn't done a pull request for it as it was in linux-next and my
branch for a long time, that's my fault.

The others are small, fixing some reported issues and finally fixing
the termios mess for alpha so that glibc has a chance to implement
some missing functionality that has been pending for many years now.

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

* tag 'tty-4.20-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
serial: sh-sci: Fix could not remove dev_attr_rx_fifo_timeout
arch/alpha, termios: implement BOTHER, IBSHIFT and termios2
termios, tty/tty_baudrate.c: fix buffer overrun
vt: fix broken display when running aptitude
serial: sh-sci: Fix receive on SCIFA/SCIFB variants with DMA

+36 -8
+7 -1
arch/alpha/include/asm/termios.h
··· 73 73 }) 74 74 75 75 #define user_termios_to_kernel_termios(k, u) \ 76 - copy_from_user(k, u, sizeof(struct termios)) 76 + copy_from_user(k, u, sizeof(struct termios2)) 77 77 78 78 #define kernel_termios_to_user_termios(u, k) \ 79 + copy_to_user(u, k, sizeof(struct termios2)) 80 + 81 + #define user_termios_to_kernel_termios_1(k, u) \ 82 + copy_from_user(k, u, sizeof(struct termios)) 83 + 84 + #define kernel_termios_to_user_termios_1(u, k) \ 79 85 copy_to_user(u, k, sizeof(struct termios)) 80 86 81 87 #endif /* _ALPHA_TERMIOS_H */
+5
arch/alpha/include/uapi/asm/ioctls.h
··· 32 32 #define TCXONC _IO('t', 30) 33 33 #define TCFLSH _IO('t', 31) 34 34 35 + #define TCGETS2 _IOR('T', 42, struct termios2) 36 + #define TCSETS2 _IOW('T', 43, struct termios2) 37 + #define TCSETSW2 _IOW('T', 44, struct termios2) 38 + #define TCSETSF2 _IOW('T', 45, struct termios2) 39 + 35 40 #define TIOCSWINSZ _IOW('t', 103, struct winsize) 36 41 #define TIOCGWINSZ _IOR('t', 104, struct winsize) 37 42 #define TIOCSTART _IO('t', 110) /* start output, like ^Q */
+17
arch/alpha/include/uapi/asm/termbits.h
··· 26 26 speed_t c_ospeed; /* output speed */ 27 27 }; 28 28 29 + /* Alpha has identical termios and termios2 */ 30 + 31 + struct termios2 { 32 + tcflag_t c_iflag; /* input mode flags */ 33 + tcflag_t c_oflag; /* output mode flags */ 34 + tcflag_t c_cflag; /* control mode flags */ 35 + tcflag_t c_lflag; /* local mode flags */ 36 + cc_t c_cc[NCCS]; /* control characters */ 37 + cc_t c_line; /* line discipline (== c_cc[19]) */ 38 + speed_t c_ispeed; /* input speed */ 39 + speed_t c_ospeed; /* output speed */ 40 + }; 41 + 29 42 /* Alpha has matching termios and ktermios */ 30 43 31 44 struct ktermios { ··· 165 152 #define B3000000 00034 166 153 #define B3500000 00035 167 154 #define B4000000 00036 155 + #define BOTHER 00037 168 156 169 157 #define CSIZE 00001400 170 158 #define CS5 00000000 ··· 182 168 #define CLOCAL 00100000 183 169 #define CMSPAR 010000000000 /* mark or space (stick) parity */ 184 170 #define CRTSCTS 020000000000 /* flow control */ 171 + 172 + #define CIBAUD 07600000 173 + #define IBSHIFT 16 185 174 186 175 /* c_lflag bits */ 187 176 #define ISIG 0x00000080
+4 -4
drivers/tty/serial/sh-sci.c
··· 1614 1614 hrtimer_init(&s->rx_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); 1615 1615 s->rx_timer.function = rx_timer_fn; 1616 1616 1617 + s->chan_rx_saved = s->chan_rx = chan; 1618 + 1617 1619 if (port->type == PORT_SCIFA || port->type == PORT_SCIFB) 1618 1620 sci_submit_rx(s); 1619 - 1620 - s->chan_rx_saved = s->chan_rx = chan; 1621 1621 } 1622 1622 } 1623 1623 ··· 3102 3102 static int sci_remove(struct platform_device *dev) 3103 3103 { 3104 3104 struct sci_port *port = platform_get_drvdata(dev); 3105 + unsigned int type = port->port.type; /* uart_remove_... clears it */ 3105 3106 3106 3107 sci_ports_in_use &= ~BIT(port->port.line); 3107 3108 uart_remove_one_port(&sci_uart_driver, &port->port); ··· 3113 3112 sysfs_remove_file(&dev->dev.kobj, 3114 3113 &dev_attr_rx_fifo_trigger.attr); 3115 3114 } 3116 - if (port->port.type == PORT_SCIFA || port->port.type == PORT_SCIFB || 3117 - port->port.type == PORT_HSCIF) { 3115 + if (type == PORT_SCIFA || type == PORT_SCIFB || type == PORT_HSCIF) { 3118 3116 sysfs_remove_file(&dev->dev.kobj, 3119 3117 &dev_attr_rx_fifo_timeout.attr); 3120 3118 }
+2 -2
drivers/tty/tty_baudrate.c
··· 77 77 else 78 78 cbaud += 15; 79 79 } 80 - return baud_table[cbaud]; 80 + return cbaud >= n_baud_table ? 0 : baud_table[cbaud]; 81 81 } 82 82 EXPORT_SYMBOL(tty_termios_baud_rate); 83 83 ··· 113 113 else 114 114 cbaud += 15; 115 115 } 116 - return baud_table[cbaud]; 116 + return cbaud >= n_baud_table ? 0 : baud_table[cbaud]; 117 117 #else /* IBSHIFT */ 118 118 return tty_termios_baud_rate(termios); 119 119 #endif /* IBSHIFT */
+1 -1
drivers/tty/vt/vt.c
··· 1548 1548 scr_memsetw(start + offset, vc->vc_video_erase_char, 2 * count); 1549 1549 vc->vc_need_wrap = 0; 1550 1550 if (con_should_update(vc)) 1551 - do_update_region(vc, (unsigned long) start, count); 1551 + do_update_region(vc, (unsigned long)(start + offset), count); 1552 1552 } 1553 1553 1554 1554 static void csi_X(struct vc_data *vc, int vpar) /* erase the following vpar positions */