<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/tty/serial, branch v4.0</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.0</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.0'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2015-03-26T22:13:14Z</updated>
<entry>
<title>tty: serial: fsl_lpuart: clear receive flag on FIFO flush</title>
<updated>2015-03-26T22:13:14Z</updated>
<author>
<name>Stefan Agner</name>
<email>stefan@agner.ch</email>
</author>
<published>2015-03-13T13:51:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8e4934c6d6c659e22b1b746af4196683e77ce6ca'/>
<id>urn:sha1:8e4934c6d6c659e22b1b746af4196683e77ce6ca</id>
<content type='text'>
When the receiver was enabled during startup, a character could
have been in the FIFO when the UART get initially used. The
driver configures the (receive) watermark level, and flushes the
FIFO. However, the receive flag (RDRF) could still be set at that
stage (as mentioned in the register description of UARTx_RWFIFO).
This leads to an interrupt which won't be handled properly in
interrupt mode: The receive interrupt function lpuart_rxint checks
the FIFO count, which is 0 at that point (due to the flush
during initialization). The problem does not manifest when using
DMA to receive characters.

Fix this situation by explicitly read the status register, which
leads to clearing of the RDRF flag. Due to the flush just after
the status flag read, a explicit data read is not to required.

Signed-off-by: Stefan Agner &lt;stefan@agner.ch&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: serial: fsl_lpuart: specify transmit FIFO size</title>
<updated>2015-03-26T22:13:14Z</updated>
<author>
<name>Stefan Agner</name>
<email>stefan@agner.ch</email>
</author>
<published>2015-03-13T13:51:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4e8f245937091b2c9eebf3d4909c9ceda4f0a78e'/>
<id>urn:sha1:4e8f245937091b2c9eebf3d4909c9ceda4f0a78e</id>
<content type='text'>
Specify transmit FIFO size which might be different depending on
LPUART instance. This makes sure uart_wait_until_sent in serial
core getting called, which in turn waits and checks if the FIFO
is really empty on shutdown by using the tx_empty callback.
Without the call of this callback, the last several characters
might not yet be transmitted when closing the serial port. This
can be reproduced by simply using echo and redirect the output to
a ttyLP device.

Signed-off-by: Stefan Agner &lt;stefan@agner.ch&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: samsung: Clear operation mode on UART shutdown</title>
<updated>2015-03-26T22:13:14Z</updated>
<author>
<name>Javier Martinez Canillas</name>
<email>javier.martinez@collabora.co.uk</email>
</author>
<published>2015-03-13T11:38:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e91d863d1aaeda0349aed42dfbd75c98e042a2c9'/>
<id>urn:sha1:e91d863d1aaeda0349aed42dfbd75c98e042a2c9</id>
<content type='text'>
Exynos serial ports operate either in a DMA-based or interrupt-based
modes. In DMA-based mode, the UART generates a transfer data request
and a Transmission (Tx) interrupt in interrupt-based mode.

