<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/tty/serial, branch v3.18.62</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v3.18.62</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v3.18.62'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2017-06-26T05:10:50+00:00</updated>
<entry>
<title>serial: efm32: Fix parity management in 'efm32_uart_console_get_options()'</title>
<updated>2017-06-26T05:10:50+00:00</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2017-05-12T14:35:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0e889eb18a5e456d8ea58436c72b33ce3c8659ac'/>
<id>urn:sha1:0e889eb18a5e456d8ea58436c72b33ce3c8659ac</id>
<content type='text'>
commit be40597a1bc173bf9dadccdf5388b956f620ae8f upstream.

UARTn_FRAME_PARITY_ODD is 0x0300
UARTn_FRAME_PARITY_EVEN is 0x0200
So if the UART is configured for EVEN parity, it would be reported as ODD.
Fix it by correctly testing if the 2 bits are set.

Fixes: 3afbd89c9639 ("serial/efm32: add new driver")
Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Acked-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>serial: sh-sci: Fix panic when serial console and DMA are enabled</title>
<updated>2017-06-14T10:54:20+00:00</updated>
<author>
<name>Takatoshi Akiyama</name>
<email>takatoshi.akiyama.kj@ps.hitachi-solutions.com</email>
</author>
<published>2017-02-27T06:56:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d92015ef48105f8564887ddbed805318ba3f6d53'/>
<id>urn:sha1:d92015ef48105f8564887ddbed805318ba3f6d53</id>
<content type='text'>
commit 3c9101766b502a0163d1d437fada5801cf616be2 upstream.

This patch fixes an issue that kernel panic happens when DMA is enabled
and we press enter key while the kernel booting on the serial console.

* An interrupt may occur after sci_request_irq().
* DMA transfer area is initialized by setup_timer() in sci_request_dma()
  and used in interrupt.

If an interrupt occurred between sci_request_irq() and setup_timer() in
sci_request_dma(), DMA transfer area has not been initialized yet.
So, this patch changes the order of sci_request_irq() and
sci_request_dma().

Fixes: 73a19e4c0301 ("serial: sh-sci: Add DMA support.")
Signed-off-by: Takatoshi Akiyama &lt;takatoshi.akiyama.kj@ps.hitachi-solutions.com&gt;
[Shimoda changes the commit log]
Signed-off-by: Yoshihiro Shimoda &lt;yoshihiro.shimoda.uh@renesas.com&gt;
Cc: Jiri Slaby &lt;jslaby@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>serial: ifx6x60: fix use-after-free on module unload</title>
<updated>2017-06-14T10:54:17+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2017-04-26T10:24:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ff1a321f9acda32dbb47b22638ddcadfc9f7773c'/>
<id>urn:sha1:ff1a321f9acda32dbb47b22638ddcadfc9f7773c</id>
<content type='text'>
commit 1e948479b3d63e3ac0ecca13cbf4921c7d17c168 upstream.

Make sure to deregister the SPI driver before releasing the tty driver
to avoid use-after-free in the SPI remove callback where the tty
devices are deregistered.

Fixes: 72d4724ea54c ("serial: ifx6x60: Add modem power off function in the platform reboot process")
Cc: Jun Chen &lt;jun.d.chen@intel.com&gt;
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>serial: omap: suspend device on probe errors</title>
<updated>2017-05-20T12:18:43+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2017-04-10T09:21:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0c7581fd01ecc10a69f396d55f00c1427d6d1f6b'/>
<id>urn:sha1:0c7581fd01ecc10a69f396d55f00c1427d6d1f6b</id>
<content type='text'>
commit 77e6fe7fd2b7cba0bf2f2dc8cde51d7b9a35bf74 upstream.

Make sure to actually suspend the device before returning after a failed
(or deferred) probe.

Note that autosuspend must be disabled before runtime pm is disabled in
order to balance the usage count due to a negative autosuspend delay as
well as to make the final put suspend the device synchronously.

Fixes: 388bc2622680 ("omap-serial: Fix the error handling in the omap_serial probe")
Cc: Shubhrajyoti D &lt;shubhrajyoti@ti.com&gt;
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Acked-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>serial: omap: fix runtime-pm handling on unbind</title>
<updated>2017-05-20T12:18:43+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2017-04-10T09:21:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8763b1d53903eae8554830e6f4aed42f47ef5c18'/>
<id>urn:sha1:8763b1d53903eae8554830e6f4aed42f47ef5c18</id>
<content type='text'>
commit 099bd73dc17ed77aa8c98323e043613b6e8f54fc upstream.

An unbalanced and misplaced synchronous put was used to suspend the
device on driver unbind, something which with a likewise misplaced
pm_runtime_disable leads to external aborts when an open port is being
removed.

