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