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

* 'tty-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6:
omap-serial: Allow IXON and IXOFF to be disabled.
TTY: serial, document ignoring of uart->ops->startup error
TTY: pty, fix pty counting
8250: Fix race condition in serial8250_backup_timeout().
serial/8250_pci: delete duplicate data definition
8250_pci: add support for Rosewill RC-305 4x serial port card
tty: Add "spi:" prefix for spi modalias
atmel_serial: fix atmel_default_console_device
serial: 8250_pnp: add Intermec CV60 touchscreen device
drivers/serial/ucc_uart.c: Fix compiler warning
pch_uart: Set PCIe bus number using probe parameter
serial: samsung: Fix build error

+57 -25
+15 -2
drivers/tty/pty.c
··· 446 446 int pty_limit = NR_UNIX98_PTY_DEFAULT; 447 447 static int pty_limit_min; 448 448 static int pty_limit_max = NR_UNIX98_PTY_MAX; 449 + static int tty_count; 449 450 static int pty_count; 451 + 452 + static inline void pty_inc_count(void) 453 + { 454 + pty_count = (++tty_count) / 2; 455 + } 456 + 457 + static inline void pty_dec_count(void) 458 + { 459 + pty_count = (--tty_count) / 2; 460 + } 450 461 451 462 static struct cdev ptmx_cdev; 452 463 ··· 553 542 554 543 static void pty_unix98_shutdown(struct tty_struct *tty) 555 544 { 545 + tty_driver_remove_tty(tty->driver, tty); 556 546 /* We have our own method as we don't use the tty index */ 557 547 kfree(tty->termios); 558 548 } ··· 600 588 */ 601 589 tty_driver_kref_get(driver); 602 590 tty->count++; 603 - pty_count++; 591 + pty_inc_count(); /* tty */ 592 + pty_inc_count(); /* tty->link */ 604 593 return 0; 605 594 err_free_mem: 606 595 deinitialize_tty_struct(o_tty); ··· 615 602 616 603 static void pty_unix98_remove(struct tty_driver *driver, struct tty_struct *tty) 617 604 { 618 - pty_count--; 605 + pty_dec_count(); 619 606 } 620 607 621 608 static const struct tty_operations ptm_unix98_ops = {
+5 -3
drivers/tty/serial/8250.c
··· 1819 1819 unsigned int iir, ier = 0, lsr; 1820 1820 unsigned long flags; 1821 1821 1822 + spin_lock_irqsave(&up->port.lock, flags); 1823 + 1822 1824 /* 1823 1825 * Must disable interrupts or else we risk racing with the interrupt 1824 1826 * based handler. ··· 1838 1836 * the "Diva" UART used on the management processor on many HP 1839 1837 * ia64 and parisc boxes. 1840 1838 */ 1841 - spin_lock_irqsave(&up->port.lock, flags); 1842 1839 lsr = serial_in(up, UART_LSR); 1843 1840 up->lsr_saved_flags |= lsr & LSR_SAVE_FLAGS; 1844 - spin_unlock_irqrestore(&up->port.lock, flags); 1845 1841 if ((iir & UART_IIR_NO_INT) && (up->ier & UART_IER_THRI) && 1846 1842 (!uart_circ_empty(&up->port.state->xmit) || up->port.x_char) && 1847 1843 (lsr & UART_LSR_THRE)) { ··· 1848 1848 } 1849 1849 1850 1850 if (!(iir & UART_IIR_NO_INT)) 1851 - serial8250_handle_port(up); 1851 + transmit_chars(up); 1852 1852 1853 1853 if (is_real_interrupt(up->port.irq)) 1854 1854 serial_out(up, UART_IER, ier); 1855 + 1856 + spin_unlock_irqrestore(&up->port.lock, flags); 1855 1857 1856 1858 /* Standard timer interval plus 0.2s to keep the port running */ 1857 1859 mod_timer(&up->timer,
+5 -6
drivers/tty/serial/8250_pci.c
··· 1599 1599 .device = 0x800D, 1600 1600 .init = pci_eg20t_init, 1601 1601 }, 1602 - { 1603 - .vendor = 0x10DB, 1604 - .device = 0x800D, 1605 - .init = pci_eg20t_init, 1606 - }, 1607 1602 /* 1608 1603 * Cronyx Omega PCI (PLX-chip based) 1609 1604 */ ··· 4016 4021 0, 0, pbn_NETMOS9900_2s_115200 }, 4017 4022 4018 4023 /* 4019 - * Best Connectivity PCI Multi I/O cards 4024 + * Best Connectivity and Rosewill PCI Multi I/O cards 4020 4025 */ 4021 4026 4022 4027 { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9865, 4023 4028 0xA000, 0x1000, 4024 4029 0, 0, pbn_b0_1_115200 }, 4030 + 4031 + { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9865, 4032 + 0xA000, 0x3002, 4033 + 0, 0, pbn_b0_bt_2_115200 }, 4025 4034 4026 4035 { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9865, 4027 4036 0xA000, 0x3004,
+3
drivers/tty/serial/8250_pnp.c
··· 109 109 /* IBM */ 110 110 /* IBM Thinkpad 701 Internal Modem Voice */ 111 111 { "IBM0033", 0 }, 112 + /* Intermec */ 113 + /* Intermec CV60 touchscreen port */ 114 + { "PNP4972", 0 }, 112 115 /* Intertex */ 113 116 /* Intertex 28k8 33k6 Voice EXT PnP */ 114 117 { "IXDC801", 0 },
+5 -3
drivers/tty/serial/atmel_serial.c
··· 1609 1609 static int __init atmel_console_init(void) 1610 1610 { 1611 1611 if (atmel_default_console_device) { 1612 - add_preferred_console(ATMEL_DEVICENAME, 1613 - atmel_default_console_device->id, NULL); 1614 - atmel_init_port(&atmel_ports[atmel_default_console_device->id], 1612 + struct atmel_uart_data *pdata = 1613 + atmel_default_console_device->dev.platform_data; 1614 + 1615 + add_preferred_console(ATMEL_DEVICENAME, pdata->num, NULL); 1616 + atmel_init_port(&atmel_ports[pdata->num], 1615 1617 atmel_default_console_device); 1616 1618 register_console(&atmel_console); 1617 1619 }
+1 -1
drivers/tty/serial/max3107-aava.c
··· 340 340 341 341 MODULE_DESCRIPTION("MAX3107 driver"); 342 342 MODULE_AUTHOR("Aavamobile"); 343 - MODULE_ALIAS("aava-max3107-spi"); 343 + MODULE_ALIAS("spi:aava-max3107"); 344 344 MODULE_LICENSE("GPL v2");
+1 -1
drivers/tty/serial/max3107.c
··· 1209 1209 1210 1210 MODULE_DESCRIPTION("MAX3107 driver"); 1211 1211 MODULE_AUTHOR("Aavamobile"); 1212 - MODULE_ALIAS("max3107-spi"); 1212 + MODULE_ALIAS("spi:max3107"); 1213 1213 MODULE_LICENSE("GPL v2");
+1 -1
drivers/tty/serial/mrst_max3110.c
··· 917 917 module_exit(serial_m3110_exit); 918 918 919 919 MODULE_LICENSE("GPL v2"); 920 - MODULE_ALIAS("max3110-uart"); 920 + MODULE_ALIAS("spi:max3110-uart");
+1 -2
drivers/tty/serial/omap-serial.c
··· 806 806 807 807 serial_omap_set_mctrl(&up->port, up->port.mctrl); 808 808 /* Software Flow Control Configuration */ 809 - if (termios->c_iflag & (IXON | IXOFF)) 810 - serial_omap_configure_xonxoff(up, termios); 809 + serial_omap_configure_xonxoff(up, termios); 811 810 812 811 spin_unlock_irqrestore(&up->port.lock, flags); 813 812 dev_dbg(up->port.dev, "serial_omap_set_termios+%d\n", up->pdev->id);
+2 -1
drivers/tty/serial/pch_uart.c
··· 598 598 dma_cap_zero(mask); 599 599 dma_cap_set(DMA_SLAVE, mask); 600 600 601 - dma_dev = pci_get_bus_and_slot(2, PCI_DEVFN(0xa, 0)); /* Get DMA's dev 601 + dma_dev = pci_get_bus_and_slot(priv->pdev->bus->number, 602 + PCI_DEVFN(0xa, 0)); /* Get DMA's dev 602 603 information */ 603 604 /* Set Tx DMA */ 604 605 param = &priv->param_tx;
+6 -2
drivers/tty/serial/samsung.c
··· 1225 1225 .suspend = s3c24xx_serial_suspend, 1226 1226 .resume = s3c24xx_serial_resume, 1227 1227 }; 1228 + #define SERIAL_SAMSUNG_PM_OPS (&s3c24xx_serial_pm_ops) 1229 + 1228 1230 #else /* !CONFIG_PM_SLEEP */ 1229 - #define s3c24xx_serial_pm_ops NULL 1231 + 1232 + #define SERIAL_SAMSUNG_PM_OPS NULL 1230 1233 #endif /* CONFIG_PM_SLEEP */ 1231 1234 1232 1235 int s3c24xx_serial_init(struct platform_driver *drv, 1233 1236 struct s3c24xx_uart_info *info) 1234 1237 { 1235 1238 dbg("s3c24xx_serial_init(%p,%p)\n", drv, info); 1236 - drv->driver.pm = &s3c24xx_serial_pm_ops; 1239 + 1240 + drv->driver.pm = SERIAL_SAMSUNG_PM_OPS; 1237 1241 1238 1242 return platform_driver_register(drv); 1239 1243 }
+5
drivers/tty/serial/serial_core.c
··· 200 200 clear_bit(TTY_IO_ERROR, &tty->flags); 201 201 } 202 202 203 + /* 204 + * This is to allow setserial on this port. People may want to set 205 + * port/irq/type and then reconfigure the port properly if it failed 206 + * now. 207 + */ 203 208 if (retval && capable(CAP_SYS_ADMIN)) 204 209 retval = 0; 205 210
+1 -1
drivers/tty/serial/ucc_uart.c
··· 235 235 return qe_port->bd_virt + (addr - qe_port->bd_dma_addr); 236 236 237 237 /* something nasty happened */ 238 - printk(KERN_ERR "%s: addr=%x\n", __func__, addr); 238 + printk(KERN_ERR "%s: addr=%llx\n", __func__, (u64)addr); 239 239 BUG(); 240 240 return NULL; 241 241 }
+1 -2
drivers/tty/tty_io.c
··· 1295 1295 * 1296 1296 * Locking: tty_mutex for now 1297 1297 */ 1298 - static void tty_driver_remove_tty(struct tty_driver *driver, 1299 - struct tty_struct *tty) 1298 + void tty_driver_remove_tty(struct tty_driver *driver, struct tty_struct *tty) 1300 1299 { 1301 1300 if (driver->ops->remove) 1302 1301 driver->ops->remove(driver, tty);
+2
include/linux/tty.h
··· 421 421 extern void tty_throttle(struct tty_struct *tty); 422 422 extern void tty_unthrottle(struct tty_struct *tty); 423 423 extern int tty_do_resize(struct tty_struct *tty, struct winsize *ws); 424 + extern void tty_driver_remove_tty(struct tty_driver *driver, 425 + struct tty_struct *tty); 424 426 extern void tty_shutdown(struct tty_struct *tty); 425 427 extern void tty_free_termios(struct tty_struct *tty); 426 428 extern int is_current_pgrp_orphaned(void);
+3
include/linux/tty_driver.h
··· 47 47 * 48 48 * This routine is called synchronously when a particular tty device 49 49 * is closed for the last time freeing up the resources. 50 + * Note that tty_shutdown() is not called if ops->shutdown is defined. 51 + * This means one is responsible to take care of calling ops->remove (e.g. 52 + * via tty_driver_remove_tty) and releasing tty->termios. 50 53 * 51 54 * 52 55 * void (*cleanup)(struct tty_struct * tty);