<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/tty/serial, branch v5.1</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=v5.1</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.1'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2019-04-19T12:09:23Z</updated>
<entry>
<title>sc16is7xx: put err_spi and err_i2c into correct #ifdef</title>
<updated>2019-04-19T12:09:23Z</updated>
<author>
<name>Guoqing Jiang</name>
<email>gqjiang@suse.com</email>
</author>
<published>2019-04-18T02:01:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c53051128bb0e8754e13345d782ca69e5e1ce36d'/>
<id>urn:sha1:c53051128bb0e8754e13345d782ca69e5e1ce36d</id>
<content type='text'>
err_spi is only called within SERIAL_SC16IS7XX_SPI
while err_i2c is called inside SERIAL_SC16IS7XX_I2C.
So we need to put err_spi and err_i2c into each #ifdef
accordingly.

This change fixes ("sc16is7xx: move label 'err_spi'
to correct section").

Signed-off-by: Guoqing Jiang &lt;gqjiang@suse.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>sc16is7xx: move label 'err_spi' to correct section</title>
<updated>2019-04-16T13:24:38Z</updated>
<author>
<name>Guoqing Jiang</name>
<email>gqjiang@suse.com</email>
</author>
<published>2019-04-09T08:16:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e00164a0f000de893944981f41a568c981aca658'/>
<id>urn:sha1:e00164a0f000de893944981f41a568c981aca658</id>
<content type='text'>
err_spi is used when SERIAL_SC16IS7XX_SPI is enabled, so make
the label only available under SERIAL_SC16IS7XX_SPI option.
Otherwise, the below warning appears.

drivers/tty/serial/sc16is7xx.c:1523:1: warning: label ‘err_spi’ defined but not used [-Wunused-label]
 err_spi:
  ^~~~~~~

Signed-off-by: Guoqing Jiang &lt;gqjiang@suse.com&gt;
Fixes: ac0cdb3d9901 ("sc16is7xx: missing unregister/delete driver on error in sc16is7xx_init()")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: sh-sci: Fix HSCIF RX sampling point adjustment</title>
<updated>2019-04-16T13:24:38Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2019-03-29T09:10:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6b87784b53592a90d21576be8eff688b56d93cce'/>
<id>urn:sha1:6b87784b53592a90d21576be8eff688b56d93cce</id>
<content type='text'>
The calculation of the sampling point has min() and max() exchanged.
Fix this by using the clamp() helper instead.

Fixes: 63ba1e00f178a448 ("serial: sh-sci: Support for HSCIF RX sampling point adjustment")
Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Reviewed-by: Ulrich Hecht &lt;uli+renesas@fpond.eu&gt;
Reviewed-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Acked-by: Dirk Behme &lt;dirk.behme@de.bosch.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Reviewed-by: Simon Horman &lt;horms+renesas@verge.net.au&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: sh-sci: Fix HSCIF RX sampling point calculation</title>
<updated>2019-04-16T13:24:38Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2019-04-01T11:25:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ace965696da2611af759f0284e26342b7b6cec89'/>
<id>urn:sha1:ace965696da2611af759f0284e26342b7b6cec89</id>
<content type='text'>
There are several issues with the formula used for calculating the
deviation from the intended rate:
  1. While min_err and last_stop are signed, srr and baud are unsigned.
     Hence the signed values are promoted to unsigned, which will lead
     to a bogus value of deviation if min_err is negative,
  2. Srr is the register field value, which is one less than the actual
     sampling rate factor,
  3. The divisions do not use rounding.

Fix this by casting unsigned variables to int, adding one to srr, and
using a single DIV_ROUND_CLOSEST().

Fixes: 63ba1e00f178a448 ("serial: sh-sci: Support for HSCIF RX sampling point adjustment")
Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Reviewed-by: Mukesh Ojha &lt;mojha@codeaurora.org&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Reviewed-by: Ulrich Hecht &lt;uli+renesas@fpond.eu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Disable kgdboc failed by echo space to /sys/module/kgdboc/parameters/kgdboc</title>
<updated>2019-03-27T15:27:48Z</updated>
<author>
<name>Wentao Wang</name>
<email>witallwang@gmail.com</email>
</author>
<published>2019-03-20T15:30:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3ec8002951ea173e24b466df1ea98c56b7920e63'/>
<id>urn:sha1:3ec8002951ea173e24b466df1ea98c56b7920e63</id>
<content type='text'>
Echo "" to /sys/module/kgdboc/parameters/kgdboc will fail with "No such
device” error.

This is caused by function "configure_kgdboc" who init err to ENODEV
when the config is empty (legal input) the code go out with ENODEV
returned.

Fixes: 2dd453168643 ("kgdboc: Fix restrict error")
Signed-off-by: Wentao Wang &lt;witallwang@gmail.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Acked-by: Daniel Thompson &lt;daniel.thompson@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty/serial: atmel: RS485 HD w/DMA: enable RX after TX is stopped</title>
<updated>2019-03-27T15:27:48Z</updated>
<author>
<name>Razvan Stefanescu</name>
<email>razvan.stefanescu@microchip.com</email>
</author>
<published>2019-03-19T13:20:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=69646d7a3689fbe1a65ae90397d22ac3f1b8d40f'/>
<id>urn:sha1:69646d7a3689fbe1a65ae90397d22ac3f1b8d40f</id>
<content type='text'>
In half-duplex operation, RX should be started after TX completes.

If DMA is used, there is a case when the DMA transfer completes but the
TX FIFO is not emptied, so the RX cannot be restarted just yet.

Use a boolean variable to store this state and rearm TX interrupt mask
to be signaled again that the transfer finished. In interrupt transmit
handler this variable is used to start RX. A warning message is generated
if RX is activated before TX fifo is cleared.

Fixes: b389f173aaa1 ("tty/serial: atmel: RS485 half duplex w/DMA: enable
RX after TX is done")
Signed-off-by: Razvan Stefanescu &lt;razvan.stefanescu@microchip.com&gt;
Acked-by: Richard Genoud &lt;richard.genoud@gmail.com&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: atmel: Add is_half_duplex helper</title>
<updated>2019-03-27T15:27:48Z</updated>
<author>
<name>Razvan Stefanescu</name>
<email>razvan.stefanescu@microchip.com</email>
</author>
<published>2019-03-19T13:20:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f3040983132bf3477acd45d2452a906e67c2fec9'/>
<id>urn:sha1:f3040983132bf3477acd45d2452a906e67c2fec9</id>
<content type='text'>
Use a helper function to check that a port needs to use half duplex
communication, replacing several occurrences of multi-line bit checking.

Fixes: b389f173aaa1 ("tty/serial: atmel: RS485 half duplex w/DMA: enable RX after TX is done")
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Razvan Stefanescu &lt;razvan.stefanescu@microchip.com&gt;
Acked-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: sh-sci: Fix setting SCSCR_TIE while transferring data</title>
<updated>2019-03-19T14:37:44Z</updated>
<author>
<name>Hoan Nguyen An</name>
<email>na-hoan@jinso.co.jp</email>
</author>
<published>2019-03-18T09:26:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=93bcefd4c6bad4c69dbc4edcd3fbf774b24d930d'/>
<id>urn:sha1:93bcefd4c6bad4c69dbc4edcd3fbf774b24d930d</id>
<content type='text'>
We disable transmission interrupt (clear SCSCR_TIE) after all data has been transmitted
(if uart_circ_empty(xmit)). While transmitting, if the data is still in the tty buffer,
re-enable the SCSCR_TIE bit, which was done at sci_start_tx().
This is unnecessary processing, wasting CPU operation if the data transmission length is large.
And further, transmit end, FIFO empty bits disabling have also been performed in the step above.

Signed-off-by: Hoan Nguyen An &lt;na-hoan@jinso.co.jp&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: ar933x_uart: Fix build failure with disabled console</title>
<updated>2019-03-19T14:37:44Z</updated>
<author>
<name>Petr Štetiar</name>
<email>ynezz@true.cz</email>
</author>
<published>2019-03-06T16:54:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=72ff51d8dd262d1fef25baedc2ac35116435be47'/>
<id>urn:sha1:72ff51d8dd262d1fef25baedc2ac35116435be47</id>
<content type='text'>
Andrey has reported on OpenWrt's bug tracking system[1], that he
currently can't use ar93xx_uart as pure serial UART without console
(CONFIG_SERIAL_8250_CONSOLE and CONFIG_SERIAL_AR933X_CONSOLE undefined),
because compilation ends with following error:

 ar933x_uart.c: In function 'ar933x_uart_console_write':
 ar933x_uart.c:550:14: error: 'struct uart_port' has no
                               member named 'sysrq'

So this patch moves all the code related to console handling behind
series of CONFIG_SERIAL_AR933X_CONSOLE ifdefs.

1. https://bugs.openwrt.org/index.php?do=details&amp;task_id=2152

Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Jiri Slaby &lt;jslaby@suse.com&gt;
Cc: Andrey Batyiev &lt;batyiev@gmail.com&gt;
Reported-by: Andrey Batyiev &lt;batyiev@gmail.com&gt;
Tested-by: Andrey Batyiev &lt;batyiev@gmail.com&gt;
Signed-off-by: Petr Štetiar &lt;ynezz@true.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: serial: qcom_geni_serial: Initialize baud in qcom_geni_console_setup</title>
<updated>2019-03-19T14:37:44Z</updated>
<author>
<name>Nathan Chancellor</name>
<email>natechancellor@gmail.com</email>
</author>
<published>2019-03-08T18:37:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c5cbc78acf693f5605d4a85b1327fa7933daf092'/>
<id>urn:sha1:c5cbc78acf693f5605d4a85b1327fa7933daf092</id>
<content type='text'>
When building with -Wsometimes-uninitialized, Clang warns:

drivers/tty/serial/qcom_geni_serial.c:1079:6: warning: variable 'baud'
is used uninitialized whenever 'if' condition is false
[-Wsometimes-uninitialized]

It's not wrong; when options is NULL, baud has no default value. Use
9600 as that is a sane default.

Link: https://github.com/ClangBuiltLinux/linux/issues/395
Suggested-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Nathan Chancellor &lt;natechancellor@gmail.com&gt;
Reviewed-by: Nick Desaulniers &lt;ndesaulniers@google.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
