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.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

Pull tty/serial fixes from Greg KH:
"Here are a few small tty/serial driver fixes for 4.4-rc2 that resolve
some reported problems.

All have been in linux-next, full details are in the shortlog below"

* tag 'tty-4.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
serial: export fsl8250_handle_irq
serial: 8250_mid: Add missing dependency
tty: audit: Fix audit source
serial: etraxfs-uart: Fix crash
serial: fsl_lpuart: Fix earlycon support
bcm63xx_uart: Use the device name when registering an interrupt
tty: Fix direct use of tty buffer work
tty: Fix tty_send_xchar() lock order inversion

+15 -13
+1 -1
drivers/tty/n_tty.c
··· 169 169 { 170 170 struct n_tty_data *ldata = tty->disc_data; 171 171 172 - tty_audit_add_data(tty, to, n, ldata->icanon); 172 + tty_audit_add_data(tty, from, n, ldata->icanon); 173 173 return copy_to_user(to, from, n); 174 174 } 175 175
+1
drivers/tty/serial/8250/8250_fsl.c
··· 60 60 spin_unlock_irqrestore(&up->port.lock, flags); 61 61 return 1; 62 62 } 63 + EXPORT_SYMBOL_GPL(fsl8250_handle_irq);
+1
drivers/tty/serial/8250/Kconfig
··· 373 373 depends on SERIAL_8250 && PCI 374 374 select HSU_DMA if SERIAL_8250_DMA 375 375 select HSU_DMA_PCI if X86_INTEL_MID 376 + select RATIONAL 376 377 help 377 378 Selecting this option will enable handling of the extra features 378 379 present on the UART found on Intel Medfield SOC and various other
+1 -1
drivers/tty/serial/Kconfig
··· 1539 1539 tristate "Freescale lpuart serial port support" 1540 1540 depends on HAS_DMA 1541 1541 select SERIAL_CORE 1542 - select SERIAL_EARLYCON 1543 1542 help 1544 1543 Support for the on-chip lpuart on some Freescale SOCs. 1545 1544 ··· 1546 1547 bool "Console on Freescale lpuart serial port" 1547 1548 depends on SERIAL_FSL_LPUART=y 1548 1549 select SERIAL_CORE_CONSOLE 1550 + select SERIAL_EARLYCON 1549 1551 help 1550 1552 If you have enabled the lpuart serial port on the Freescale SoCs, 1551 1553 you can make it the console by answering Y to this option.
+1 -1
drivers/tty/serial/bcm63xx_uart.c
··· 474 474 475 475 /* register irq and enable rx interrupts */ 476 476 ret = request_irq(port->irq, bcm_uart_interrupt, 0, 477 - bcm_uart_type(port), port); 477 + dev_name(port->dev), port); 478 478 if (ret) 479 479 return ret; 480 480 bcm_uart_writel(port, UART_RX_INT_MASK, UART_IR_REG);
+1 -1
drivers/tty/serial/etraxfs-uart.c
··· 894 894 up->regi_ser = of_iomap(np, 0); 895 895 up->port.dev = &pdev->dev; 896 896 897 - up->gpios = mctrl_gpio_init(&pdev->dev, 0); 897 + up->gpios = mctrl_gpio_init_noauto(&pdev->dev, 0); 898 898 if (IS_ERR(up->gpios)) 899 899 return PTR_ERR(up->gpios); 900 900
+1 -1
drivers/tty/tty_audit.c
··· 265 265 * 266 266 * Audit @data of @size from @tty, if necessary. 267 267 */ 268 - void tty_audit_add_data(struct tty_struct *tty, unsigned char *data, 268 + void tty_audit_add_data(struct tty_struct *tty, const void *data, 269 269 size_t size, unsigned icanon) 270 270 { 271 271 struct tty_audit_buf *buf;
+4
drivers/tty/tty_io.c
··· 1282 1282 int was_stopped = tty->stopped; 1283 1283 1284 1284 if (tty->ops->send_xchar) { 1285 + down_read(&tty->termios_rwsem); 1285 1286 tty->ops->send_xchar(tty, ch); 1287 + up_read(&tty->termios_rwsem); 1286 1288 return 0; 1287 1289 } 1288 1290 1289 1291 if (tty_write_lock(tty, 0) < 0) 1290 1292 return -ERESTARTSYS; 1291 1293 1294 + down_read(&tty->termios_rwsem); 1292 1295 if (was_stopped) 1293 1296 start_tty(tty); 1294 1297 tty->ops->write(tty, &ch, 1); 1295 1298 if (was_stopped) 1296 1299 stop_tty(tty); 1300 + up_read(&tty->termios_rwsem); 1297 1301 tty_write_unlock(tty); 1298 1302 return 0; 1299 1303 }
-4
drivers/tty/tty_ioctl.c
··· 1147 1147 spin_unlock_irq(&tty->flow_lock); 1148 1148 break; 1149 1149 case TCIOFF: 1150 - down_read(&tty->termios_rwsem); 1151 1150 if (STOP_CHAR(tty) != __DISABLED_CHAR) 1152 1151 retval = tty_send_xchar(tty, STOP_CHAR(tty)); 1153 - up_read(&tty->termios_rwsem); 1154 1152 break; 1155 1153 case TCION: 1156 - down_read(&tty->termios_rwsem); 1157 1154 if (START_CHAR(tty) != __DISABLED_CHAR) 1158 1155 retval = tty_send_xchar(tty, START_CHAR(tty)); 1159 - up_read(&tty->termios_rwsem); 1160 1156 break; 1161 1157 default: 1162 1158 return -EINVAL;
+1 -1
drivers/tty/tty_ldisc.c
··· 592 592 593 593 /* Restart the work queue in case no characters kick it off. Safe if 594 594 already running */ 595 - schedule_work(&tty->port->buf.work); 595 + tty_buffer_restart_work(tty->port); 596 596 597 597 tty_unlock(tty); 598 598 return retval;
+3 -3
include/linux/tty.h
··· 607 607 608 608 /* tty_audit.c */ 609 609 #ifdef CONFIG_AUDIT 610 - extern void tty_audit_add_data(struct tty_struct *tty, unsigned char *data, 610 + extern void tty_audit_add_data(struct tty_struct *tty, const void *data, 611 611 size_t size, unsigned icanon); 612 612 extern void tty_audit_exit(void); 613 613 extern void tty_audit_fork(struct signal_struct *sig); ··· 615 615 extern void tty_audit_push(struct tty_struct *tty); 616 616 extern int tty_audit_push_current(void); 617 617 #else 618 - static inline void tty_audit_add_data(struct tty_struct *tty, 619 - unsigned char *data, size_t size, unsigned icanon) 618 + static inline void tty_audit_add_data(struct tty_struct *tty, const void *data, 619 + size_t size, unsigned icanon) 620 620 { 621 621 } 622 622 static inline void tty_audit_tiocsti(struct tty_struct *tty, char ch)