The Tx IRQ is only unmasked in interrupt-based mode and it was done
in s3c24xx_serial_start_tx(). Commit ba019a3e2ad5 ("serial: samsung:
remove redundant interrupt enabling") removed the IRQ enable on that
function since it is enabled when the mode is set in enable_tx_pio().

The problem is that enable_tx_pio() is only called if the port mode
has not been set before but the mode was not cleared on .shutdown().

So if the UART was shutdown and then started up again, the mode set
will remain and the Tx IRQ won't be unmasked.

This caused a hang on at least Exynos5250, Exynos5420 and Exynos5800
when the system is rebooted or powered off.

Fixes: ba019a3e2ad5 ("serial: samsung: remove redundant interrupt enabling")
Signed-off-by: Javier Martinez Canillas &lt;javier.martinez@collabora.co.uk&gt;
Reviewed-by: Sylwester Nawrocki &lt;s.nawrocki@samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: 8250_dw: Fix deadlock in LCR workaround</title>
<updated>2015-03-11T15:39:52Z</updated>
<author>
<name>Peter Hurley</name>
<email>peter@hurleysoftware.com</email>
</author>
<published>2015-03-11T13:19:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7fd6f640f2dd17dac6ddd6702c378cb0bb9cfa11'/>
<id>urn:sha1:7fd6f640f2dd17dac6ddd6702c378cb0bb9cfa11</id>
<content type='text'>
Trying to write console output from within the serial console driver
while the port-&gt;lock is held causes recursive deadlock:

  CPU 0
spin_lock_irqsave(&amp;port-&gt;lock)
printk()
  console_unlock()
    call_console_drivers()
      serial8250_console_write()
        spin_lock_irqsave(&amp;port-&gt;lock)
** DEADLOCK **

The 8250_dw i/o accessors try to write a console error message if the
LCR workaround was unsuccessful. When the port-&gt;lock is already held
(eg., when called from serial8250_set_termios()), this deadlocks.

Make the error message a FIXME until a general solution is devised.

Cc: Tim Kryger &lt;tim.kryger@gmail.com&gt;
Reported-by: Zhang Zhen &lt;zhenzhang.zhang@huawei.com&gt;
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>Merge tag 'tty-4.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty</title>
<updated>2015-03-08T19:25:40Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2015-03-08T19:25:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bbbce516bb497404315c1d0a1b13a04038347d3d'/>
<id>urn:sha1:bbbce516bb497404315c1d0a1b13a04038347d3d</id>
<content type='text'>
Pull tty/serial fixes from Greg KH:
 "Here are some tty and serial driver fixes for 4.0-rc3.

  Along with the atime fix that you know about, here are some other
  serial driver bugfixes as well.  Most notable is a wait_until_sent
  bugfix that was traced back to being around since before 2.6.12 that
  Johan has fixed up.

  All have been in linux-next successfully"

* tag 'tty-4.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  TTY: fix tty_wait_until_sent maximum timeout
  TTY: fix tty_wait_until_sent on 64-bit machines
  USB: serial: fix infinite wait_until_sent timeout
  TTY: bfin_jtag_comm: remove incorrect wait_until_sent operation
  net: irda: fix wait_until_sent poll timeout
  serial: uapi: Declare all userspace-visible io types
  serial: core: Fix iotype userspace breakage
  serial: sprd: Fix missing spin_unlock in sprd_handle_irq()
  console: Fix console name size mismatch
  tty: fix up atime/mtime mess, take four
  serial: 8250_dw: Fix get_mctrl behaviour
  serial:8250:8250_pci: delete unneeded quirk entries
  serial:8250:8250_pci: fix redundant entry report for WCH_CH352_2S
  Change email address for 8250_pci
  serial: 8250: Revert "tty: serial: 8250_core: read only RX if there is something in the FIFO"
  Revert "tty/serial: of_serial: add DT alias ID handling"
</content>
</entry>
<entry>
<title>serial: sprd: Fix missing spin_unlock in sprd_handle_irq()</title>
<updated>2015-03-07T02:39:55Z</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@ingics.com</email>
</author>
<published>2015-02-16T14:39:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c4e6dcfa00dab9b10e75bba835393b81f256310b'/>
<id>urn:sha1:c4e6dcfa00dab9b10e75bba835393b81f256310b</id>
<content type='text'>
Fix return from sprd_handle_irq() with spin_lock held.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
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: 8250_dw: Fix get_mctrl behaviour</title>
<updated>2015-03-07T02:06:51Z</updated>
<author>
<name>Desmond Liu</name>
<email>desmondl@broadcom.com</email>
</author>
<published>2015-02-27T00:35:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=dfd37668ea6d5029fb5d8a66ea5e202d0655fad7'/>
<id>urn:sha1:dfd37668ea6d5029fb5d8a66ea5e202d0655fad7</id>
<content type='text'>
Fixed behaviour of get_mctrl() serial driver function as documented in:
https://www.kernel.org/doc/Documentation/serial/driver

Added device-tree properties 'dcd-override', 'dsr-override',
'cts-override', and 'ri-override' specific to the Synopsis 8250
DesignWare UART driver. Allows one to force Data Carrier Detect,
Clear To Send, and Data Set Ready signals to permanently be reported as
active. The Ring indicator can be forced to be reported as inactive.

It is possible that if modem control signalling is enabled on a port
that doesn't have these pins (e.g. - a simple two wire Tx/Rx port), the
driver can hang indefinitely waiting for the state to change. The new
DT properties allow the driver to ignore the state of these pins on
serial ports that don't support them, as recommended in the kernel
documentation.

Reviewed-by: JD (Jiandong) Zheng &lt;jdzheng@broadcom.com&gt;
Signed-off-by: Jonathan Richardson &lt;jonathar@broadcom.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial:8250:8250_pci: delete unneeded quirk entries</title>
<updated>2015-03-07T02:06:51Z</updated>
<author>
<name>Wang YanQing</name>
<email>udknight@gmail.com</email>
</author>
<published>2015-03-06T17:08:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7cf91108d44dbef3d48766fd0e7f7347c2e48bda'/>
<id>urn:sha1:7cf91108d44dbef3d48766fd0e7f7347c2e48bda</id>
<content type='text'>
These quirk entries have the same effect as default
quirk entry, so we can just delete them.

Signed-off-by: Wang YanQing &lt;udknight@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial:8250:8250_pci: fix redundant entry report for WCH_CH352_2S</title>
<updated>2015-03-07T02:06:51Z</updated>
<author>
<name>Wang YanQing</name>
<email>udknight@gmail.com</email>
</author>
<published>2015-03-06T17:13:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6262a3692b921a82075695c5c6d10f4a6bcc5fac'/>
<id>urn:sha1:6262a3692b921a82075695c5c6d10f4a6bcc5fac</id>
<content type='text'>
Commit 8b5c913f7ee6464849570bacb6bcd9ef0eaf7dce
("serial: 8250_pci: Add WCH CH352 quirk to avoid Xscale detection")
trigger one redundant entry report message.

This patch fix it.

Reported-by: Russell King &lt;rmk@arm.linux.org.uk&gt;
Signed-off-by: Wang YanQing &lt;udknight@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Change email address for 8250_pci</title>
<updated>2015-03-07T02:06:51Z</updated>
<author>
<name>Russell King</name>
<email>rmk+kernel@arm.linux.org.uk</email>
</author>
<published>2015-03-06T10:49:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f2e0ea861117bda073d1d7ffbd3120c07c0d5d34'/>
<id>urn:sha1:f2e0ea861117bda073d1d7ffbd3120c07c0d5d34</id>
<content type='text'>
I'm still receiving reports to my email address, so let's point this
at the linux-serial mailing list instead.

Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
