<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/drivers/tty/serial/omap-serial.c, branch v4.8-rc3</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=v4.8-rc3</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=v4.8-rc3'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2016-02-14T22:36:04+00:00</updated>
<entry>
<title>Merge 4.5-rc4 into tty-next</title>
<updated>2016-02-14T22:36:04+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2016-02-14T22:36:04+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=249f3c4fe4fdef159d3f9b3f7a6c41a92103c860'/>
<id>urn:sha1:249f3c4fe4fdef159d3f9b3f7a6c41a92103c860</id>
<content type='text'>
We want the fixes in here, and this resolves a merge error in tty_io.c

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ARM: OMAP: serial: Rename DRIVER_NAME</title>
<updated>2016-02-07T07:13:30+00:00</updated>
<author>
<name>Jean Delvare</name>
<email>jdelvare@suse.de</email>
</author>
<published>2016-01-21T08:46:12+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=1349ba02bf72caafa36a2d6878cdba340d65b2ac'/>
<id>urn:sha1:1349ba02bf72caafa36a2d6878cdba340d65b2ac</id>
<content type='text'>
DRIVER_NAME is too generic to be used in a driver-specific platform
data file. Use a name specific to the driver instead, to avoid
collisions.

Signed-off-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Acked-by: Tony Lindgren &lt;tony@atomide.com&gt;
Cc: Jiri Slaby &lt;jslaby@suse.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial/omap: mark wait_for_xmitr as __maybe_unused</title>
<updated>2016-02-07T07:04:51+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2016-01-13T20:59:23+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=b4a512b8bf7185787e291cddad3b6457b2367120'/>
<id>urn:sha1:b4a512b8bf7185787e291cddad3b6457b2367120</id>
<content type='text'>
The wait_for_xmitr() function is only used if CONFIG_CONSOLE_POLL
or CONFIG_SERIAL_OMAP_CONSOLE are set, but when both are disabled,
the compiler warns about it being unused:

drivers/tty/serial/omap-serial.c:1168:13: warning: 'wait_for_xmitr' defined but not used [-Wunused-func

We could add more #ifdefs to work around it, but adding __maybe_unused
seems nicer.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Fixes: 2172076d2399 ("serial/omap-serial: Deinline wait_for_xmitr, save 165 bytes")
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: omap: Prevent DoS using unprivileged ioctl(TIOCSRS485)</title>
<updated>2016-02-07T07:04:51+00:00</updated>
<author>
<name>Peter Hurley</name>
<email>peter@hurleysoftware.com</email>
</author>
<published>2016-01-12T23:14:46+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=308bbc9ab838d0ace0298268c7970ba9513e2c65'/>
<id>urn:sha1:308bbc9ab838d0ace0298268c7970ba9513e2c65</id>
<content type='text'>
The omap-serial driver emulates RS485 delays using software timers,
but neglects to clamp the input values from the unprivileged
ioctl(TIOCSRS485). Because the software implementation busy-waits,
malicious userspace could stall the cpu for ~49 days.

Clamp the input values to &lt; 100ms.

Fixes: 4a0ac0f55b18 ("OMAP: add RS485 support")
Cc: &lt;stable@vger.kernel.org&gt;  # 3.12+
Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial/omap-serial: Deinline wait_for_xmitr, save 165 bytes</title>
<updated>2015-12-14T03:59:48+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>dvlasenk@redhat.com</email>
</author>
<published>2015-10-27T17:46:40+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=2172076d2399660a1f49ee5a228ebcb56a2c3544'/>
<id>urn:sha1:2172076d2399660a1f49ee5a228ebcb56a2c3544</id>
<content type='text'>
This function compiles to 141 bytes of machine code.

Signed-off-by: Denys Vlasenko &lt;dvlasenk@redhat.com&gt;
CC: Jiri Slaby &lt;jslaby@suse.com&gt;
CC: linux-serial@vger.kernel.org
Reviewed-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: omap: remove warnings about unused functions</title>
<updated>2015-10-04T18:14:26+00:00</updated>
<author>
<name>Ezequiel Garcia</name>
<email>ezequiel@vanguardiasur.com.ar</email>
</author>
<published>2015-10-03T19:45:35+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=adfb9233e434896e87811339ca0c18bc923b262f'/>
<id>urn:sha1:adfb9233e434896e87811339ca0c18bc923b262f</id>
<content type='text'>
They're used by only if CONFIG_PM is enabled, so enclose them
with proper ifdefs. Removes these warnings:

drivers/tty/serial/omap-serial.c:202:12: warning: 'serial_omap_get_context_loss_count' defined but not used [-Wunused-function]
drivers/tty/serial/omap-serial.c:213:13: warning: 'serial_omap_enable_wakeup' defined but not used [-Wunused-function]

Signed-off-by: Guido Martínez &lt;guido@vanguardiasur.com.ar&gt;
Signed-off-by: Ezequiel Garcia &lt;ezequiel@vanguardiasur.com.ar&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: omap: Switch wake-up interrupt to generic wakeirq</title>
<updated>2015-06-10T06:35:00+00:00</updated>
<author>
<name>Tony Lindgren</name>
<email>tony@atomide.com</email>
</author>
<published>2015-06-10T06:35:00+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=ee83bd3b6483d59b0d4b509e46dae688d8e5759d'/>
<id>urn:sha1:ee83bd3b6483d59b0d4b509e46dae688d8e5759d</id>
<content type='text'>
We can now use generic wakeirq handling and remove the custom handling
for the wake-up interrupts.

Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
</content>
</entry>
<entry>
<title>serial: omap: Fix error handling in probe</title>
<updated>2015-05-08T12:20:50+00:00</updated>
<author>
<name>Semen Protsenko</name>
<email>semen.protsenko@globallogic.com</email>
</author>
<published>2015-04-30T15:35:27+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=66cf1d8473780fcb1a90e86fd19ba276520deb14'/>
<id>urn:sha1:66cf1d8473780fcb1a90e86fd19ba276520deb14</id>
<content type='text'>
There is pm_qos_add_request() being executed on serial_omap_probe(),
which stores "&amp;up-&gt;pm_qos_request" from omap-serial driver to
"pm_qos_array[PM_QOS_CPU_DMA_LATENCY]-&gt;constraints". If
serial_omap_probe() fails after pm_qos_add_request() (e.g. on
uart_add_one_port() call), pm_qos_array still keeping pm_qos_request
struct from omap-serial driver, which is not valid anymore (since driver
failed). This leads further to kernel crash on pm_qos_update_target(),
executing from some completely different driver.

We were observing this while trying to run audio playback while having
one of omap-serial driver instances failed on uart_add_one_port() call:
    Unable to handle kernel paging request at virtual address fffffffc
    Backtrace:
    (plist_add) from (pm_qos_update_target)
    (pm_qos_update_target) from (pm_qos_add_request)
    (pm_qos_add_request) from (snd_pcm_hw_params)
    (snd_pcm_hw_params) from (snd_pcm_common_ioctl1)
    (snd_pcm_common_ioctl1) from (snd_pcm_playback_ioctl1)
    (snd_pcm_playback_ioctl1) from (snd_pcm_playback_ioctl)
    (snd_pcm_playback_ioctl) from (do_vfs_ioctl)
    (do_vfs_ioctl) from (SyS_ioctl)
    (SyS_ioctl) from (ret_fast_syscall)

This patch adds pm_qos_remove_request() on fail path in
serial_omap_probe() in order to fix this issue. While at it, free the
wakeup settings on fail path as well, just like it's done in
serial_omap_remove().

Signed-off-by: Semen Protsenko &lt;semen.protsenko@globallogic.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty/serial: omap: fix !wakeirq message</title>
<updated>2015-03-26T21:38:36+00:00</updated>
<author>
<name>Doug Kehn</name>
<email>rdkehn@yahoo.com</email>
</author>
<published>2015-03-24T13:19:27+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=1cf94d3a115ad118a36cba2c9a5383acda94e544'/>
<id>urn:sha1:1cf94d3a115ad118a36cba2c9a5383acda94e544</id>
<content type='text'>
When wakeirq is not used/enabled, "no wakeirq for uart0" is output for
all TTY as the log message is generated before the port line is
initialized.
[    0.802656] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[    0.811700] omap_uart 44e09000.serial: no wakeirq for uart0
[    0.812379] 44e09000.serial: ttyO0 at MMIO 0x44e09000 (irq = 88, base_baud = 3000000) is a OMAP UART0
[    1.503622] console [ttyO0] enabled
[    1.509836] omap_uart 48022000.serial: no wakeirq for uart0
[    1.516118] 48022000.serial: ttyO1 at MMIO 0x48022000 (irq = 89, base_baud = 3000000) is a OMAP UART1
[    1.527711] omap_uart 48024000.serial: no wakeirq for uart0
[    1.533881] 48024000.serial: ttyO2 at MMIO 0x48024000 (irq = 90, base_baud = 3000000) is a OMAP UART2
[    1.545324] omap_uart 481a6000.serial: no wakeirq for uart0
[    1.551410] 481a6000.serial: ttyO3 at MMIO 0x481a6000 (irq = 60, base_baud = 3000000) is a OMAP UART3
[    1.562946] omap_uart 481a8000.serial: no wakeirq for uart0
[    1.569036] 481a8000.serial: ttyO4 at MMIO 0x481a8000 (irq = 61, base_baud = 3000000) is a OMAP UART4

Fix by moving wakeirq initialization, check, and dev_info() call to
after port line initialization and validation.

Signed-off-by: Doug Kehn &lt;rdkehn@yahoo.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: omap: Fix RTS handling</title>
<updated>2015-02-02T18:11:28+00:00</updated>
<author>
<name>Peter Hurley</name>
<email>peter@hurleysoftware.com</email>
</author>
<published>2015-01-25T19:44:53+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=348f9bb31c56909f9098a598b6ecdc94a560816e'/>
<id>urn:sha1:348f9bb31c56909f9098a598b6ecdc94a560816e</id>
<content type='text'>
The OMAP UART ignores MCR[1] (ie., RTS) when in autoRTS mode. This
makes it impossible for either the serial core or userspace to
manually flow control the sender.

Disable autoRTS mode when RTS is lowered and restore the previous
mode when RTS is raised.

Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
