kernel: bump 5.10 to 5.10.67
[openwrt/openwrt.git] / target / linux / mediatek / patches-5.10 / 410-bt-mtk-serial-fix.patch
1 --- a/drivers/tty/serial/8250/8250.h
2 +++ b/drivers/tty/serial/8250/8250.h
3 @@ -82,6 +82,7 @@ struct serial8250_config {
4 #define UART_CAP_MINI (1 << 17) /* Mini UART on BCM283X family lacks:
5 * STOP PARITY EPAR SPAR WLEN5 WLEN6
6 */
7 +#define UART_CAP_NMOD (1 << 18) /* UART doesn't do termios */
8
9 #define UART_BUG_QUOT (1 << 0) /* UART has buggy quot LSB */
10 #define UART_BUG_TXEN (1 << 1) /* UART has buggy TX IIR status */
11 --- a/drivers/tty/serial/8250/8250_port.c
12 +++ b/drivers/tty/serial/8250/8250_port.c
13 @@ -288,7 +288,7 @@ static const struct serial8250_config ua
14 .tx_loadsz = 16,
15 .fcr = UART_FCR_ENABLE_FIFO |
16 UART_FCR_CLEAR_RCVR | UART_FCR_CLEAR_XMIT,
17 - .flags = UART_CAP_FIFO,
18 + .flags = UART_CAP_FIFO | UART_CAP_NMOD,
19 },
20 [PORT_NPCM] = {
21 .name = "Nuvoton 16550",
22 @@ -2719,6 +2719,11 @@ serial8250_do_set_termios(struct uart_po
23 unsigned long flags;
24 unsigned int baud, quot, frac = 0;
25
26 + if (up->capabilities & UART_CAP_NMOD) {
27 + termios->c_cflag = 0;
28 + return;
29 + }
30 +
31 if (up->capabilities & UART_CAP_MINI) {
32 termios->c_cflag &= ~(CSTOPB | PARENB | PARODD | CMSPAR);
33 if ((termios->c_cflag & CSIZE) == CS5 ||