<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/tty, branch v5.4</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.4</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.4'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2019-10-15T19:38:41Z</updated>
<entry>
<title>8250-men-mcb: fix error checking when get_num_ports returns -ENODEV</title>
<updated>2019-10-15T19:38:41Z</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2019-10-13T22:00:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f50b6805dbb993152025ec04dea094c40cc93a0c'/>
<id>urn:sha1:f50b6805dbb993152025ec04dea094c40cc93a0c</id>
<content type='text'>
The current checking for failure on the number of ports fails when
-ENODEV is returned from the call to get_num_ports. Fix this by making
num_ports and loop counter i signed rather than unsigned ints. Also
add check for num_ports being less than zero to check for -ve error
returns.

Addresses-Coverity: ("Unsigned compared against 0")
Fixes: e2fea54e4592 ("8250-men-mcb: add support for 16z025 and 16z057")
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Reviewed-by: Michael Moese &lt;mmoese@suse.de&gt;
Link: https://lore.kernel.org/r/20191013220016.9369-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: serial: imx: Use platform_get_irq_optional() for optional IRQs</title>
<updated>2019-10-10T11:12:28Z</updated>
<author>
<name>Anson Huang</name>
<email>Anson.Huang@nxp.com</email>
</author>
<published>2019-10-09T09:49:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=31a8d8fa84c51d3ab00bf059158d5de6178cf890'/>
<id>urn:sha1:31a8d8fa84c51d3ab00bf059158d5de6178cf890</id>
<content type='text'>
All i.MX SoCs except i.MX1 have ONLY one necessary IRQ, use
platform_get_irq_optional() to get second/third IRQ which are
optional to avoid below error message during probe:

[    0.726219] imx-uart 30860000.serial: IRQ index 1 not found
[    0.731329] imx-uart 30860000.serial: IRQ index 2 not found

Fixes: 7723f4c5ecdb8d83 ("driver core: platform: Add an error message to platform_get_irq*()")
Signed-off-by: Anson Huang &lt;Anson.Huang@nxp.com&gt;
Link: https://lore.kernel.org/r/1570614559-11900-1-git-send-email-Anson.Huang@nxp.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: fix kernel-doc warning in comments</title>
<updated>2019-10-10T11:12:28Z</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@infradead.org</email>
</author>
<published>2019-10-08T20:46:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ff30283a8de4f978dad120936c1af507d01a6a98'/>
<id>urn:sha1:ff30283a8de4f978dad120936c1af507d01a6a98</id>
<content type='text'>
Fix Sphinx warning in serial_core.c:

../drivers/tty/serial/serial_core.c:1969: WARNING: Definition list ends without a blank line; unexpected unindent.

Fixes: 73abaf87f01b ("serial: earlycon: Refactor parse_options into serial core")
Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Cc: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Link: https://lore.kernel.org/r/e989641c-224a-1090-e596-e7cc800bed44@infradead.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: 8250_omap: Fix gpio check for auto RTS/CTS</title>
<updated>2019-10-07T11:21:54Z</updated>
<author>
<name>Adam Ford</name>
<email>aford173@gmail.com</email>
</author>
<published>2019-10-06T16:33:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fc64f7abbef2dae7ee4c94702fb3cf9a2be5431a'/>
<id>urn:sha1:fc64f7abbef2dae7ee4c94702fb3cf9a2be5431a</id>
<content type='text'>
There are two checks to see if the manual gpio is configured, but
these the check is seeing if the structure is NULL instead it
should check to see if there are CTS and/or RTS pins defined.

This patch uses checks for those individual pins instead of
checking for the structure itself to restore auto RTS/CTS.

