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

Pull tty/serial fixes from Greg KH:
"Here are some small TTY and serial driver fixes for 6.5-rc4 for some
reported problems. Included in here is:

- TIOCSTI fix for braille readers

- documentation fix for minor numbers

- MAINTAINERS update for new serial files in -rc1

- minor serial driver fixes for reported problems

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

* tag 'tty-6.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
serial: 8250_dw: Preserve original value of DLF register
tty: serial: sh-sci: Fix sleeping in atomic context
serial: sifive: Fix sifive_serial_console_setup() section
Documentation: devices.txt: reconcile serial/ucc_uart minor numers
MAINTAINERS: Update TTY layer for lists and recently added files
tty: n_gsm: fix UAF in gsm_cleanup_mux
TIOCSTI: always enable for CAP_SYS_ADMIN

+18 -8
+1 -1
Documentation/admin-guide/devices.txt
··· 2691 45 = /dev/ttyMM1 Marvell MPSC - port 1 (obsolete unused) 2692 46 = /dev/ttyCPM0 PPC CPM (SCC or SMC) - port 0 2693 ... 2694 - 47 = /dev/ttyCPM5 PPC CPM (SCC or SMC) - port 5 2695 50 = /dev/ttyIOC0 Altix serial card 2696 ... 2697 81 = /dev/ttyIOC31 Altix serial card
··· 2691 45 = /dev/ttyMM1 Marvell MPSC - port 1 (obsolete unused) 2692 46 = /dev/ttyCPM0 PPC CPM (SCC or SMC) - port 0 2693 ... 2694 + 49 = /dev/ttyCPM5 PPC CPM (SCC or SMC) - port 3 2695 50 = /dev/ttyIOC0 Altix serial card 2696 ... 2697 81 = /dev/ttyIOC31 Altix serial card
+6
MAINTAINERS
··· 21643 TTY LAYER 21644 M: Greg Kroah-Hartman <gregkh@linuxfoundation.org> 21645 M: Jiri Slaby <jirislaby@kernel.org> 21646 S: Supported 21647 T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git 21648 F: Documentation/driver-api/serial/ 21649 F: drivers/tty/ 21650 F: drivers/tty/serial/serial_core.c 21651 F: include/linux/selection.h 21652 F: include/linux/serial.h 21653 F: include/linux/serial_core.h
··· 21643 TTY LAYER 21644 M: Greg Kroah-Hartman <gregkh@linuxfoundation.org> 21645 M: Jiri Slaby <jirislaby@kernel.org> 21646 + L: linux-kernel@vger.kernel.org 21647 + L: linux-serial@vger.kernel.org 21648 S: Supported 21649 T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git 21650 F: Documentation/driver-api/serial/ 21651 F: drivers/tty/ 21652 + F: drivers/tty/serial/serial_base.h 21653 + F: drivers/tty/serial/serial_base_bus.c 21654 F: drivers/tty/serial/serial_core.c 21655 + F: drivers/tty/serial/serial_ctrl.c 21656 + F: drivers/tty/serial/serial_port.c 21657 F: include/linux/selection.h 21658 F: include/linux/serial.h 21659 F: include/linux/serial_core.h
+3 -1
drivers/tty/n_gsm.c
··· 3070 gsm->has_devices = false; 3071 } 3072 for (i = NUM_DLCI - 1; i >= 0; i--) 3073 - if (gsm->dlci[i]) 3074 gsm_dlci_release(gsm->dlci[i]); 3075 mutex_unlock(&gsm->mutex); 3076 /* Now wipe the queues */ 3077 tty_ldisc_flush(gsm->tty);
··· 3070 gsm->has_devices = false; 3071 } 3072 for (i = NUM_DLCI - 1; i >= 0; i--) 3073 + if (gsm->dlci[i]) { 3074 gsm_dlci_release(gsm->dlci[i]); 3075 + gsm->dlci[i] = NULL; 3076 + } 3077 mutex_unlock(&gsm->mutex); 3078 /* Now wipe the queues */ 3079 tty_ldisc_flush(gsm->tty);
+4 -2
drivers/tty/serial/8250/8250_dwlib.c
··· 244 struct dw8250_port_data *pd = p->private_data; 245 struct dw8250_data *data = to_dw8250_data(pd); 246 struct uart_8250_port *up = up_to_u8250p(p); 247 - u32 reg; 248 249 pd->hw_rs485_support = dw8250_detect_rs485_hw(p); 250 if (pd->hw_rs485_support) { ··· 270 dev_dbg(p->dev, "Designware UART version %c.%c%c\n", 271 (reg >> 24) & 0xff, (reg >> 16) & 0xff, (reg >> 8) & 0xff); 272 273 dw8250_writel_ext(p, DW_UART_DLF, ~0U); 274 reg = dw8250_readl_ext(p, DW_UART_DLF); 275 - dw8250_writel_ext(p, DW_UART_DLF, 0); 276 277 if (reg) { 278 pd->dlf_size = fls(reg);
··· 244 struct dw8250_port_data *pd = p->private_data; 245 struct dw8250_data *data = to_dw8250_data(pd); 246 struct uart_8250_port *up = up_to_u8250p(p); 247 + u32 reg, old_dlf; 248 249 pd->hw_rs485_support = dw8250_detect_rs485_hw(p); 250 if (pd->hw_rs485_support) { ··· 270 dev_dbg(p->dev, "Designware UART version %c.%c%c\n", 271 (reg >> 24) & 0xff, (reg >> 16) & 0xff, (reg >> 8) & 0xff); 272 273 + /* Preserve value written by firmware or bootloader */ 274 + old_dlf = dw8250_readl_ext(p, DW_UART_DLF); 275 dw8250_writel_ext(p, DW_UART_DLF, ~0U); 276 reg = dw8250_readl_ext(p, DW_UART_DLF); 277 + dw8250_writel_ext(p, DW_UART_DLF, old_dlf); 278 279 if (reg) { 280 pd->dlf_size = fls(reg);
+1 -1
drivers/tty/serial/sh-sci.c
··· 590 dma_submit_error(s->cookie_tx)) { 591 if (s->cfg->regtype == SCIx_RZ_SCIFA_REGTYPE) 592 /* Switch irq from SCIF to DMA */ 593 - disable_irq(s->irqs[SCIx_TXI_IRQ]); 594 595 s->cookie_tx = 0; 596 schedule_work(&s->work_tx);
··· 590 dma_submit_error(s->cookie_tx)) { 591 if (s->cfg->regtype == SCIx_RZ_SCIFA_REGTYPE) 592 /* Switch irq from SCIF to DMA */ 593 + disable_irq_nosync(s->irqs[SCIx_TXI_IRQ]); 594 595 s->cookie_tx = 0; 596 schedule_work(&s->work_tx);
+1 -1
drivers/tty/serial/sifive.c
··· 811 local_irq_restore(flags); 812 } 813 814 - static int __init sifive_serial_console_setup(struct console *co, char *options) 815 { 816 struct sifive_serial_port *ssp; 817 int baud = SIFIVE_DEFAULT_BAUD_RATE;
··· 811 local_irq_restore(flags); 812 } 813 814 + static int sifive_serial_console_setup(struct console *co, char *options) 815 { 816 struct sifive_serial_port *ssp; 817 int baud = SIFIVE_DEFAULT_BAUD_RATE;
+1 -1
drivers/tty/serial/ucc_uart.c
··· 59 /* #define LOOPBACK */ 60 61 /* The major and minor device numbers are defined in 62 - * http://www.lanana.org/docs/device-list/devices-2.6+.txt. For the QE 63 * UART, we have major number 204 and minor numbers 46 - 49, which are the 64 * same as for the CPM2. This decision was made because no Freescale part 65 * has both a CPM and a QE.
··· 59 /* #define LOOPBACK */ 60 61 /* The major and minor device numbers are defined in 62 + * Documentation/admin-guide/devices.txt. For the QE 63 * UART, we have major number 204 and minor numbers 46 - 49, which are the 64 * same as for the CPM2. This decision was made because no Freescale part 65 * has both a CPM and a QE.
+1 -1
drivers/tty/tty_io.c
··· 2285 char ch, mbz = 0; 2286 struct tty_ldisc *ld; 2287 2288 - if (!tty_legacy_tiocsti) 2289 return -EIO; 2290 2291 if ((current->signal->tty != tty) && !capable(CAP_SYS_ADMIN))
··· 2285 char ch, mbz = 0; 2286 struct tty_ldisc *ld; 2287 2288 + if (!tty_legacy_tiocsti && !capable(CAP_SYS_ADMIN)) 2289 return -EIO; 2290 2291 if ((current->signal->tty != tty) && !capable(CAP_SYS_ADMIN))