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

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6:
tty: fix race in tty_fasync
serial: serial_cs: oxsemi quirk breaks resume
serial: imx: bit &/| confusion
serial: Fix crash if the minimum rate of the device is > 9600 baud
serial-core: resume serial hardware with no_console_suspend
serial: 8250_pnp: use wildcard for serial Wacom tablets
nozomi: quick fix for the close/close bug
compat_ioctl: Supress "unknown cmd" message on serial /dev/console

+54 -73
+1 -1
drivers/char/nozomi.c
··· 1651 1651 1652 1652 dc->open_ttys--; 1653 1653 port->count--; 1654 - tty_port_tty_set(port, NULL); 1655 1654 1656 1655 if (port->count == 0) { 1657 1656 DBG1("close: %d", nport->token_dl); 1657 + tty_port_tty_set(port, NULL); 1658 1658 spin_lock_irqsave(&dc->spin_mutex, flags); 1659 1659 dc->last_ier &= ~(nport->token_dl); 1660 1660 writew(dc->last_ier, dc->reg_ier);
+1 -1
drivers/char/tty_io.c
··· 1951 1951 pid = task_pid(current); 1952 1952 type = PIDTYPE_PID; 1953 1953 } 1954 - spin_unlock_irqrestore(&tty->ctrl_lock, flags); 1955 1954 retval = __f_setown(filp, pid, type, 0); 1955 + spin_unlock_irqrestore(&tty->ctrl_lock, flags); 1956 1956 if (retval) 1957 1957 goto out; 1958 1958 } else {
+1 -9
drivers/serial/8250_pnp.c
··· 328 328 /* U.S. Robotics 56K Voice INT PnP*/ 329 329 { "USR9190", 0 }, 330 330 /* Wacom tablets */ 331 - { "WACF004", 0 }, 332 - { "WACF005", 0 }, 333 - { "WACF006", 0 }, 334 - { "WACF007", 0 }, 335 - { "WACF008", 0 }, 336 - { "WACF009", 0 }, 337 - { "WACF00A", 0 }, 338 - { "WACF00B", 0 }, 339 - { "WACF00C", 0 }, 331 + { "WACFXXX", 0 }, 340 332 /* Compaq touchscreen */ 341 333 { "FPI2002", 0 }, 342 334 /* Fujitsu Stylistic touchscreens */
+1 -1
drivers/serial/imx.c
··· 1088 1088 int *parity, int *bits) 1089 1089 { 1090 1090 1091 - if ( readl(sport->port.membase + UCR1) | UCR1_UARTEN ) { 1091 + if (readl(sport->port.membase + UCR1) & UCR1_UARTEN) { 1092 1092 /* ok, the port was enabled */ 1093 1093 unsigned int ucr2, ubir,ubmr, uartclk; 1094 1094 unsigned int baud_raw;
+45 -60
drivers/serial/serial_core.c
··· 385 385 } 386 386 387 387 /* 388 - * As a last resort, if the quotient is zero, 389 - * default to 9600 bps 388 + * As a last resort, if the range cannot be met then clip to 389 + * the nearest chip supported rate. 390 390 */ 391 - if (!hung_up) 392 - tty_termios_encode_baud_rate(termios, 9600, 9600); 391 + if (!hung_up) { 392 + if (baud <= min) 393 + tty_termios_encode_baud_rate(termios, 394 + min + 1, min + 1); 395 + else 396 + tty_termios_encode_baud_rate(termios, 397 + max - 1, max - 1); 398 + } 393 399 } 394 - 400 + /* Should never happen */ 401 + WARN_ON(1); 395 402 return 0; 396 403 } 397 404 ··· 2013 2006 2014 2007 mutex_lock(&port->mutex); 2015 2008 2016 - if (!console_suspend_enabled && uart_console(uport)) { 2017 - /* we're going to avoid suspending serial console */ 2018 - mutex_unlock(&port->mutex); 2019 - return 0; 2020 - } 2021 - 2022 2009 tty_dev = device_find_child(uport->dev, &match, serial_match_port); 2023 2010 if (device_may_wakeup(tty_dev)) { 2024 2011 enable_irq_wake(uport->irq); ··· 2020 2019 mutex_unlock(&port->mutex); 2021 2020 return 0; 2022 2021 } 2023 - uport->suspended = 1; 2022 + if (console_suspend_enabled || !uart_console(uport)) 2023 + uport->suspended = 1; 2024 2024 2025 2025 if (port->flags & ASYNC_INITIALIZED) { 2026 2026 const struct uart_ops *ops = uport->ops; 2027 2027 int tries; 2028 2028 2029 - set_bit(ASYNCB_SUSPENDED, &port->flags); 2030 - clear_bit(ASYNCB_INITIALIZED, &port->flags); 2029 + if (console_suspend_enabled || !uart_console(uport)) { 2030 + set_bit(ASYNCB_SUSPENDED, &port->flags); 2031 + clear_bit(ASYNCB_INITIALIZED, &port->flags); 2031 2032 2032 - spin_lock_irq(&uport->lock); 2033 - ops->stop_tx(uport); 2034 - ops->set_mctrl(uport, 0); 2035 - ops->stop_rx(uport); 2036 - spin_unlock_irq(&uport->lock); 2033 + spin_lock_irq(&uport->lock); 2034 + ops->stop_tx(uport); 2035 + ops->set_mctrl(uport, 0); 2036 + ops->stop_rx(uport); 2037 + spin_unlock_irq(&uport->lock); 2038 + } 2037 2039 2038 2040 /* 2039 2041 * Wait for the transmitter to empty. ··· 2051 2047 drv->dev_name, 2052 2048 drv->tty_driver->name_base + uport->line); 2053 2049 2054 - ops->shutdown(uport); 2050 + if (console_suspend_enabled || !uart_console(uport)) 2051 + ops->shutdown(uport); 2055 2052 } 2056 2053 2057 2054 /* 2058 2055 * Disable the console device before suspending. 2059 2056 */ 2060 - if (uart_console(uport)) 2057 + if (console_suspend_enabled && uart_console(uport)) 2061 2058 console_stop(uport->cons); 2062 2059 2063 - uart_change_pm(state, 3); 2060 + if (console_suspend_enabled || !uart_console(uport)) 2061 + uart_change_pm(state, 3); 2064 2062 2065 2063 mutex_unlock(&port->mutex); 2066 2064 ··· 2078 2072 struct ktermios termios; 2079 2073 2080 2074 mutex_lock(&port->mutex); 2081 - 2082 - if (!console_suspend_enabled && uart_console(uport)) { 2083 - /* no need to resume serial console, it wasn't suspended */ 2084 - /* 2085 - * First try to use the console cflag setting. 2086 - */ 2087 - memset(&termios, 0, sizeof(struct ktermios)); 2088 - termios.c_cflag = uport->cons->cflag; 2089 - /* 2090 - * If that's unset, use the tty termios setting. 2091 - */ 2092 - if (termios.c_cflag == 0) 2093 - termios = *state->port.tty->termios; 2094 - else { 2095 - termios.c_ispeed = termios.c_ospeed = 2096 - tty_termios_input_baud_rate(&termios); 2097 - termios.c_ispeed = termios.c_ospeed = 2098 - tty_termios_baud_rate(&termios); 2099 - } 2100 - uport->ops->set_termios(uport, &termios, NULL); 2101 - mutex_unlock(&port->mutex); 2102 - return 0; 2103 - } 2104 2075 2105 2076 tty_dev = device_find_child(uport->dev, &match, serial_match_port); 2106 2077 if (!uport->suspended && device_may_wakeup(tty_dev)) { ··· 2104 2121 spin_lock_irq(&uport->lock); 2105 2122 ops->set_mctrl(uport, 0); 2106 2123 spin_unlock_irq(&uport->lock); 2107 - ret = ops->startup(uport); 2108 - if (ret == 0) { 2109 - uart_change_speed(state, NULL); 2110 - spin_lock_irq(&uport->lock); 2111 - ops->set_mctrl(uport, uport->mctrl); 2112 - ops->start_tx(uport); 2113 - spin_unlock_irq(&uport->lock); 2114 - set_bit(ASYNCB_INITIALIZED, &port->flags); 2115 - } else { 2116 - /* 2117 - * Failed to resume - maybe hardware went away? 2118 - * Clear the "initialized" flag so we won't try 2119 - * to call the low level drivers shutdown method. 2120 - */ 2121 - uart_shutdown(state); 2124 + if (console_suspend_enabled || !uart_console(uport)) { 2125 + ret = ops->startup(uport); 2126 + if (ret == 0) { 2127 + uart_change_speed(state, NULL); 2128 + spin_lock_irq(&uport->lock); 2129 + ops->set_mctrl(uport, uport->mctrl); 2130 + ops->start_tx(uport); 2131 + spin_unlock_irq(&uport->lock); 2132 + set_bit(ASYNCB_INITIALIZED, &port->flags); 2133 + } else { 2134 + /* 2135 + * Failed to resume - maybe hardware went away? 2136 + * Clear the "initialized" flag so we won't try 2137 + * to call the low level drivers shutdown method. 2138 + */ 2139 + uart_shutdown(state); 2140 + } 2122 2141 } 2123 2142 2124 2143 clear_bit(ASYNCB_SUSPENDED, &port->flags);
+2 -1
drivers/serial/serial_cs.c
··· 146 146 { 147 147 struct serial_info *info = link->priv; 148 148 149 - outb(12, info->c950ctrl + 1); 149 + if (info->c950ctrl) 150 + outb(12, info->c950ctrl + 1); 150 151 } 151 152 152 153 /* request_region? oxsemi branch does no request_region too... */
+3
fs/compat_ioctl.c
··· 1005 1005 COMPATIBLE_IOCTL(SCSI_IOCTL_PROBE_HOST) 1006 1006 COMPATIBLE_IOCTL(SCSI_IOCTL_GET_PCI) 1007 1007 #endif 1008 + /* Big V (don't complain on serial console) */ 1009 + IGNORE_IOCTL(VT_OPENQRY) 1010 + IGNORE_IOCTL(VT_GETMODE) 1008 1011 /* Little p (/dev/rtc, /dev/envctrl, etc.) */ 1009 1012 COMPATIBLE_IOCTL(RTC_AIE_ON) 1010 1013 COMPATIBLE_IOCTL(RTC_AIE_OFF)