Signed-off-by: Adam Ford &lt;aford173@gmail.com&gt;
Reviewed-by: Yegor Yefremov &lt;yegorslists@googlemail.com&gt;
Link: https://lore.kernel.org/r/20191006163314.23191-2-aford173@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: mctrl_gpio: Check for NULL pointer</title>
<updated>2019-10-07T11:21:54Z</updated>
<author>
<name>Adam Ford</name>
<email>aford173@gmail.com</email>
</author>
<published>2019-10-06T16:33:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=37e3ab00e4734acc15d96b2926aab55c894f4d9c'/>
<id>urn:sha1:37e3ab00e4734acc15d96b2926aab55c894f4d9c</id>
<content type='text'>
When using mctrl_gpio_to_gpiod, it dereferences gpios into a single
requested GPIO.  This dereferencing can break if gpios is NULL,
so this patch adds a NULL check before dereferencing it.  If
gpios is NULL, this function will also return NULL.

Signed-off-by: Adam Ford &lt;aford173@gmail.com&gt;
Reviewed-by: Yegor Yefremov &lt;yegorslists@googlemail.com&gt;
Link: https://lore.kernel.org/r/20191006163314.23191-1-aford173@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: serial: fsl_lpuart: Fix lpuart_flush_buffer()</title>
<updated>2019-10-07T11:21:53Z</updated>
<author>
<name>Andrey Smirnov</name>
<email>andrew.smirnov@gmail.com</email>
</author>
<published>2019-10-04T21:55:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5df884d4b8a5bf2ec5e0b92394e40112d0a0a520'/>
<id>urn:sha1:5df884d4b8a5bf2ec5e0b92394e40112d0a0a520</id>
<content type='text'>
Fix incorrect read-modify-write sequence in lpuart_flush_buffer() that
was reading from UARTPFIFO and writing to UARTCFIFO instead of
operating solely on the latter.

Fixes: 9bc19af9dacb ("tty: serial: fsl_lpuart: Flush HW FIFOs in .flush_buffer")
Signed-off-by: Andrey Smirnov &lt;andrew.smirnov@gmail.com&gt;
Reported-by: Vivien Didelot &lt;vivien.didelot@gmail.com&gt;
Tested-by: Vivien Didelot &lt;vivien.didelot@gmail.com&gt;
Tested-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Reviewed-by: Fabio Estevam &lt;festevam@gmail.com&gt;
Cc: Stefan Agner &lt;stefan@agner.ch&gt;
Cc: Chris Healy &lt;cphealy@gmail.com&gt;
Cc: Cory Tusar &lt;cory.tusar@zii.aero&gt;
Cc: Lucas Stach &lt;l.stach@pengutronix.de&gt;
Cc: Jiri Slaby &lt;jslaby@suse.com&gt;
Link: https://lore.kernel.org/r/20191004215537.5308-1-andrew.smirnov@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: n_hdlc: fix build on SPARC</title>
<updated>2019-10-04T13:14:20Z</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@infradead.org</email>
</author>
<published>2019-10-01T02:15:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=47a7e5e97d4edd7b14974d34f0e5a5560fad2915'/>
<id>urn:sha1:47a7e5e97d4edd7b14974d34f0e5a5560fad2915</id>
<content type='text'>
Fix tty driver build on SPARC by not using __exitdata.
It appears that SPARC does not support section .exit.data.

Fixes these build errors:

`.exit.data' referenced in section `.exit.text' of drivers/tty/n_hdlc.o: defined in discarded section `.exit.data' of drivers/tty/n_hdlc.o
`.exit.data' referenced in section `.exit.text' of drivers/tty/n_hdlc.o: defined in discarded section `.exit.data' of drivers/tty/n_hdlc.o
`.exit.data' referenced in section `.exit.text' of drivers/tty/n_hdlc.o: defined in discarded section `.exit.data' of drivers/tty/n_hdlc.o
`.exit.data' referenced in section `.exit.text' of drivers/tty/n_hdlc.o: defined in discarded section `.exit.data' of drivers/tty/n_hdlc.o

