<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/tty, branch v3.0.16</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>TTY: ldisc, wait for ldisc infinitely in hangup</title>
<updated>2011-11-26T17:09:58+00:00</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2011-11-16T15:27:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ecaaa92488e2589cc6b0a409ce44e7e47a3bb846'/>
<id>ecaaa92488e2589cc6b0a409ce44e7e47a3bb846</id>
<content type='text'>
commit 0c73c08ec73dbe080b9ec56696ee21d32754d918 upstream.

For /dev/console case, we do not kill all ldisc users. It's due to
redirected_tty_write test in __tty_hangup. In that case there still
might be a process waiting e.g. in n_tty_read for input.

We wait for such processes to disappear. The problem is that we use a
timeout. After this timeout, we continue closing the ldisc and start
freeing tty resources. It obviously leads to crashes when the other
process is woken.

So to fix this, we wait infinitely before reiniting the ldisc. (The
tiocsetd remains untouched -- times out after 5s.)

This is nicely reproducible with this run from shell:
  exec 0&lt;&gt;/dev/console 1&lt;&gt;/dev/console 2&lt;&gt;/dev/console
and stopping a getty like:
  systemctl stop serial-getty@ttyS0.service

The crash proper may be produced only under load or with constified
timing the same as for 92f6fa09b.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Cc: Dave Young &lt;hidave.darkstar@gmail.com&gt;
Cc: Dave Jones &lt;davej@redhat.com&gt;
Cc: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Cc: Dmitriy Matrosov &lt;sgf.dma@gmail.com&gt;
Cc: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 0c73c08ec73dbe080b9ec56696ee21d32754d918 upstream.

For /dev/console case, we do not kill all ldisc users. It's due to
redirected_tty_write test in __tty_hangup. In that case there still
might be a process waiting e.g. in n_tty_read for input.

We wait for such processes to disappear. The problem is that we use a
timeout. After this timeout, we continue closing the ldisc and start
freeing tty resources. It obviously leads to crashes when the other
process is woken.

So to fix this, we wait infinitely before reiniting the ldisc. (The
tiocsetd remains untouched -- times out after 5s.)

This is nicely reproducible with this run from shell:
  exec 0&lt;&gt;/dev/console 1&lt;&gt;/dev/console 2&lt;&gt;/dev/console
and stopping a getty like:
  systemctl stop serial-getty@ttyS0.service

The crash proper may be produced only under load or with constified
timing the same as for 92f6fa09b.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Cc: Dave Young &lt;hidave.darkstar@gmail.com&gt;
Cc: Dave Jones &lt;davej@redhat.com&gt;
Cc: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Cc: Dmitriy Matrosov &lt;sgf.dma@gmail.com&gt;
Cc: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>TTY: ldisc, move wait idle to caller</title>
<updated>2011-11-26T17:09:58+00:00</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2011-11-16T15:27:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=57ee681901463f23076fa730c7aa1c4cee63952e'/>
<id>57ee681901463f23076fa730c7aa1c4cee63952e</id>
<content type='text'>
commit 300420722e0734a4254f3b634e0f82664495d210 upstream.

It is the only place where reinit is called from. And we really need
to wait for the old ldisc to go once. Actually this is the place where
the waiting originally was (before removed and re-added later).

This will make the fix in the following patch easier to implement.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Cc: Dave Young &lt;hidave.darkstar@gmail.com&gt;
Cc: Dave Jones &lt;davej@redhat.com&gt;
Cc: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Cc: Dmitriy Matrosov &lt;sgf.dma@gmail.com&gt;
Cc: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 300420722e0734a4254f3b634e0f82664495d210 upstream.

It is the only place where reinit is called from. And we really need
to wait for the old ldisc to go once. Actually this is the place where
the waiting originally was (before removed and re-added later).

This will make the fix in the following patch easier to implement.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Cc: Dave Young &lt;hidave.darkstar@gmail.com&gt;
Cc: Dave Jones &lt;davej@redhat.com&gt;
Cc: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Cc: Dmitriy Matrosov &lt;sgf.dma@gmail.com&gt;
Cc: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>TTY: ldisc, allow waiting for ldisc arbitrarily long</title>
<updated>2011-11-26T17:09:58+00:00</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2011-11-16T15:27:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f8b8a240e2879d9680238e27953cdc0c7f88131f'/>
<id>f8b8a240e2879d9680238e27953cdc0c7f88131f</id>
<content type='text'>
commit df92d0561de364de53c42abc5d43e04ab6f326a5 upstream.

