<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/tty, branch v3.12.33</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: Fix high cpu load if tty is unreleaseable</title>
<updated>2014-11-13T18:03:00+00:00</updated>
<author>
<name>Peter Hurley</name>
<email>peter@hurleysoftware.com</email>
</author>
<published>2014-10-16T17:51:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=866f9fec24ee1dfa4a40e1d166b6ce3f4c3736de'/>
<id>866f9fec24ee1dfa4a40e1d166b6ce3f4c3736de</id>
<content type='text'>
commit 37b164578826406a173ca7c20d9ba7430134d23e upstream.

Kernel oops can cause the tty to be unreleaseable (for example, if
n_tty_read() crashes while on the read_wait queue). This will cause
tty_release() to endlessly loop without sleeping.

Use a killable sleep timeout which grows by 2n+1 jiffies over the interval
[0, 120 secs.) and then jumps to forever (but still killable).

NB: killable just allows for the task to be rewoken manually, not
to be terminated.

Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 37b164578826406a173ca7c20d9ba7430134d23e upstream.

Kernel oops can cause the tty to be unreleaseable (for example, if
n_tty_read() crashes while on the read_wait queue). This will cause
tty_release() to endlessly loop without sleeping.

Use a killable sleep timeout which grows by 2n+1 jiffies over the interval
[0, 120 secs.) and then jumps to forever (but still killable).

NB: killable just allows for the task to be rewoken manually, not
to be terminated.

Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>serial: Fix divide-by-zero fault in uart_get_divisor()</title>
<updated>2014-11-13T18:02:43+00:00</updated>
<author>
<name>Peter Hurley</name>
<email>peter@hurleysoftware.com</email>
</author>
<published>2014-10-16T17:46:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7261d5fa0fdea0d53ed58c7ce2efad1b2485218e'/>
<id>7261d5fa0fdea0d53ed58c7ce2efad1b2485218e</id>
<content type='text'>
commit 547039ec502076e60034eeb79611df3433a99b7d upstream.

uart_get_baud_rate() will return baud == 0 if the max rate is set
to the "magic" 38400 rate and the SPD_* flags are also specified.
On the first iteration, if the current baud rate is higher than the
max, the baud rate is clamped at the max (which in the degenerate
case is 38400). On the second iteration, the now-"magic" 38400 baud
rate selects the possibly higher alternate baud rate indicated by
the SPD_* flag. Since only two loop iterations are performed, the
loop is exited, a kernel WARNING is generated and a baud rate of
0 is returned.

Reproducible with:
 setserial /dev/ttyS0 spd_hi base_baud 38400

Only perform the "magic" 38400 -&gt; SPD_* baud transform on the first
loop iteration, which prevents the degenerate case from recognizing
the clamped baud rate as the "magic" 38400 value.

Reported-by: Robert Święcki &lt;robert@swiecki.net&gt;
Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 547039ec502076e60034eeb79611df3433a99b7d upstream.

uart_get_baud_rate() will return baud == 0 if the max rate is set
to the "magic" 38400 rate and the SPD_* flags are also specified.
On the first iteration, if the current baud rate is higher than the
max, the baud rate is clamped at the max (which in the degenerate
case is 38400). On the second iteration, the now-"magic" 38400 baud
rate selects the possibly higher alternate baud rate indicated by
the SPD_* flag. Since only two loop iterations are performed, the
loop is exited, a kernel WARNING is generated and a baud rate of
0 is returned.

Reproducible with:
 setserial /dev/ttyS0 spd_hi base_baud 38400

Only perform the "magic" 38400 -&gt; SPD_* baud transform on the first
loop iteration, which prevents the degenerate case from recognizing
the clamped baud rate as the "magic" 38400 value.

Reported-by: Robert Święcki &lt;robert@swiecki.net&gt;
Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tty: omap-serial: fix division by zero</title>
<updated>2014-10-31T14:11:18+00:00</updated>
<author>
<name>Frans Klaver</name>
<email>frans.klaver@xsens.com</email>
</author>
<published>2014-09-25T09:19:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=aa239d85e03075f3b4406d82171d879dae5bf0b2'/>
<id>aa239d85e03075f3b4406d82171d879dae5bf0b2</id>
<content type='text'>
commit dc3187564e61260f49eceb21a4e7eb5e4428e90a upstream.