Unhandled fault: external abort on non-linefetch (0x1028) at 0xfa024010
...
[&lt;c046e760&gt;] (serial_omap_set_mctrl) from [&lt;c046a064&gt;] (uart_update_mctrl+0x50/0x60)
[&lt;c046a064&gt;] (uart_update_mctrl) from [&lt;c046a400&gt;] (uart_shutdown+0xbc/0x138)
[&lt;c046a400&gt;] (uart_shutdown) from [&lt;c046bd2c&gt;] (uart_hangup+0x94/0x190)
[&lt;c046bd2c&gt;] (uart_hangup) from [&lt;c045b760&gt;] (__tty_hangup+0x404/0x41c)
[&lt;c045b760&gt;] (__tty_hangup) from [&lt;c045b794&gt;] (tty_vhangup+0x1c/0x20)
[&lt;c045b794&gt;] (tty_vhangup) from [&lt;c046ccc8&gt;] (uart_remove_one_port+0xec/0x260)
[&lt;c046ccc8&gt;] (uart_remove_one_port) from [&lt;c046ef4c&gt;] (serial_omap_remove+0x40/0x60)
[&lt;c046ef4c&gt;] (serial_omap_remove) from [&lt;c04845e8&gt;] (platform_drv_remove+0x34/0x4c)

Fix this up by resuming the device before deregistering the port and by
suspending and disabling runtime pm only after the port has been
removed.

Also make sure to disable autosuspend before disabling runtime pm so
that the usage count is balanced and device actually suspended before
returning.

Note that due to a negative autosuspend delay being set in probe, the
unbalanced put would actually suspend the device on first driver unbind,
while rebinding and again unbinding would result in a negative
power.usage_count.

Fixes: 7e9c8e7dbf3b ("serial: omap: make sure to suspend device before remove")
Cc: Felipe Balbi &lt;balbi@kernel.org&gt;
Cc: Santosh Shilimkar &lt;santosh.shilimkar@ti.com&gt;
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Acked-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>serial: 8250_pci: Detach low-level driver during PCI error recovery</title>
<updated>2017-04-22T05:15:06+00:00</updated>
<author>
<name>Gabriel Krisman Bertazi</name>
<email>krisman@linux.vnet.ibm.com</email>
</author>
<published>2016-11-28T21:34:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c7293aedb4990eef20cdf74c5b51b6f351ddf025'/>
<id>urn:sha1:c7293aedb4990eef20cdf74c5b51b6f351ddf025</id>
<content type='text'>
commit f209fa03fc9d131b3108c2e4936181eabab87416 upstream.

During a PCI error recovery, like the ones provoked by EEH in the ppc64
platform, all IO to the device must be blocked while the recovery is
completed.  Current 8250_pci implementation only suspends the port
instead of detaching it, which doesn't prevent incoming accesses like
TIOCMGET and TIOCMSET calls from reaching the device.  Those end up
racing with the EEH recovery, crashing it.  Similar races were also
observed when opening the device and when shutting it down during
recovery.

This patch implements a more robust IO blockage for the 8250_pci
recovery by unregistering the port at the beginning of the procedure and
re-adding it afterwards.  Since the port is detached from the uart
layer, we can be sure that no request will make through to the device
during recovery.  This is similar to the solution used by the JSM serial
driver.

I thank Peter Hurley &lt;peter@hurleysoftware.com&gt; for valuable input on
this one over one year ago.

Signed-off-by: Gabriel Krisman Bertazi &lt;krisman@linux.vnet.ibm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>tty/serial: atmel: fix race condition (TX+DMA)</title>
<updated>2017-04-22T05:15:01+00:00</updated>
<author>
<name>Richard Genoud</name>
<email>richard.genoud@gmail.com</email>
</author>
<published>2017-03-20T10:52:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=de3596d3a3ea0cbb9ddd85a7491e766582b1dacc'/>
<id>urn:sha1:de3596d3a3ea0cbb9ddd85a7491e766582b1dacc</id>
<content type='text'>
commit 31ca2c63fdc0aee725cbd4f207c1256f5deaabde upstream.

If uart_flush_buffer() is called between atmel_tx_dma() and
atmel_complete_tx_dma(), the circular buffer has been cleared, but not
atmel_port-&gt;tx_len.
That leads to a circular buffer overflow (dumping (UART_XMIT_SIZE -
atmel_port-&gt;tx_len) bytes).

Tested-by: Nicolas Ferre &lt;nicolas.ferre@microchip.com&gt;
Signed-off-by: Richard Genoud &lt;richard.genoud@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>serial: 8250_pci: Add MKS Tenta SCOM-0800 and SCOM-0801 cards</title>
<updated>2017-04-18T05:55:49+00:00</updated>
<author>
<name>Ian Abbott</name>
<email>abbotti@mev.co.uk</email>
</author>
<published>2017-02-03T20:25:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f98482143a7bc0eb35ce7d46e5b783a14c707a40'/>
<id>urn:sha1:f98482143a7bc0eb35ce7d46e5b783a14c707a40</id>
<content type='text'>
commit 1c9c858e2ff8ae8024a3d75d2ed080063af43754 upstream.