To fix a nasty bug in ldisc hup vs. reinit we need to wait infinitely
long for ldisc to be gone. So here we add a parameter to
tty_ldisc_wait_idle to allow that.

This is only a preparation for the real fix which is done in the
following patches.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Cc: Dave Young &lt;hidave.darkstar@gmail.com&gt;
Cc: Dave Jones &lt;davej@redhat.com&gt;
Cc: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Cc: Dmitriy Matrosov &lt;sgf.dma@gmail.com&gt;
Cc: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit df92d0561de364de53c42abc5d43e04ab6f326a5 upstream.

To fix a nasty bug in ldisc hup vs. reinit we need to wait infinitely
long for ldisc to be gone. So here we add a parameter to
tty_ldisc_wait_idle to allow that.

This is only a preparation for the real fix which is done in the
following patches.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Cc: Dave Young &lt;hidave.darkstar@gmail.com&gt;
Cc: Dave Jones &lt;davej@redhat.com&gt;
Cc: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Cc: Dmitriy Matrosov &lt;sgf.dma@gmail.com&gt;
Cc: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>tty: hvc_dcc: Fix duplicate character inputs</title>
<updated>2011-11-26T17:09:57+00:00</updated>
<author>
<name>Stephen Boyd</name>
<email>sboyd@codeaurora.org</email>
</author>
<published>2011-10-26T02:19:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5e3092bd68b8ed5d17ece466ba98e02f4ad035ec'/>
<id>5e3092bd68b8ed5d17ece466ba98e02f4ad035ec</id>
<content type='text'>
commit c2a3e84f950e7ddba1f3914b005861d46ae60359 upstream.

Reading from the DCC grabs a character from the buffer and
clears the status bit. Since this is a context-changing
operation, instructions following the character read that rely on
the status bit being accurate need to be synchronized with an
ISB.

In this case, the status bit check needs to execute after the
character read otherwise we run the risk of reading the character
and checking the status bit before the read can clear the status
bit in the first place. When this happens, the user will see the
same character they typed twice, instead of once.

Add an ISB after the read and the write, so that the status check
is synchronized with the read/write operations.

Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit c2a3e84f950e7ddba1f3914b005861d46ae60359 upstream.

Reading from the DCC grabs a character from the buffer and
clears the status bit. Since this is a context-changing
operation, instructions following the character read that rely on
the status bit being accurate need to be synchronized with an
ISB.

In this case, the status bit check needs to execute after the
character read otherwise we run the risk of reading the character
and checking the status bit before the read can clear the status
bit in the first place. When this happens, the user will see the
same character they typed twice, instead of once.

Add an ISB after the read and the write, so that the status check
is synchronized with the read/write operations.

Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>pch_uart: Support new device LAPIS Semiconductor ML7831 IOH</title>
<updated>2011-11-26T17:09:57+00:00</updated>
<author>
<name>Tomoya MORINAGA</name>
<email>tomoya-linux@dsn.lapis-semi.com</email>
</author>
<published>2011-10-28T00:38:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6e6d3ebc5179779d72837ff38749843506fd6f7f'/>
<id>6e6d3ebc5179779d72837ff38749843506fd6f7f</id>
<content type='text'>
commit 8249f743f732ccbc3056428945ab1d9bd36d46bf upstream.

ML7831 is companion chip for Intel Atom E6xx series.

Signed-off-by: Tomoya MORINAGA &lt;tomoya-linux@dsn.lapis-semi.com&gt;
Acked-by: Alan Cox &lt;alan@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 8249f743f732ccbc3056428945ab1d9bd36d46bf upstream.

ML7831 is companion chip for Intel Atom E6xx series.

Signed-off-by: Tomoya MORINAGA &lt;tomoya-linux@dsn.lapis-semi.com&gt;
Acked-by: Alan Cox &lt;alan@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>pch_uart: Fix DMA resource leak issue</title>
<updated>2011-11-26T17:09:57+00:00</updated>
<author>
<name>Tomoya MORINAGA</name>
<email>tomoya.rohm@gmail.com</email>
</author>
<published>2011-11-11T01:55:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b74d0a317e75a602085cf73428bfe7ad456aee85'/>
<id>b74d0a317e75a602085cf73428bfe7ad456aee85</id>
<content type='text'>
commit 90f04c2926cfb5bf74533b0a7766bc896f6a0c0e upstream.

Changing UART mode PIO-&gt;DMA-&gt;PIO-&gt;DMA like below, pch_uart driver can't get
DMA channel resource.