If the chosen baud rate is large enough (e.g. 3.5 megabaud), the
calculated n values in serial_omap_is_baud_mode16() may become 0. This
causes a division by zero when calculating the difference between
calculated and desired baud rates. To prevent this, cap the n13 and n16
values on 1.

Division by zero in kernel.
[&lt;c00132e0&gt;] (unwind_backtrace) from [&lt;c00112ec&gt;] (show_stack+0x10/0x14)
[&lt;c00112ec&gt;] (show_stack) from [&lt;c01ed7bc&gt;] (Ldiv0+0x8/0x10)
[&lt;c01ed7bc&gt;] (Ldiv0) from [&lt;c023805c&gt;] (serial_omap_baud_is_mode16+0x4c/0x68)
[&lt;c023805c&gt;] (serial_omap_baud_is_mode16) from [&lt;c02396b4&gt;] (serial_omap_set_termios+0x90/0x8d8)
[&lt;c02396b4&gt;] (serial_omap_set_termios) from [&lt;c0230a0c&gt;] (uart_change_speed+0xa4/0xa8)
[&lt;c0230a0c&gt;] (uart_change_speed) from [&lt;c0231798&gt;] (uart_set_termios+0xa0/0x1fc)
[&lt;c0231798&gt;] (uart_set_termios) from [&lt;c022bb44&gt;] (tty_set_termios+0x248/0x2c0)
[&lt;c022bb44&gt;] (tty_set_termios) from [&lt;c022c17c&gt;] (set_termios+0x248/0x29c)
[&lt;c022c17c&gt;] (set_termios) from [&lt;c022c3e4&gt;] (tty_mode_ioctl+0x1c8/0x4e8)
[&lt;c022c3e4&gt;] (tty_mode_ioctl) from [&lt;c0227e70&gt;] (tty_ioctl+0xa94/0xb18)
[&lt;c0227e70&gt;] (tty_ioctl) from [&lt;c00cf45c&gt;] (do_vfs_ioctl+0x4a0/0x560)
[&lt;c00cf45c&gt;] (do_vfs_ioctl) from [&lt;c00cf568&gt;] (SyS_ioctl+0x4c/0x74)
[&lt;c00cf568&gt;] (SyS_ioctl) from [&lt;c000e480&gt;] (ret_fast_syscall+0x0/0x30)

Signed-off-by: Frans Klaver &lt;frans.klaver@xsens.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit dc3187564e61260f49eceb21a4e7eb5e4428e90a upstream.

If the chosen baud rate is large enough (e.g. 3.5 megabaud), the
calculated n values in serial_omap_is_baud_mode16() may become 0. This
causes a division by zero when calculating the difference between
calculated and desired baud rates. To prevent this, cap the n13 and n16
values on 1.

Division by zero in kernel.
[&lt;c00132e0&gt;] (unwind_backtrace) from [&lt;c00112ec&gt;] (show_stack+0x10/0x14)
[&lt;c00112ec&gt;] (show_stack) from [&lt;c01ed7bc&gt;] (Ldiv0+0x8/0x10)
[&lt;c01ed7bc&gt;] (Ldiv0) from [&lt;c023805c&gt;] (serial_omap_baud_is_mode16+0x4c/0x68)
[&lt;c023805c&gt;] (serial_omap_baud_is_mode16) from [&lt;c02396b4&gt;] (serial_omap_set_termios+0x90/0x8d8)
[&lt;c02396b4&gt;] (serial_omap_set_termios) from [&lt;c0230a0c&gt;] (uart_change_speed+0xa4/0xa8)
[&lt;c0230a0c&gt;] (uart_change_speed) from [&lt;c0231798&gt;] (uart_set_termios+0xa0/0x1fc)
[&lt;c0231798&gt;] (uart_set_termios) from [&lt;c022bb44&gt;] (tty_set_termios+0x248/0x2c0)
[&lt;c022bb44&gt;] (tty_set_termios) from [&lt;c022c17c&gt;] (set_termios+0x248/0x29c)
[&lt;c022c17c&gt;] (set_termios) from [&lt;c022c3e4&gt;] (tty_mode_ioctl+0x1c8/0x4e8)
[&lt;c022c3e4&gt;] (tty_mode_ioctl) from [&lt;c0227e70&gt;] (tty_ioctl+0xa94/0xb18)
[&lt;c0227e70&gt;] (tty_ioctl) from [&lt;c00cf45c&gt;] (do_vfs_ioctl+0x4a0/0x560)
[&lt;c00cf45c&gt;] (do_vfs_ioctl) from [&lt;c00cf568&gt;] (SyS_ioctl+0x4c/0x74)
[&lt;c00cf568&gt;] (SyS_ioctl) from [&lt;c000e480&gt;] (ret_fast_syscall+0x0/0x30)