The MKS Instruments SCOM-0800 and SCOM-0801 cards (originally by Tenta
Technologies) are 3U CompactPCI serial cards with 4 and 8 serial ports,
respectively.  The first 4 ports are implemented by an OX16PCI954 chip,
and the second 4 ports are implemented by an OX16C954 chip on a local
bus, bridged by the second PCI function of the OX16PCI954.  The ports
are jumper-selectable as RS-232 and RS-422/485, and the UARTs use a
non-standard oscillator frequency of 20 MHz (base_baud = 1250000).

Signed-off-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>serial: samsung: Fix ERR pointer dereference on deferred probe</title>
<updated>2016-08-22T16:23:00+00:00</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>k.kozlowski@samsung.com</email>
</author>
<published>2016-06-16T06:27:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d918a2e1b06e38855c8ecb15c00f39d6528353e2'/>
<id>urn:sha1:d918a2e1b06e38855c8ecb15c00f39d6528353e2</id>
<content type='text'>
[ Upstream commit e51e4d8a185de90424b03f30181b35f29c46a25a ]

When the clk_get() of "uart" clock returns EPROBE_DEFER, the next re-probe
finishes with success but uses invalid (ERR_PTR) values.  This leads to
dereferencing of ERR_PTR stored under ourport-&gt;clk:

	12c30000.serial: Controller clock not found
	(...)
	12c30000.serial: ttySAC3 at MMIO 0x12c30000 (irq = 61, base_baud = 0) is a S3C6400/10
	Unable to handle kernel paging request at virtual address fffffdfb

	(clk_prepare) from [&lt;c039f7d0&gt;] (s3c24xx_serial_pm+0x20/0x128)
	(s3c24xx_serial_pm) from [&lt;c0395414&gt;] (uart_change_pm+0x38/0x40)
	(uart_change_pm) from [&lt;c039689c&gt;] (uart_add_one_port+0x31c/0x44c)
	(uart_add_one_port) from [&lt;c03a035c&gt;] (s3c24xx_serial_probe+0x2a8/0x418)
	(s3c24xx_serial_probe) from [&lt;c03ee110&gt;] (platform_drv_probe+0x50/0xb0)
	(platform_drv_probe) from [&lt;c03ecb44&gt;] (driver_probe_device+0x1f4/0x2b0)
	(driver_probe_device) from [&lt;c03eb0c0&gt;] (bus_for_each_drv+0x44/0x8c)
	(bus_for_each_drv) from [&lt;c03ec8c8&gt;] (__device_attach+0x9c/0x100)
	(__device_attach) from [&lt;c03ebf54&gt;] (bus_probe_device+0x84/0x8c)
	(bus_probe_device) from [&lt;c03ec388&gt;] (deferred_probe_work_func+0x60/0x8c)
	(deferred_probe_work_func) from [&lt;c012fee4&gt;] (process_one_work+0x120/0x328)
	(process_one_work) from [&lt;c0130150&gt;] (worker_thread+0x2c/0x4ac)
	(worker_thread) from [&lt;c0135320&gt;] (kthread+0xd8/0xf4)
	(kthread) from [&lt;c0107978&gt;] (ret_from_fork+0x14/0x3c)

The first unsuccessful clk_get() causes s3c24xx_serial_init_port() to
exit with failure but the s3c24xx_uart_port is left half-configured
(e.g. port-&gt;mapbase is set, clk contains ERR_PTR).  On next re-probe,
the function s3c24xx_serial_init_port() will exit early with success
because of configured port-&gt;mapbase and driver will use old values,
including the ERR_PTR as clock.

Fix this by cleaning the port-&gt;mapbase on error path so each re-probe
will initialize all of the port settings.

Fixes: 60e93575476f ("serial: samsung: enable clock before clearing pending interrupts during init")
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Krzysztof Kozlowski &lt;k.kozlowski@samsung.com&gt;
Reviewed-by: Javier Martinez Canillas &lt;javier@osg.samsung.com&gt;
Tested-by: Javier Martinez Canillas &lt;javier@osg.samsung.com&gt;
Tested-by: Kevin Hilman &lt;khilman@baylibre.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
</content>
</entry>
<entry>
<title>serial: samsung: Reorder the sequence of clock control when call s3c24xx_serial_set_termios()</title>
<updated>2016-07-12T12:48:18+00:00</updated>
<author>
<name>Chanwoo Choi</name>
<email>cw00.choi@samsung.com</email>
</author>
<published>2016-04-21T09:58:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1e694169c9b1a84eec5ca3b631c8fc14e89cd670'/>
<id>urn:sha1:1e694169c9b1a84eec5ca3b631c8fc14e89cd670</id>
<content type='text'>
[ Upstream commit b8995f527aac143e83d3900ff39357651ea4e0f6 ]

This patch fixes the broken serial log when changing the clock source
of uart device. Before disabling the original clock source, this patch
enables the new clock source to protect the clock off state for a split second.

Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Reviewed-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
</feed>
