<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/tty/serial/sh-sci.c, branch v4.19.16</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.19.16</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.19.16'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2018-11-27T15:13:01+00:00</updated>
<entry>
<title>serial: sh-sci: Fix receive on SCIFA/SCIFB variants with DMA</title>
<updated>2018-11-27T15:13:01+00:00</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2018-10-09T17:41:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c2c72619cce2461203bab86984b92d6923882b8e'/>
<id>urn:sha1:c2c72619cce2461203bab86984b92d6923882b8e</id>
<content type='text'>
[ Upstream commit 202dc3cc10b4d37e5251431acf8d5040a8876c7d ]

On SCIFA and SCIFB serial ports with DMA support (i.e. some ports on
R-Car Gen2 and RZ/G1 SoCs), receive DMA operations are submitted before
the DMA channel pointer is initialized.  Hence this fails, and the
driver tries to fall back to PIO.  However, at this early phase in the
initialization sequence, fallback to PIO does not work, leading to a
serial port that cannot receive any data.

Fix this by calling sci_submit_rx() after initialization of the DMA
channel pointer.

Reported-by: Yoshihiro Shimoda &lt;yoshihiro.shimoda.uh@renesas.com&gt;
Fixes: 2c4ee23530ffc022 ("serial: sh-sci: Postpone DMA release when falling back to PIO")
Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Reviewed-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Tested-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>serial: sh-sci: Fix could not remove dev_attr_rx_fifo_timeout</title>
<updated>2018-11-21T08:19:13+00:00</updated>
<author>
<name>Yoshihiro Shimoda</name>
<email>yoshihiro.shimoda.uh@renesas.com</email>
</author>
<published>2018-10-30T06:13:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d168af20257be486ae20fd1d4d5facb7da49e559'/>
<id>urn:sha1:d168af20257be486ae20fd1d4d5facb7da49e559</id>
<content type='text'>
commit 641a41dbba217ee5bd26abe6be77f8cead9cd00e upstream.

This patch fixes an issue that the sci_remove() could not remove
dev_attr_rx_fifo_timeout because uart_remove_one_port() set
the port-&gt;port.type to PORT_UNKNOWN.

Reported-by: Hiromitsu Yamasaki &lt;hiromitsu.yamasaki.ym@renesas.com&gt;
Fixes: 5d23188a473d ("serial: sh-sci: make RX FIFO parameters tunable via sysfs")
Cc: &lt;stable@vger.kernel.org&gt; # v4.11+
Signed-off-by: Yoshihiro Shimoda &lt;yoshihiro.shimoda.uh@renesas.com&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>Revert "serial: sh-sci: Allow for compressed SCIF address"</title>
<updated>2018-10-02T21:38:16+00:00</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2018-08-30T12:54:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5b162cc4ac27ba76e576abc9090c54cf90a17980'/>
<id>urn:sha1:5b162cc4ac27ba76e576abc9090c54cf90a17980</id>
<content type='text'>
This reverts commit 2d4dd0da45401c7ae7332b4d1eb7bbb1348edde9.

This broke earlycon on all Renesas ARM platforms using a SCIF port for the
serial console (R-Car, RZ/A1, RZ/G1, RZ/G2 SoCs), due to an incorrect value
of port-&gt;regshift.

Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Acked-by: Chris Brandt &lt;chris.brandt@renesas.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Revert "serial: sh-sci: Remove SCIx_RZ_SCIFA_REGTYPE"</title>
<updated>2018-10-02T21:38:02+00:00</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2018-08-30T12:54:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=10653022456dc77b398777fd8e95126c77954b49'/>
<id>urn:sha1:10653022456dc77b398777fd8e95126c77954b49</id>
<content type='text'>
This reverts commit 7acece71a517cad83a0842a94d94c13f271b680c.

Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Acked-by: Chris Brandt &lt;chris.brandt@renesas.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: sh-sci: Improve support for separate TEI and DRI interrupts</title>
<updated>2018-08-02T08:07:09+00:00</updated>
<author>
<name>Chris Brandt</name>
<email>chris.brandt@renesas.com</email>
</author>
<published>2018-07-31T10:41:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=628c534ae73581fd21a09a27b7a4222b01a44d64'/>
<id>urn:sha1:628c534ae73581fd21a09a27b7a4222b01a44d64</id>
<content type='text'>
Some SCIF versions mux error and break interrupts together and then provide
a separate interrupt ID for just TEI/DRI.