Signed-off-by: Frans Klaver &lt;frans.klaver@xsens.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>serial: 8250: Add Quark X1000 to 8250_pci.c</title>
<updated>2014-10-17T07:43:21+00:00</updated>
<author>
<name>Bryan O'Donoghue</name>
<email>pure.logic@nexus-software.ie</email>
</author>
<published>2014-09-23T00:21:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=bc355676ca09ef8f4a5461b85048c86a65fd5594'/>
<id>bc355676ca09ef8f4a5461b85048c86a65fd5594</id>
<content type='text'>
commit 1ede7dcca3c4fa15a518ab0473126f9c3e621e4c upstream.

Quark X1000 contains two designware derived 8250 serial ports.
Each port has a unique PCI configuration space consisting of
BAR0:UART BAR1:DMA respectively.

Unlike the standard 8250 the register width is 32 bits for RHR,IER etc
The Quark UART has a fundamental clock @ 44.2368 MHz allowing for a
bitrate of up to about 2.76 megabits per second.

This patch enables standard 8250 mode

Signed-off-by: Bryan O'Donoghue &lt;pure.logic@nexus-software.ie&gt;
Reviewed-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 1ede7dcca3c4fa15a518ab0473126f9c3e621e4c upstream.

Quark X1000 contains two designware derived 8250 serial ports.
Each port has a unique PCI configuration space consisting of
BAR0:UART BAR1:DMA respectively.

Unlike the standard 8250 the register width is 32 bits for RHR,IER etc
The Quark UART has a fundamental clock @ 44.2368 MHz allowing for a
bitrate of up to about 2.76 megabits per second.

This patch enables standard 8250 mode

Signed-off-by: Bryan O'Donoghue &lt;pure.logic@nexus-software.ie&gt;
Reviewed-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>serial: 8250_dma: check the result of TX buffer mapping</title>
<updated>2014-10-13T13:41:39+00:00</updated>
<author>
<name>Heikki Krogerus</name>
<email>heikki.krogerus@linux.intel.com</email>
</author>
<published>2014-04-28T12:59:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=77043778de5e2e9c906d9a4a901feabbeac44265'/>
<id>77043778de5e2e9c906d9a4a901feabbeac44265</id>
<content type='text'>
commit d4089a332883ad969700aac5dd4dd5f1c4fee825 upstream.

Using dma_mapping_error() to make sure the mapping did not
fail.

Signed-off-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Cc: "Petallo, MauriceX R" &lt;mauricex.r.petallo@intel.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit d4089a332883ad969700aac5dd4dd5f1c4fee825 upstream.

Using dma_mapping_error() to make sure the mapping did not
fail.

Signed-off-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Cc: "Petallo, MauriceX R" &lt;mauricex.r.petallo@intel.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>serial: core: Preserve termios c_cflag for console resume</title>
<updated>2014-09-03T19:31:25+00:00</updated>
<author>
<name>Peter Hurley</name>
<email>peter@hurleysoftware.com</email>
</author>
<published>2014-07-09T13:21:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c2a167948273d25a531024d67a86b55c4e38d487'/>
<id>c2a167948273d25a531024d67a86b55c4e38d487</id>
<content type='text'>
commit ae84db9661cafc63d179e1d985a2c5b841ff0ac4 upstream.