setserial /dev/ttyPCH0 ^low_latency
setserial /dev/ttyPCH0 low_latency

CAUSE:
Changing mode using setserial command, ".startup" function which gets DMA
channel is called before ".verify_port" function which sets
dma-flag(use_dma/use_dma_flag) as 1.

PIO-&gt;DMA
  .startup: Since dma-flag is 0, DMA channel is not requested.
  .verify_port: dma-flag is set as 1.
  .shutdown: N/A

DMA-&gt;PIO
  .startup: Since dma-flag is 1, DMA channel is requested.
  .verify_port: dma-flag is set as 0.
  .shutdown: Since dma-flag is 0, DMA channel is not released.

This means DMA channel resource leak occurs.
Next time, this driver can't get DMA channel resource forever.

MODIFICATION:
  Currently, when release DMA channel resource, this driver checks dma-flag.
  However, this specification occurs the above issue.
  This driver must check whether dma_request_channel is executed or not.
  The values are saved in private data variable "chan_tx/chan_tx".
  These variables mean if the value is NULL, DMA channel is not requested,
  if not NULL, DMA channel is requested.

This patch fixes the issue.

Signed-off-by: Tomoya MORINAGA &lt;tomoya.rohm@gmail.com&gt;
Acked-by: Alan Cox &lt;alan@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 90f04c2926cfb5bf74533b0a7766bc896f6a0c0e upstream.

Changing UART mode PIO-&gt;DMA-&gt;PIO-&gt;DMA like below, pch_uart driver can't get
DMA channel resource.

setserial /dev/ttyPCH0 ^low_latency
setserial /dev/ttyPCH0 low_latency

CAUSE:
Changing mode using setserial command, ".startup" function which gets DMA
channel is called before ".verify_port" function which sets
dma-flag(use_dma/use_dma_flag) as 1.

PIO-&gt;DMA
  .startup: Since dma-flag is 0, DMA channel is not requested.
  .verify_port: dma-flag is set as 1.
  .shutdown: N/A

DMA-&gt;PIO
  .startup: Since dma-flag is 1, DMA channel is requested.
  .verify_port: dma-flag is set as 0.
  .shutdown: Since dma-flag is 0, DMA channel is not released.

This means DMA channel resource leak occurs.
Next time, this driver can't get DMA channel resource forever.

MODIFICATION:
  Currently, when release DMA channel resource, this driver checks dma-flag.
  However, this specification occurs the above issue.
  This driver must check whether dma_request_channel is executed or not.
  The values are saved in private data variable "chan_tx/chan_tx".
  These variables mean if the value is NULL, DMA channel is not requested,
  if not NULL, DMA channel is requested.

This patch fixes the issue.

Signed-off-by: Tomoya MORINAGA &lt;tomoya.rohm@gmail.com&gt;
Acked-by: Alan Cox &lt;alan@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>pch_uart: Fix hw-flow control issue</title>
<updated>2011-11-26T17:09:57+00:00</updated>
<author>
<name>Tomoya MORINAGA</name>
<email>tomoya-linux@dsn.lapis-semi.com</email>
</author>
<published>2011-10-27T06:45:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3f04930ad551f504006e35ba5b6d6f717406638c'/>
<id>3f04930ad551f504006e35ba5b6d6f717406638c</id>
<content type='text'>
commit a1d7cfe29f13cf45f8094929864b9c66bf0cd91b upstream.

Using hardware flow control,
currently, register of the control-bit(AFE) is not set.
This patch fixes the issue.

Signed-off-by: Tomoya MORINAGA &lt;tomoya-linux@dsn.lapis-semi.com&gt;
Acked-by: Alan Cox &lt;alan@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit a1d7cfe29f13cf45f8094929864b9c66bf0cd91b upstream.

Using hardware flow control,
currently, register of the control-bit(AFE) is not set.
This patch fixes the issue.

Signed-off-by: Tomoya MORINAGA &lt;tomoya-linux@dsn.lapis-semi.com&gt;
Acked-by: Alan Cox &lt;alan@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>jsm: remove buggy write queue</title>
<updated>2011-11-11T17:36:24+00:00</updated>
<author>
<name>Thadeu Lima de Souza Cascardo</name>
<email>cascardo@linux.vnet.ibm.com</email>
</author>
<published>2011-08-24T16:14:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6c3ad7aee6e6d62169948d09f2b4a1279d253cbe'/>
<id>6c3ad7aee6e6d62169948d09f2b4a1279d253cbe</id>
<content type='text'>
commit 9d898966c4a07e4a5092215b5a2829d0ef02baa2 upstream.