Reported-by: kbuild test robot &lt;lkp@intel.com&gt;
Fixes: 063246641d4a ("format-security: move static strings to const")
Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Cc: Kees Cook &lt;keescook@chromium.org&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Link: https://lore.kernel.org/r/675e7bd9-955b-3ff3-1101-a973b58b5b75@infradead.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: uartps: Fix uartps_major handling</title>
<updated>2019-10-04T13:14:20Z</updated>
<author>
<name>Michal Simek</name>
<email>michal.simek@xilinx.com</email>
</author>
<published>2019-10-04T13:04:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5e9bd2d70ae7c00a95a22994abf1eef728649e64'/>
<id>urn:sha1:5e9bd2d70ae7c00a95a22994abf1eef728649e64</id>
<content type='text'>
There are two parts which should be fixed. The first one is to assigned
uartps_major at the end of probe() to avoid complicated logic when
something fails.
The second part is initialized uartps_major number to 0 when last device is
removed. This will ensure that on next probe driver will ask for new
dynamic major number.

Fixes: ab262666018d ("serial: uartps: Use the same dynamic major number for all ports")
Reported-by: Paul Thomas &lt;pthomas8589@gmail.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Michal Simek &lt;michal.simek@xilinx.com&gt;
Link: https://lore.kernel.org/r/d2652cda992833315c4f96f06953eb547f928918.1570194248.git.michal.simek@xilinx.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: uartlite: fix exit path null pointer</title>
<updated>2019-10-04T13:02:46Z</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@infradead.org</email>
</author>
<published>2019-09-16T23:12:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a553add0846f355a28ed4e81134012e4a1e280c2'/>
<id>urn:sha1:a553add0846f355a28ed4e81134012e4a1e280c2</id>
<content type='text'>
Call uart_unregister_driver() conditionally instead of
unconditionally, only if it has been previously registered.

This uses driver.state, just as the sh-sci.c driver does.

Fixes this null pointer dereference in tty_unregister_driver(),
since the 'driver' argument is null:

  general protection fault: 0000 [#1] PREEMPT SMP KASAN PTI
  RIP: 0010:tty_unregister_driver+0x25/0x1d0

Fixes: 238b8721a554 ("[PATCH] serial uartlite driver")
Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Cc: Peter Korsgaard &lt;jacmet@sunsite.dk&gt;
Link: https://lore.kernel.org/r/9c8e6581-6fcc-a595-0897-4d90f5d710df@infradead.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: serial: linflexuart: Fix magic SysRq handling</title>
<updated>2019-10-04T13:02:28Z</updated>
<author>
<name>Stefan-gabriel Mirea</name>
<email>stefan-gabriel.mirea@nxp.com</email>
</author>
<published>2019-09-18T18:45:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9050079719021776e48437827eb9d5986b6e45d4'/>
<id>urn:sha1:9050079719021776e48437827eb9d5986b6e45d4</id>
<content type='text'>
Following an incorrect indentation reported to me by Dan Carpenter, I
noticed that the SysRq lines were inherited from the lpuart driver[1] (note
how the 'continue' is aligned to 'sport-&gt;port.sysrq = 0') and we have never
actually tested the SysRq support.

'sport-&gt;sysrq = 0' is not necessary neither before nor after 'continue',
because sysrq will already be 0 after uart_handle_sysrq_char() will finish.
Also, since the LINFlexD driver never called uart_handle_break(), sysrq
would have never been set to a nonzero value, so uart_handle_sysrq_char()
was not going to do anything.

Break conditions are detected based on a null data byte along with a
framing error (stop bit sampled to 0).

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/tty/serial/fsl_lpuart.c?h=b3e3bf2ef2c74f5ce5c19510edbbb9bfc1d249c2#n659

Fixes: 09864c1cdf5c ("tty: serial: Add linflexuart driver for S32V234")
Signed-off-by: Stefan-Gabriel Mirea &lt;stefan-gabriel.mirea@nxp.com&gt;
Reported-by: kbuild test robot &lt;lkp@intel.com&gt;
Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Link: https://lore.kernel.org/r/20190918184439.7465-1-stefan-gabriel.mirea@nxp.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