When a tty is opened for the serial console, the termios c_cflag
settings are inherited from the console line settings.
However, if the tty is subsequently closed, the termios settings
are lost. This results in a garbled console if the console is later
suspended and resumed.

Preserve the termios c_cflag for the serial console when the tty
is shutdown; this reflects the most recent line settings.

Fixes: Bugzilla #69751, 'serial console does not wake from S3'
Reported-by: Valerio Vanni &lt;valerio.vanni@inwind.it&gt;
Acked-by: Alan Cox &lt;alan@linux.intel.com&gt;
Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit ae84db9661cafc63d179e1d985a2c5b841ff0ac4 upstream.

When a tty is opened for the serial console, the termios c_cflag
settings are inherited from the console line settings.
However, if the tty is subsequently closed, the termios settings
are lost. This results in a garbled console if the console is later
suspended and resumed.

Preserve the termios c_cflag for the serial console when the tty
is shutdown; this reflects the most recent line settings.

Fixes: Bugzilla #69751, 'serial console does not wake from S3'
Reported-by: Valerio Vanni &lt;valerio.vanni@inwind.it&gt;
Acked-by: Alan Cox &lt;alan@linux.intel.com&gt;
Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sunsab: Fix detection of BREAK on sunsab serial console</title>
<updated>2014-08-26T12:12:00+00:00</updated>
<author>
<name>Christopher Alexander Tobias Schulze</name>
<email>cat.schulze@alice-dsl.net</email>
</author>
<published>2014-08-03T14:01:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5c1c4ea37d89f674b1f9583ac87c2045a4e365ff'/>
<id>5c1c4ea37d89f674b1f9583ac87c2045a4e365ff</id>
<content type='text'>
[ Upstream commit fe418231b195c205701c0cc550a03f6c9758fd9e ]

Fix detection of BREAK on sunsab serial console: BREAK detection was only
performed when there were also serial characters received simultaneously.
To handle all BREAKs correctly, the check for BREAK and the corresponding
call to uart_handle_break() must also be done if count == 0, therefore
duplicate this code fragment and pull it out of the loop over the received
characters.

Patch applies to 3.16-rc6.

Signed-off-by: Christopher Alexander Tobias Schulze &lt;cat.schulze@alice-dsl.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit fe418231b195c205701c0cc550a03f6c9758fd9e ]

Fix detection of BREAK on sunsab serial console: BREAK detection was only
performed when there were also serial characters received simultaneously.
To handle all BREAKs correctly, the check for BREAK and the corresponding
call to uart_handle_break() must also be done if count == 0, therefore
duplicate this code fragment and pull it out of the loop over the received
characters.

Patch applies to 3.16-rc6.

Signed-off-by: Christopher Alexander Tobias Schulze &lt;cat.schulze@alice-dsl.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>serial: sirf: Fix compilation failure</title>
<updated>2014-07-28T07:12:20+00:00</updated>
<author>
<name>Daniel Thompson</name>
<email>daniel.thompson@linaro.org</email>
</author>
<published>2014-05-29T10:13:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a2c27add78eb2823f4fc588cc851327f8b5644e1'/>
<id>a2c27add78eb2823f4fc588cc851327f8b5644e1</id>
<content type='text'>
commit 58eb97c99da6a82c556ddec70683eb3863d4f617 upstream.

After 07d410e0) serial: sirf: fix spinlock deadlock issue it is no longer
possiblet to compile this driver. The rename of one of the spinlocks is
faulty. After looking at the original patch I believe this is the correct
fix.

Compile tested using ARM's multi_v7_defconfig

Reported-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Cc: Jiri Slaby &lt;jslaby@suse.cz&gt;
Cc: Qipan Li &lt;Qipan.Li@csr.com&gt;
Signed-off-by: Daniel Thompson &lt;daniel.thompson@linaro.org&gt;
Acked-by: Barry Song &lt;baohua@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 58eb97c99da6a82c556ddec70683eb3863d4f617 upstream.