Allow all 6 types of interrupts to be specified via platform data (or DT)
and for any signals that are muxed together (have the same interrupt
number) simply register one handler.

Signed-off-by: Chris Brandt &lt;chris.brandt@renesas.com&gt;
Reviewed-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: sh-sci: Remove SCIx_RZ_SCIFA_REGTYPE</title>
<updated>2018-08-02T08:07:09+00:00</updated>
<author>
<name>Chris Brandt</name>
<email>chris.brandt@renesas.com</email>
</author>
<published>2018-07-31T10:41:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7acece71a517cad83a0842a94d94c13f271b680c'/>
<id>urn:sha1:7acece71a517cad83a0842a94d94c13f271b680c</id>
<content type='text'>
There is no more need for SCIx_RZ_SCIFA_REGTYPE now that
SCIx_SH4_SCIF_REGTYPE can provide the same register/address definitions.

Also, R7S9210 no longer needs a special compatible since the standard
"renesas,scif" will work just fine.

Signed-off-by: Chris Brandt &lt;chris.brandt@renesas.com&gt;
Reviewed-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: sh-sci: Allow for compressed SCIF address</title>
<updated>2018-08-02T08:07:09+00:00</updated>
<author>
<name>Chris Brandt</name>
<email>chris.brandt@renesas.com</email>
</author>
<published>2018-07-31T10:41:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2d4dd0da45401c7ae7332b4d1eb7bbb1348edde9'/>
<id>urn:sha1:2d4dd0da45401c7ae7332b4d1eb7bbb1348edde9</id>
<content type='text'>
Some devices with SCIx_SH4_SCIF_REGTYPE have no space between registers.
Use the register area size to determine the spacing between register.

Signed-off-by: Chris Brandt &lt;chris.brandt@renesas.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: sh-sci: Drop superfluous assignment in sci_request_dma()</title>
<updated>2018-07-21T06:40:51+00:00</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2018-07-20T12:18:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ac8a103e695c500acc83eb5cd816d25d7a6da52f'/>
<id>urn:sha1:ac8a103e695c500acc83eb5cd816d25d7a6da52f</id>
<content type='text'>
No later code uses the assigned value, so it can be dropped.

Reported-by: Simon Horman &lt;horms@verge.net.au&gt;
Fixes: 2c4ee23530ffc022 ("serial: sh-sci: Postpone DMA release when falling back to PIO")
Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: sh-sci: Fix use-after-free on subsequent port startup</title>
<updated>2018-07-21T06:39:25+00:00</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2018-07-17T08:58:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1481ecf1941a35a3e82d0f3e8fe9a2bdce28ee6f'/>
<id>urn:sha1:1481ecf1941a35a3e82d0f3e8fe9a2bdce28ee6f</id>
<content type='text'>
sci_request_irq() checks port-&gt;irqstr[j] for a NULL pointer, to decide
if a fallback interrupt name string should be allocated or not.

While this string is freed during port shutdown, the pointer is not
zeroed.  Hence on a subsequent startup of the port, it will still be
pointing to the freed memory, leading to e.g.

    WARNING: CPU: 0 PID: 404 at fs/proc/generic.c:388 __proc_create+0xbc/0x260
    name len 0

or to a crash (the latter is more likely with CONFIG_DEBUG_SLAB=y, due
to the poisoning of freed memory).

Instead of zeroeing the pointer at multiple places, preinitialize
port-&gt;irqstr[j] to zero to fix this.

Fixes: 8b0bbd956228ae87 ("serial: sh-sci: Add support for R7S9210")
Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Reviewed-by: Ulrich Hecht &lt;ulrich.hecht+renesas@gmail.com&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: Add support for R7S9210</title>
<updated>2018-07-16T09:56:22+00:00</updated>
<author>
<name>Chris Brandt</name>
<email>chris.brandt@renesas.com</email>
</author>
<published>2018-07-11T14:41:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8b0bbd956228ae87139673e5611c4c880ddb9529'/>
<id>urn:sha1:8b0bbd956228ae87139673e5611c4c880ddb9529</id>
<content type='text'>
Add support for a "RZ_SCIFA" which is different than a traditional
SCIFA. It looks like a normal SCIF with FIFO data, but with a
compressed address space. Also, the break out of interrupts
are different then traditinal SCIF: ERI/BRI, RXI, TXI, TEI, DRI.
The R7S9210 (RZ/A2) contains this type of SCIF.

Signed-off-by: Chris Brandt &lt;chris.brandt@renesas.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