jsm uses a write queue that copies from uart_core circular buffer. This
copying however has some bugs, like not wrapping the head counter. Since
this write queue is also a circular buffer, the consumer function is
ready to use the uart_core circular buffer directly.

This buggy copying function was making some bytes be dropped when
transmitting to a raw tty, doing something like this.

[root@hostname ~]$ cat /dev/ttyn1 &gt; cascardo/dump &amp;
[1] 2658
[root@hostname ~]$ cat /proc/tty/drivers &gt; /dev/ttyn0
[root@hostname ~]$ cat /proc/tty/drivers
/dev/tty             /dev/tty        5       0 system:/dev/tty
/dev/console         /dev/console    5       1 system:console
/dev/ptmx            /dev/ptmx       5       2 system
/dev/vc/0            /dev/vc/0       4       0 system:vtmaster
jsm                  /dev/ttyn     250 0-31 serial
serial               /dev/ttyS       4 64-95 serial
hvc                  /dev/hvc      229 0-7 system
pty_slave            /dev/pts      136 0-1048575 pty:slave
pty_master           /dev/ptm      128 0-1048575 pty:master
unknown              /dev/tty        4 1-63 console
[root@hostname ~]$ cat cascardo/dump
/dev/tty             /dev/tty        5       0 system:/dev/tty
/dev/console         /dev/console    5       1 system:console
/dev/ptmx            /dev/ptmx       5       2 system
/dev/vc/0            /dev/vc/0       4       0 system:vtmaste[root@hostname ~]$

This patch drops the driver write queue entirely, using the circular
buffer from uart_core only.

Signed-off-by: Thadeu Lima de Souza Cascardo &lt;cascardo@linux.vnet.ibm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 9d898966c4a07e4a5092215b5a2829d0ef02baa2 upstream.

jsm uses a write queue that copies from uart_core circular buffer. This
copying however has some bugs, like not wrapping the head counter. Since
this write queue is also a circular buffer, the consumer function is
ready to use the uart_core circular buffer directly.

This buggy copying function was making some bytes be dropped when
transmitting to a raw tty, doing something like this.

[root@hostname ~]$ cat /dev/ttyn1 &gt; cascardo/dump &amp;
[1] 2658
[root@hostname ~]$ cat /proc/tty/drivers &gt; /dev/ttyn0
[root@hostname ~]$ cat /proc/tty/drivers
/dev/tty             /dev/tty        5       0 system:/dev/tty
/dev/console         /dev/console    5       1 system:console
/dev/ptmx            /dev/ptmx       5       2 system
/dev/vc/0            /dev/vc/0       4       0 system:vtmaster
jsm                  /dev/ttyn     250 0-31 serial
serial               /dev/ttyS       4 64-95 serial
hvc                  /dev/hvc      229 0-7 system
pty_slave            /dev/pts      136 0-1048575 pty:slave
pty_master           /dev/ptm      128 0-1048575 pty:master
unknown              /dev/tty        4 1-63 console
[root@hostname ~]$ cat cascardo/dump
/dev/tty             /dev/tty        5       0 system:/dev/tty
/dev/console         /dev/console    5       1 system:console
/dev/ptmx            /dev/ptmx       5       2 system
/dev/vc/0            /dev/vc/0       4       0 system:vtmaste[root@hostname ~]$

This patch drops the driver write queue entirely, using the circular
buffer from uart_core only.

Signed-off-by: Thadeu Lima de Souza Cascardo &lt;cascardo@linux.vnet.ibm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>serial-core: power up uart port early before we do set_termios when resuming</title>
<updated>2011-11-11T17:35:15+00:00</updated>
<author>
<name>Ning Jiang</name>
<email>ning.jiang@marvell.com</email>
</author>
<published>2011-09-05T08:28:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3e9efdd45f78e0ad859b60906c6556e8efe2579b'/>
<id>3e9efdd45f78e0ad859b60906c6556e8efe2579b</id>
<content type='text'>
commit 94abc56f4d90f289ea32a0a11d3577fcd8cb28fb upstream.

The following patch removed uart_change_pm() in uart_resume_port():

commit 5933a161abcb8d83a2c145177f48027c3c0a8995
Author: Yin Kangkai &lt;kangkai.yin@linux.intel.com&gt;
    serial-core: reset the console speed on resume