After 07d410e0) serial: sirf: fix spinlock deadlock issue it is no longer
possiblet to compile this driver. The rename of one of the spinlocks is
faulty. After looking at the original patch I believe this is the correct
fix.

Compile tested using ARM's multi_v7_defconfig

Reported-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Cc: Jiri Slaby &lt;jslaby@suse.cz&gt;
Cc: Qipan Li &lt;Qipan.Li@csr.com&gt;
Signed-off-by: Daniel Thompson &lt;daniel.thompson@linaro.org&gt;
Acked-by: Barry Song &lt;baohua@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>serial: sirf: fix spinlock deadlock issue</title>
<updated>2014-07-28T07:12:15+00:00</updated>
<author>
<name>Qipan Li</name>
<email>Qipan.Li@csr.com</email>
</author>
<published>2014-05-26T11:02:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=67aedbd928624d9e7e44c531ae3e2f18f099eb3f'/>
<id>67aedbd928624d9e7e44c531ae3e2f18f099eb3f</id>
<content type='text'>
commit 07d410e06463f3c1c106e2bb2a7ff23eff1e71c9 upstream.

commit fb78b811422cd2d8c8605949cc4cc13618347ad5 provide a workaround for
kernel panic, but bring potential deadlock risk. that is in
sirfsoc_rx_tmo_process_tl while enter into sirfsoc_uart_pio_rx_chars
cpu hold uart_port-&gt;lock, if uart interrupt comes cpu enter into
sirfsoc_uart_isr and deadlock occurs in getting uart_port-&gt;lock.

the patch replace spin_lock version to spin_lock_irq* version to avoid
spinlock dead lock issue. let function tty_flip_buffer_push in tasklet
outof spin_lock_irq* protect area to avoid add the pair of spin_lock and
spin_unlock for tty_flip_buffer_push.
BTW drop self defined unused spinlock protect of tx_lock/rx_lock.

