diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-08-26 16:06:06 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-08-26 16:06:06 -0400 |
| commit | efe45ab1ee04551936f8343bd4ca1ff02ffc23bb (patch) | |
| tree | f2bc88ccd5a01770b6a8efe3f6023068179f610b | |
| parent | 3ab47029d91993745212624e49d16a75abc8f207 (diff) | |
| parent | b280a97d1caf6fe1d38b51ebb31219391f5ad1a0 (diff) | |
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
| -rw-r--r-- | drivers/tty/pty.c | 17 | ||||
| -rw-r--r-- | drivers/tty/serial/8250.c | 8 | ||||
| -rw-r--r-- | drivers/tty/serial/8250_pci.c | 11 | ||||
| -rw-r--r-- | drivers/tty/serial/8250_pnp.c | 3 | ||||
| -rw-r--r-- | drivers/tty/serial/atmel_serial.c | 8 | ||||
| -rw-r--r-- | drivers/tty/serial/max3107-aava.c | 2 | ||||
| -rw-r--r-- | drivers/tty/serial/max3107.c | 2 | ||||
| -rw-r--r-- | drivers/tty/serial/mrst_max3110.c | 2 | ||||
| -rw-r--r-- | drivers/tty/serial/omap-serial.c | 3 | ||||
| -rw-r--r-- | drivers/tty/serial/pch_uart.c | 3 | ||||
| -rw-r--r-- | drivers/tty/serial/samsung.c | 8 | ||||
| -rw-r--r-- | drivers/tty/serial/serial_core.c | 5 | ||||
| -rw-r--r-- | drivers/tty/serial/ucc_uart.c | 2 | ||||
| -rw-r--r-- | drivers/tty/tty_io.c | 3 | ||||
| -rw-r--r-- | include/linux/tty.h | 2 | ||||
| -rw-r--r-- | include/linux/tty_driver.h | 3 |
16 files changed, 57 insertions, 25 deletions
diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c index 98b6e3bdb000..e809e9d4683c 100644 --- a/drivers/tty/pty.c +++ b/drivers/tty/pty.c | |||
| @@ -446,8 +446,19 @@ static inline void legacy_pty_init(void) { } | |||
| 446 | int pty_limit = NR_UNIX98_PTY_DEFAULT; | 446 | int pty_limit = NR_UNIX98_PTY_DEFAULT; |
| 447 | static int pty_limit_min; | 447 | static int pty_limit_min; |
| 448 | static int pty_limit_max = NR_UNIX98_PTY_MAX; | 448 | static int pty_limit_max = NR_UNIX98_PTY_MAX; |
| 449 | static int tty_count; | ||
| 449 | static int pty_count; | 450 | static int pty_count; |
| 450 | 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 | } | ||
| 461 | |||
| 451 | static struct cdev ptmx_cdev; | 462 | static struct cdev ptmx_cdev; |
| 452 | 463 | ||
| 453 | static struct ctl_table pty_table[] = { | 464 | static struct ctl_table pty_table[] = { |
| @@ -542,6 +553,7 @@ static struct tty_struct *pts_unix98_lookup(struct tty_driver *driver, | |||
| 542 | 553 | ||
| 543 | static void pty_unix98_shutdown(struct tty_struct *tty) | 554 | static void pty_unix98_shutdown(struct tty_struct *tty) |
| 544 | { | 555 | { |
| 556 | tty_driver_remove_tty(tty->driver, tty); | ||
| 545 | /* We have our own method as we don't use the tty index */ | 557 | /* We have our own method as we don't use the tty index */ |
| 546 | kfree(tty->termios); | 558 | kfree(tty->termios); |
| 547 | } | 559 | } |
| @@ -588,7 +600,8 @@ static int pty_unix98_install(struct tty_driver *driver, struct tty_struct *tty) | |||
| 588 | */ | 600 | */ |
| 589 | tty_driver_kref_get(driver); | 601 | tty_driver_kref_get(driver); |
| 590 | tty->count++; | 602 | tty->count++; |
| 591 | pty_count++; | 603 | pty_inc_count(); /* tty */ |
| 604 | pty_inc_count(); /* tty->link */ | ||
| 592 | return 0; | 605 | return 0; |
| 593 | err_free_mem: | 606 | err_free_mem: |
| 594 | deinitialize_tty_struct(o_tty); | 607 | deinitialize_tty_struct(o_tty); |
| @@ -602,7 +615,7 @@ err_free_tty: | |||
| 602 | 615 | ||
| 603 | static void pty_unix98_remove(struct tty_driver *driver, struct tty_struct *tty) | 616 | static void pty_unix98_remove(struct tty_driver *driver, struct tty_struct *tty) |
| 604 | { | 617 | { |
| 605 | pty_count--; | 618 | pty_dec_count(); |
| 606 | } | 619 | } |
| 607 | 620 | ||
| 608 | static const struct tty_operations ptm_unix98_ops = { | 621 | static const struct tty_operations ptm_unix98_ops = { |
diff --git a/drivers/tty/serial/8250.c b/drivers/tty/serial/8250.c index f2dfec82faf8..7f50999eebc2 100644 --- a/drivers/tty/serial/8250.c +++ b/drivers/tty/serial/8250.c | |||
| @@ -1819,6 +1819,8 @@ static void serial8250_backup_timeout(unsigned long data) | |||
| 1819 | unsigned int iir, ier = 0, lsr; | 1819 | unsigned int iir, ier = 0, lsr; |
| 1820 | unsigned long flags; | 1820 | unsigned long flags; |
| 1821 | 1821 | ||
| 1822 | spin_lock_irqsave(&up->port.lock, flags); | ||
| 1823 | |||
| 1822 | /* | 1824 | /* |
| 1823 | * Must disable interrupts or else we risk racing with the interrupt | 1825 | * Must disable interrupts or else we risk racing with the interrupt |
| 1824 | * based handler. | 1826 | * based handler. |
| @@ -1836,10 +1838,8 @@ static void serial8250_backup_timeout(unsigned long data) | |||
| 1836 | * the "Diva" UART used on the management processor on many HP | 1838 | * the "Diva" UART used on the management processor on many HP |
| 1837 | * ia64 and parisc boxes. | 1839 | * ia64 and parisc boxes. |
| 1838 | */ | 1840 | */ |
| 1839 | spin_lock_irqsave(&up->port.lock, flags); | ||
| 1840 | lsr = serial_in(up, UART_LSR); | 1841 | lsr = serial_in(up, UART_LSR); |
| 1841 | up->lsr_saved_flags |= lsr & LSR_SAVE_FLAGS; | 1842 | up->lsr_saved_flags |= lsr & LSR_SAVE_FLAGS; |
| 1842 | spin_unlock_irqrestore(&up->port.lock, flags); | ||
| 1843 | if ((iir & UART_IIR_NO_INT) && (up->ier & UART_IER_THRI) && | 1843 | if ((iir & UART_IIR_NO_INT) && (up->ier & UART_IER_THRI) && |
| 1844 | (!uart_circ_empty(&up->port.state->xmit) || up->port.x_char) && | 1844 | (!uart_circ_empty(&up->port.state->xmit) || up->port.x_char) && |
| 1845 | (lsr & UART_LSR_THRE)) { | 1845 | (lsr & UART_LSR_THRE)) { |
| @@ -1848,11 +1848,13 @@ static void serial8250_backup_timeout(unsigned long data) | |||
| 1848 | } | 1848 | } |
| 1849 | 1849 | ||
| 1850 | if (!(iir & UART_IIR_NO_INT)) | 1850 | if (!(iir & UART_IIR_NO_INT)) |
| 1851 | serial8250_handle_port(up); | 1851 | transmit_chars(up); |
| 1852 | 1852 | ||
| 1853 | if (is_real_interrupt(up->port.irq)) | 1853 | if (is_real_interrupt(up->port.irq)) |
| 1854 | serial_out(up, UART_IER, ier); | 1854 | serial_out(up, UART_IER, ier); |
| 1855 | 1855 | ||
| 1856 | spin_unlock_irqrestore(&up->port.lock, flags); | ||
| 1857 | |||
| 1856 | /* Standard timer interval plus 0.2s to keep the port running */ | 1858 | /* Standard timer interval plus 0.2s to keep the port running */ |
| 1857 | mod_timer(&up->timer, | 1859 | mod_timer(&up->timer, |
| 1858 | jiffies + uart_poll_timeout(&up->port) + HZ / 5); | 1860 | jiffies + uart_poll_timeout(&up->port) + HZ / 5); |
diff --git a/drivers/tty/serial/8250_pci.c b/drivers/tty/serial/8250_pci.c index 6b887d90a205..3abeca2a2a1b 100644 --- a/drivers/tty/serial/8250_pci.c +++ b/drivers/tty/serial/8250_pci.c | |||
| @@ -1599,11 +1599,6 @@ static struct pci_serial_quirk pci_serial_quirks[] __refdata = { | |||
| 1599 | .device = 0x800D, | 1599 | .device = 0x800D, |
| 1600 | .init = pci_eg20t_init, | 1600 | .init = pci_eg20t_init, |
| 1601 | }, | 1601 | }, |
| 1602 | { | ||
| 1603 | .vendor = 0x10DB, | ||
| 1604 | .device = 0x800D, | ||
| 1605 | .init = pci_eg20t_init, | ||
| 1606 | }, | ||
| 1607 | /* | 1602 | /* |
| 1608 | * Cronyx Omega PCI (PLX-chip based) | 1603 | * Cronyx Omega PCI (PLX-chip based) |
| 1609 | */ | 1604 | */ |
| @@ -4021,7 +4016,7 @@ static struct pci_device_id serial_pci_tbl[] = { | |||
| 4021 | 0, 0, pbn_NETMOS9900_2s_115200 }, | 4016 | 0, 0, pbn_NETMOS9900_2s_115200 }, |
| 4022 | 4017 | ||
| 4023 | /* | 4018 | /* |
| 4024 | * Best Connectivity PCI Multi I/O cards | 4019 | * Best Connectivity and Rosewill PCI Multi I/O cards |
| 4025 | */ | 4020 | */ |
| 4026 | 4021 | ||
| 4027 | { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9865, | 4022 | { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9865, |
| @@ -4029,6 +4024,10 @@ static struct pci_device_id serial_pci_tbl[] = { | |||
| 4029 | 0, 0, pbn_b0_1_115200 }, | 4024 | 0, 0, pbn_b0_1_115200 }, |
| 4030 | 4025 | ||
| 4031 | { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9865, | 4026 | { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9865, |
| 4027 | 0xA000, 0x3002, | ||
| 4028 | 0, 0, pbn_b0_bt_2_115200 }, | ||
| 4029 | |||
| 4030 | { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9865, | ||
| 4032 | 0xA000, 0x3004, | 4031 | 0xA000, 0x3004, |
| 4033 | 0, 0, pbn_b0_bt_4_115200 }, | 4032 | 0, 0, pbn_b0_bt_4_115200 }, |
| 4034 | /* Intel CE4100 */ | 4033 | /* Intel CE4100 */ |
diff --git a/drivers/tty/serial/8250_pnp.c b/drivers/tty/serial/8250_pnp.c index fc301f6722e1..a2f236510ff1 100644 --- a/drivers/tty/serial/8250_pnp.c +++ b/drivers/tty/serial/8250_pnp.c | |||
| @@ -109,6 +109,9 @@ static const struct pnp_device_id pnp_dev_table[] = { | |||
| 109 | /* IBM */ | 109 | /* IBM */ |
| 110 | /* IBM Thinkpad 701 Internal Modem Voice */ | 110 | /* IBM Thinkpad 701 Internal Modem Voice */ |
| 111 | { "IBM0033", 0 }, | 111 | { "IBM0033", 0 }, |
| 112 | /* Intermec */ | ||
| 113 | /* Intermec CV60 touchscreen port */ | ||
| 114 | { "PNP4972", 0 }, | ||
| 112 | /* Intertex */ | 115 | /* Intertex */ |
| 113 | /* Intertex 28k8 33k6 Voice EXT PnP */ | 116 | /* Intertex 28k8 33k6 Voice EXT PnP */ |
| 114 | { "IXDC801", 0 }, | 117 | { "IXDC801", 0 }, |
diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c index af9b7814965a..b922f5d2e61e 100644 --- a/drivers/tty/serial/atmel_serial.c +++ b/drivers/tty/serial/atmel_serial.c | |||
| @@ -1609,9 +1609,11 @@ static struct console atmel_console = { | |||
| 1609 | static int __init atmel_console_init(void) | 1609 | static int __init atmel_console_init(void) |