It will break the pxa serial driver when the system resumes from suspend mode
as it will try to set baud rate divider register in set_termios but with
clock off. The register value can not be set correctly on some platform if
the clock is disabled. The pxa driver will check the value and report the
following warning:

------------[ cut here ]------------
WARNING: at drivers/tty/serial/pxa.c:545 serial_pxa_set_termios+0x1dc/0x250()
Modules linked in:
[&lt;c0281f30&gt;] (unwind_backtrace+0x0/0xf0) from [&lt;c029341c&gt;] (warn_slowpath_common+0x4c/0x64)
[&lt;c029341c&gt;] (warn_slowpath_common+0x4c/0x64) from [&lt;c029344c&gt;] (warn_slowpath_null+0x18/0x1c)
[&lt;c029344c&gt;] (warn_slowpath_null+0x18/0x1c) from [&lt;c044b1e4&gt;] (serial_pxa_set_termios+0x1dc/0x250)
[&lt;c044b1e4&gt;] (serial_pxa_set_termios+0x1dc/0x250) from [&lt;c044a840&gt;] (uart_resume_port+0x128/0x2dc)
[&lt;c044a840&gt;] (uart_resume_port+0x128/0x2dc) from [&lt;c044bbe0&gt;] (serial_pxa_resume+0x18/0x24)
[&lt;c044bbe0&gt;] (serial_pxa_resume+0x18/0x24) from [&lt;c0454d34&gt;] (platform_pm_resume+0x40/0x4c)
[&lt;c0454d34&gt;] (platform_pm_resume+0x40/0x4c) from [&lt;c0457ebc&gt;] (pm_op+0x68/0xb4)
[&lt;c0457ebc&gt;] (pm_op+0x68/0xb4) from [&lt;c0458368&gt;] (device_resume+0xb0/0xec)
[&lt;c0458368&gt;] (device_resume+0xb0/0xec) from [&lt;c04584c8&gt;] (dpm_resume+0xe0/0x194)
[&lt;c04584c8&gt;] (dpm_resume+0xe0/0x194) from [&lt;c0458588&gt;] (dpm_resume_end+0xc/0x18)
[&lt;c0458588&gt;] (dpm_resume_end+0xc/0x18) from [&lt;c02c518c&gt;] (suspend_devices_and_enter+0x16c/0x1ac)
[&lt;c02c518c&gt;] (suspend_devices_and_enter+0x16c/0x1ac) from [&lt;c02c5278&gt;] (enter_state+0xac/0xdc)
[&lt;c02c5278&gt;] (enter_state+0xac/0xdc) from [&lt;c02c48ec&gt;] (state_store+0xa0/0xbc)
[&lt;c02c48ec&gt;] (state_store+0xa0/0xbc) from [&lt;c0408f7c&gt;] (kobj_attr_store+0x18/0x1c)
[&lt;c0408f7c&gt;] (kobj_attr_store+0x18/0x1c) from [&lt;c034a6a4&gt;] (sysfs_write_file+0x108/0x140)
[&lt;c034a6a4&gt;] (sysfs_write_file+0x108/0x140) from [&lt;c02fb798&gt;] (vfs_write+0xac/0x134)
[&lt;c02fb798&gt;] (vfs_write+0xac/0x134) from [&lt;c02fb8cc&gt;] (sys_write+0x3c/0x68)
[&lt;c02fb8cc&gt;] (sys_write+0x3c/0x68) from [&lt;c027c700&gt;] (ret_fast_syscall+0x0/0x2c)
---[ end trace 88289eceb4675b04 ]---

This patch fix the problem by adding the power on opertion back for uart
console when console_suspend_enabled is true.

Signed-off-by: Ning Jiang &lt;ning.jiang@marvell.com&gt;
Tested-by: Mayank Rana &lt;mrana@codeaurora.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 94abc56f4d90f289ea32a0a11d3577fcd8cb28fb upstream.

The following patch removed uart_change_pm() in uart_resume_port():

commit 5933a161abcb8d83a2c145177f48027c3c0a8995
Author: Yin Kangkai &lt;kangkai.yin@linux.intel.com&gt;
    serial-core: reset the console speed on resume

It will break the pxa serial driver when the system resumes from suspend mode
as it will try to set baud rate divider register in set_termios but with
clock off. The register value can not be set correctly on some platform if
the clock is disabled. The pxa driver will check the value and report the
following warning:

------------[ cut here ]------------
WARNING: at drivers/tty/serial/pxa.c:545 serial_pxa_set_termios+0x1dc/0x250()
Modules linked in:
[&lt;c0281f30&gt;] (unwind_backtrace+0x0/0xf0) from [&lt;c029341c&gt;] (warn_slowpath_common+0x4c/0x64)
[&lt;c029341c&gt;] (warn_slowpath_common+0x4c/0x64) from [&lt;c029344c&gt;] (warn_slowpath_null+0x18/0x1c)
[&lt;c029344c&gt;] (warn_slowpath_null+0x18/0x1c) from [&lt;c044b1e4&gt;] (serial_pxa_set_termios+0x1dc/0x250)
[&lt;c044b1e4&gt;] (serial_pxa_set_termios+0x1dc/0x250) from [&lt;c044a840&gt;] (uart_resume_port+0x128/0x2dc)
[&lt;c044a840&gt;] (uart_resume_port+0x128/0x2dc) from [&lt;c044bbe0&gt;] (serial_pxa_resume+0x18/0x24)
[&lt;c044bbe0&gt;] (serial_pxa_resume+0x18/0x24) from [&lt;c0454d34&gt;] (platform_pm_resume+0x40/0x4c)
[&lt;c0454d34&gt;] (platform_pm_resume+0x40/0x4c) from [&lt;c0457ebc&gt;] (pm_op+0x68/0xb4)
[&lt;c0457ebc&gt;] (pm_op+0x68/0xb4) from [&lt;c0458368&gt;] (device_resume+0xb0/0xec)
[&lt;c0458368&gt;] (device_resume+0xb0/0xec) from [&lt;c04584c8&gt;] (dpm_resume+0xe0/0x194)
[&lt;c04584c8&gt;] (dpm_resume+0xe0/0x194) from [&lt;c0458588&gt;] (dpm_resume_end+0xc/0x18)
[&lt;c0458588&gt;] (dpm_resume_end+0xc/0x18) from [&lt;c02c518c&gt;] (suspend_devices_and_enter+0x16c/0x1ac)
[&lt;c02c518c&gt;] (suspend_devices_and_enter+0x16c/0x1ac) from [&lt;c02c5278&gt;] (enter_state+0xac/0xdc)
[&lt;c02c5278&gt;] (enter_state+0xac/0xdc) from [&lt;c02c48ec&gt;] (state_store+0xa0/0xbc)
[&lt;c02c48ec&gt;] (state_store+0xa0/0xbc) from [&lt;c0408f7c&gt;] (kobj_attr_store+0x18/0x1c)
[&lt;c0408f7c&gt;] (kobj_attr_store+0x18/0x1c) from [&lt;c034a6a4&gt;] (sysfs_write_file+0x108/0x140)
[&lt;c034a6a4&gt;] (sysfs_write_file+0x108/0x140) from [&lt;c02fb798&gt;] (vfs_write+0xac/0x134)
[&lt;c02fb798&gt;] (vfs_write+0xac/0x134) from [&lt;c02fb8cc&gt;] (sys_write+0x3c/0x68)
[&lt;c02fb8cc&gt;] (sys_write+0x3c/0x68) from [&lt;c027c700&gt;] (ret_fast_syscall+0x0/0x2c)
---[ end trace 88289eceb4675b04 ]---

This patch fix the problem by adding the power on opertion back for uart
console when console_suspend_enabled is true.

Signed-off-by: Ning Jiang &lt;ning.jiang@marvell.com&gt;
Tested-by: Mayank Rana &lt;mrana@codeaurora.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>serial: pxa: work around for errata #20</title>
<updated>2011-11-11T17:35:15+00:00</updated>
<author>
<name>Marcus Folkesson</name>
<email>marcus.folkesson@gmail.com</email>
</author>
<published>2011-08-30T11:53:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d5fe5d1648b88aa16b5d97d088d9b743bc9ce0a8'/>
<id>d5fe5d1648b88aa16b5d97d088d9b743bc9ce0a8</id>
<content type='text'>
commit e44aabd649c80e8be16ede3ed3cbff6fb2561ca9 upstream.

Errata E20: UART: Character Timeout interrupt remains set under certain
software conditions.

Implication: The software servicing the UART can be trapped in an infinite loop.

Signed-off-by: Marcus Folkesson &lt;marcus.folkesson@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit e44aabd649c80e8be16ede3ed3cbff6fb2561ca9 upstream.

Errata E20: UART: Character Timeout interrupt remains set under certain
software conditions.

Implication: The software servicing the UART can be trapped in an infinite loop.

Signed-off-by: Marcus Folkesson &lt;marcus.folkesson@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
</feed>