56274.220464] BUG: spinlock lockup suspected on CPU#0, swapper/0/0
[56274.223648]  lock: 0xc05d9db0, .magic: dead4ead, .owner: swapper/0/0,
	.owner_cpu: 0
	[56274.231278] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G
	O 3.10.35 #1
	[56274.238241] [&lt;c0015530&gt;] (unwind_backtrace+0x0/0xf4) from
	[&lt;c00120d8&gt;] (show_stack+0x10/0x14)
	[56274.246742] [&lt;c00120d8&gt;] (show_stack+0x10/0x14) from
	[&lt;c01b11b0&gt;] (do_raw_spin_lock+0x110/0x184)
	[56274.255501] [&lt;c01b11b0&gt;] (do_raw_spin_lock+0x110/0x184) from
	[&lt;c02124c8&gt;] (sirfsoc_uart_isr+0x20/0x42c)
	[56274.264874] [&lt;c02124c8&gt;] (sirfsoc_uart_isr+0x20/0x42c) from
	[&lt;c0075790&gt;] (handle_irq_event_percpu+0x54/0x17c)
	[56274.274758] [&lt;c0075790&gt;] (handle_irq_event_percpu+0x54/0x17c)
	from [&lt;c00758f4&gt;] (handle_irq_event+0x3c/0x5c)
	[56274.284561] [&lt;c00758f4&gt;] (handle_irq_event+0x3c/0x5c) from
	[&lt;c0077fa0&gt;] (handle_level_irq+0x98/0xfc)
	[56274.293670] [&lt;c0077fa0&gt;] (handle_level_irq+0x98/0xfc) from
	[&lt;c0074f44&gt;] (generic_handle_irq+0x2c/0x3c)
	[56274.302952] [&lt;c0074f44&gt;] (generic_handle_irq+0x2c/0x3c) from
	[&lt;c000ef80&gt;] (handle_IRQ+0x40/0x90)
	[56274.311706] [&lt;c000ef80&gt;] (handle_IRQ+0x40/0x90) from
	[&lt;c000dc80&gt;] (__irq_svc+0x40/0x70)
	[56274.319697] [&lt;c000dc80&gt;] (__irq_svc+0x40/0x70) from
	[&lt;c038113c&gt;] (_raw_spin_unlock_irqrestore+0x10/0x48)
	[56274.329158] [&lt;c038113c&gt;]
	(_raw_spin_unlock_irqrestore+0x10/0x48) from [&lt;c0200034&gt;]
	(tty_port_tty_get+0x58/0x90)
	[56274.339213] [&lt;c0200034&gt;] (tty_port_tty_get+0x58/0x90) from
	[&lt;c0212008&gt;] (sirfsoc_uart_pio_rx_chars+0x1c/0xc8)
	[56274.349097] [&lt;c0212008&gt;]
	(sirfsoc_uart_pio_rx_chars+0x1c/0xc8) from [&lt;c0212ef8&gt;]
	(sirfsoc_rx_tmo_process_tl+0xe4/0x1fc)
	[56274.359853] [&lt;c0212ef8&gt;]
	(sirfsoc_rx_tmo_process_tl+0xe4/0x1fc) from [&lt;c0027c04&gt;]
	(tasklet_action+0x84/0x114)
	[56274.369739] [&lt;c0027c04&gt;] (tasklet_action+0x84/0x114) from
	[&lt;c0027db4&gt;] (__do_softirq+0x120/0x200)
	[56274.378585] [&lt;c0027db4&gt;] (__do_softirq+0x120/0x200) from
	[&lt;c0027f44&gt;] (do_softirq+0x54/0x5c)
	[56274.386998] [&lt;c0027f44&gt;] (do_softirq+0x54/0x5c) from
	[&lt;c00281ec&gt;] (irq_exit+0x9c/0xd0)
	[56274.394899] [&lt;c00281ec&gt;] (irq_exit+0x9c/0xd0) from
	[&lt;c000ef84&gt;] (handle_IRQ+0x44/0x90)
	[56274.402790] [&lt;c000ef84&gt;] (handle_IRQ+0x44/0x90) from
	[&lt;c000dc80&gt;] (__irq_svc+0x40/0x70)
	[56274.410774] [&lt;c000dc80&gt;] (__irq_svc+0x40/0x70) from
	[&lt;c0288af4&gt;] (cpuidle_enter_state+0x50/0xe0)
	[56274.419532] [&lt;c0288af4&gt;] (cpuidle_enter_state+0x50/0xe0) from
	[&lt;c0288c34&gt;] (cpuidle_idle_call+0xb0/0x148)
	[56274.429080] [&lt;c0288c34&gt;] (cpuidle_idle_call+0xb0/0x148) from
	[&lt;c000f3ac&gt;] (arch_cpu_idle+0x8/0x38)
	[56274.438016] [&lt;c000f3ac&gt;] (arch_cpu_idle+0x8/0x38) from
	[&lt;c0059344&gt;] (cpu_startup_entry+0xfc/0x140)
	[56274.446956] [&lt;c0059344&gt;] (cpu_startup_entry+0xfc/0x140) from
	[&lt;c04a3a54&gt;] (start_kernel+0x2d8/0x2e4)

Signed-off-by: Qipan Li &lt;Qipan.Li@csr.com&gt;
Signed-off-by: Barry Song &lt;Baohua.Song@csr.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 07d410e06463f3c1c106e2bb2a7ff23eff1e71c9 upstream.

commit fb78b811422cd2d8c8605949cc4cc13618347ad5 provide a workaround for
kernel panic, but bring potential deadlock risk. that is in
sirfsoc_rx_tmo_process_tl while enter into sirfsoc_uart_pio_rx_chars
cpu hold uart_port-&gt;lock, if uart interrupt comes cpu enter into
sirfsoc_uart_isr and deadlock occurs in getting uart_port-&gt;lock.

the patch replace spin_lock version to spin_lock_irq* version to avoid
spinlock dead lock issue. let function tty_flip_buffer_push in tasklet
outof spin_lock_irq* protect area to avoid add the pair of spin_lock and
spin_unlock for tty_flip_buffer_push.
BTW drop self defined unused spinlock protect of tx_lock/rx_lock.

56274.220464] BUG: spinlock lockup suspected on CPU#0, swapper/0/0
[56274.223648]  lock: 0xc05d9db0, .magic: dead4ead, .owner: swapper/0/0,
	.owner_cpu: 0
	[56274.231278] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G
	O 3.10.35 #1
	[56274.238241] [&lt;c0015530&gt;] (unwind_backtrace+0x0/0xf4) from
	[&lt;c00120d8&gt;] (show_stack+0x10/0x14)
	[56274.246742] [&lt;c00120d8&gt;] (show_stack+0x10/0x14) from
	[&lt;c01b11b0&gt;] (do_raw_spin_lock+0x110/0x184)
	[56274.255501] [&lt;c01b11b0&gt;] (do_raw_spin_lock+0x110/0x184) from
	[&lt;c02124c8&gt;] (sirfsoc_uart_isr+0x20/0x42c)
	[56274.264874] [&lt;c02124c8&gt;] (sirfsoc_uart_isr+0x20/0x42c) from
	[&lt;c0075790&gt;] (handle_irq_event_percpu+0x54/0x17c)
	[56274.274758] [&lt;c0075790&gt;] (handle_irq_event_percpu+0x54/0x17c)
	from [&lt;c00758f4&gt;] (handle_irq_event+0x3c/0x5c)
	[56274.284561] [&lt;c00758f4&gt;] (handle_irq_event+0x3c/0x5c) from
	[&lt;c0077fa0&gt;] (handle_level_irq+0x98/0xfc)
	[56274.293670] [&lt;c0077fa0&gt;] (handle_level_irq+0x98/0xfc) from
	[&lt;c0074f44&gt;] (generic_handle_irq+0x2c/0x3c)
	[56274.302952] [&lt;c0074f44&gt;] (generic_handle_irq+0x2c/0x3c) from
	[&lt;c000ef80&gt;] (handle_IRQ+0x40/0x90)
	[56274.311706] [&lt;c000ef80&gt;] (handle_IRQ+0x40/0x90) from
	[&lt;c000dc80&gt;] (__irq_svc+0x40/0x70)
	[56274.319697] [&lt;c000dc80&gt;] (__irq_svc+0x40/0x70) from
	[&lt;c038113c&gt;] (_raw_spin_unlock_irqrestore+0x10/0x48)
	[56274.329158] [&lt;c038113c&gt;]
	(_raw_spin_unlock_irqrestore+0x10/0x48) from [&lt;c0200034&gt;]
	(tty_port_tty_get+0x58/0x90)
	[56274.339213] [&lt;c0200034&gt;] (tty_port_tty_get+0x58/0x90) from
	[&lt;c0212008&gt;] (sirfsoc_uart_pio_rx_chars+0x1c/0xc8)
	[56274.349097] [&lt;c0212008&gt;]
	(sirfsoc_uart_pio_rx_chars+0x1c/0xc8) from [&lt;c0212ef8&gt;]
	(sirfsoc_rx_tmo_process_tl+0xe4/0x1fc)
	[56274.359853] [&lt;c0212ef8&gt;]
	(sirfsoc_rx_tmo_process_tl+0xe4/0x1fc) from [&lt;c0027c04&gt;]
	(tasklet_action+0x84/0x114)
	[56274.369739] [&lt;c0027c04&gt;] (tasklet_action+0x84/0x114) from
	[&lt;c0027db4&gt;] (__do_softirq+0x120/0x200)
	[56274.378585] [&lt;c0027db4&gt;] (__do_softirq+0x120/0x200) from
	[&lt;c0027f44&gt;] (do_softirq+0x54/0x5c)
	[56274.386998] [&lt;c0027f44&gt;] (do_softirq+0x54/0x5c) from
	[&lt;c00281ec&gt;] (irq_exit+0x9c/0xd0)
	[56274.394899] [&lt;c00281ec&gt;] (irq_exit+0x9c/0xd0) from
	[&lt;c000ef84&gt;] (handle_IRQ+0x44/0x90)
	[56274.402790] [&lt;c000ef84&gt;] (handle_IRQ+0x44/0x90) from
	[&lt;c000dc80&gt;] (__irq_svc+0x40/0x70)
	[56274.410774] [&lt;c000dc80&gt;] (__irq_svc+0x40/0x70) from
	[&lt;c0288af4&gt;] (cpuidle_enter_state+0x50/0xe0)
	[56274.419532] [&lt;c0288af4&gt;] (cpuidle_enter_state+0x50/0xe0) from
	[&lt;c0288c34&gt;] (cpuidle_idle_call+0xb0/0x148)
	[56274.429080] [&lt;c0288c34&gt;] (cpuidle_idle_call+0xb0/0x148) from
	[&lt;c000f3ac&gt;] (arch_cpu_idle+0x8/0x38)
	[56274.438016] [&lt;c000f3ac&gt;] (arch_cpu_idle+0x8/0x38) from
	[&lt;c0059344&gt;] (cpu_startup_entry+0xfc/0x140)
	[56274.446956] [&lt;c0059344&gt;] (cpu_startup_entry+0xfc/0x140) from
	[&lt;c04a3a54&gt;] (start_kernel+0x2d8/0x2e4)

Signed-off-by: Qipan Li &lt;Qipan.Li@csr.com&gt;
Signed-off-by: Barry Song &lt;Baohua.Song@csr.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tty: Correct INPCK handling</title>
<updated>2014-07-18T13:51:10+00:00</updated>
<author>
<name>Peter Hurley</name>
<email>peter@hurleysoftware.com</email>
</author>
<published>2014-06-16T12:10:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ad4a4e1ff95b3c7e02a7ce993d7e7c6e07f5f6d0'/>
<id>ad4a4e1ff95b3c7e02a7ce993d7e7c6e07f5f6d0</id>
<content type='text'>
commit 66528f90669691c85c73bea4f0c9f4a5857c4cab upstream.

If INPCK is not set, input parity detection should be disabled. This means
parity errors should not be received from the tty driver, and the data
received should be treated normally.

SUS v3, 11.2.2, General Terminal Interface - Input Modes, states:
  "If INPCK is set, input parity checking shall be enabled. If INPCK is
   not set, input parity checking shall be disabled, allowing output parity
   generation without input parity errors. Note that whether input parity
   checking is enabled or disabled is independent of whether parity detection
   is enabled or disabled (see Control Modes). If parity detection is enabled
   but input parity checking is disabled, the hardware to which the terminal
   is connected shall recognize the parity bit, but the terminal special file
   shall not check whether or not this bit is correctly set."

Ignore parity errors reported by the tty driver when INPCK is not set, and
handle the received data normally.

Fixes: Bugzilla #71681, 'Improvement of n_tty_receive_parity_error from n_tty.c'
Reported-by: Ivan &lt;athlon_@mail.ru&gt;
Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 66528f90669691c85c73bea4f0c9f4a5857c4cab upstream.

If INPCK is not set, input parity detection should be disabled. This means
parity errors should not be received from the tty driver, and the data
received should be treated normally.

SUS v3, 11.2.2, General Terminal Interface - Input Modes, states:
  "If INPCK is set, input parity checking shall be enabled. If INPCK is
   not set, input parity checking shall be disabled, allowing output parity
   generation without input parity errors. Note that whether input parity
   checking is enabled or disabled is independent of whether parity detection
   is enabled or disabled (see Control Modes). If parity detection is enabled
   but input parity checking is disabled, the hardware to which the terminal
   is connected shall recognize the parity bit, but the terminal special file
   shall not check whether or not this bit is correctly set."

Ignore parity errors reported by the tty driver when INPCK is not set, and
handle the received data normally.

Fixes: Bugzilla #71681, 'Improvement of n_tty_receive_parity_error from n_tty.c'
Reported-by: Ivan &lt;athlon_@mail.ru&gt;
Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</pre>
</div>
</content>
</entry>
</feed>
