<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/tty/serial/altera_uart.c, branch linux-3.19.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>tty: serial: drop owner assignment from platform_drivers</title>
<updated>2014-10-20T14:21:45+00:00</updated>
<author>
<name>Wolfram Sang</name>
<email>wsa@the-dreams.de</email>
</author>
<published>2014-10-20T14:21:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=9144b3cded04a05d4b4e18dc9dcfb5b8ada3f2fc'/>
<id>9144b3cded04a05d4b4e18dc9dcfb5b8ada3f2fc</id>
<content type='text'>
A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>serial: altera: Make of_device_id arrays const</title>
<updated>2014-09-08T22:28:28+00:00</updated>
<author>
<name>Tobias Klauser</name>
<email>tklauser@distanz.ch</email>
</author>
<published>2014-08-05T07:14:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=4d199a55c41b25f4255eaeea358f944e33e91a4b'/>
<id>4d199a55c41b25f4255eaeea358f944e33e91a4b</id>
<content type='text'>
Make the of_device_id arrays const, as it is handled as const by all OF
functions.

Signed-off-by: Tobias Klauser &lt;tklauser@distanz.ch&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make the of_device_id arrays const, as it is handled as const by all OF
functions.

Signed-off-by: Tobias Klauser &lt;tklauser@distanz.ch&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>serial: altera: Adopt uart_console_write()</title>
<updated>2014-07-12T00:49:46+00:00</updated>
<author>
<name>Daniel Thompson</name>
<email>daniel.thompson@linaro.org</email>
</author>
<published>2014-07-11T13:00:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=2970b7f5ea3cea2f169ca23fd863e24d03748ffd'/>
<id>2970b7f5ea3cea2f169ca23fd863e24d03748ffd</id>
<content type='text'>
This driver does not currently use uart_console_write() and instead
provides is own LF to LFCR conversion in it's console_write() method.
We should use the library function instead.

Cmopile tested only (with ARCH=arm).

Signed-off-by: Daniel Thompson &lt;daniel.thompson@linaro.org&gt;
Cc: Tobias Klauser &lt;tklauser@distanz.ch&gt;
Cc: Jiri Slaby &lt;jslaby@suse.cz&gt;
Cc: linux-serial@vger.kernel.org
Cc: nios2-dev@lists.rocketboards.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This driver does not currently use uart_console_write() and instead
provides is own LF to LFCR conversion in it's console_write() method.
We should use the library function instead.

Cmopile tested only (with ARCH=arm).

Signed-off-by: Daniel Thompson &lt;daniel.thompson@linaro.org&gt;
Cc: Tobias Klauser &lt;tklauser@distanz.ch&gt;
Cc: Jiri Slaby &lt;jslaby@suse.cz&gt;
Cc: linux-serial@vger.kernel.org
Cc: nios2-dev@lists.rocketboards.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>serial: treewide: Remove empty implementations of enable_ms()</title>
<updated>2014-07-10T00:29:38+00:00</updated>
<author>
<name>Alexander Shiyan</name>
<email>shc_work@mail.ru</email>
</author>
<published>2014-06-03T14:54:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=8b152f1096975d012f60387b899d407e4a93b46c'/>
<id>8b152f1096975d012f60387b899d407e4a93b46c</id>
<content type='text'>
Signed-off-by: Alexander Shiyan &lt;shc_work@mail.ru&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Alexander Shiyan &lt;shc_work@mail.ru&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>serial: Fix IGNBRK handling</title>
<updated>2014-06-19T20:04:52+00:00</updated>
<author>
<name>Peter Hurley</name>
<email>peter@hurleysoftware.com</email>
</author>
<published>2014-06-16T12:10:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ef8b9ddcb45fa3b1e11acd72be2398001e807d14'/>
<id>ef8b9ddcb45fa3b1e11acd72be2398001e807d14</id>
<content type='text'>
If IGNBRK is set without either BRKINT or PARMRK set, some uart
drivers send a 0x00 byte for BREAK without the TTYBREAK flag to the
line discipline, when it should send either nothing or the TTYBREAK flag
set. This happens because the read_status_mask masks out the BI
condition, which uart_insert_char() then interprets as a normal 0x00 byte.

SUS v3 is clear regarding the meaning of IGNBRK; Section 11.2.2, General
Terminal Interface - Input Modes, states:
  "If IGNBRK is set, a break condition detected on input shall be ignored;
   that is, not put on the input queue and therefore not read by any
   process."

Fix read_status_mask to include the BI bit if IGNBRK is set; the
lsr status retains the BI bit if a BREAK is recv'd, which is
subsequently ignored in uart_insert_char() when masked with the
ignore_status_mask.

Affected drivers:
8250 - all
serial_txx9
mfd
amba-pl010
amba-pl011
atmel_serial
bfin_uart
dz
ip22zilog
max310x
mxs-auart
netx-serial
pnx8xxx_uart
pxa
sb1250-duart
sccnxp
serial_ks8695
sirfsoc_uart
st-asc
vr41xx_siu
zs
sunzilog
fsl_lpuart
sunsab
ucc_uart
bcm63xx_uart
sunsu
efm32-uart
pmac_zilog
mpsc
msm_serial
m32r_sio

Unaffected drivers:
omap-serial
rp2
sa1100
imx
icom

Annotated for fixes:
altera_uart
mcf

Drivers without break detection:
21285
xilinx-uartps
altera_jtaguart
apbuart
arc-uart
clps711x
max3100
uartlite
msm_serial_hs
nwpserial
lantiq
vt8500_serial

Unknown:
samsung
mpc52xx_uart
bfin_sport_uart
cpm_uart/core

Fixes: Bugzilla #71651, '8250_core.c incorrectly handles IGNBRK flag'
Reported-by: Ivan &lt;athlon_@mail.ru&gt;
Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If IGNBRK is set without either BRKINT or PARMRK set, some uart
drivers send a 0x00 byte for BREAK without the TTYBREAK flag to the
line discipline, when it should send either nothing or the TTYBREAK flag
set. This happens because the read_status_mask masks out the BI
condition, which uart_insert_char() then interprets as a normal 0x00 byte.

SUS v3 is clear regarding the meaning of IGNBRK; Section 11.2.2, General
Terminal Interface - Input Modes, states:
  "If IGNBRK is set, a break condition detected on input shall be ignored;
   that is, not put on the input queue and therefore not read by any
   process."

Fix read_status_mask to include the BI bit if IGNBRK is set; the
lsr status retains the BI bit if a BREAK is recv'd, which is
subsequently ignored in uart_insert_char() when masked with the
ignore_status_mask.

Affected drivers:
8250 - all
serial_txx9
mfd
amba-pl010
amba-pl011
atmel_serial
bfin_uart
dz
ip22zilog
max310x
mxs-auart
netx-serial
pnx8xxx_uart
pxa
sb1250-duart
sccnxp
serial_ks8695
sirfsoc_uart
st-asc
vr41xx_siu
zs
sunzilog
fsl_lpuart
sunsab
ucc_uart
bcm63xx_uart
sunsu
efm32-uart
pmac_zilog
mpsc
msm_serial
m32r_sio

Unaffected drivers:
omap-serial
rp2
sa1100
imx
icom

Annotated for fixes:
altera_uart
mcf

Drivers without break detection:
21285
xilinx-uartps
altera_jtaguart
apbuart
arc-uart
clps711x
max3100
uartlite
msm_serial_hs
nwpserial
lantiq
vt8500_serial

Unknown:
samsung
mpc52xx_uart
bfin_sport_uart
cpm_uart/core

Fixes: Bugzilla #71651, '8250_core.c incorrectly handles IGNBRK flag'
Reported-by: Ivan &lt;athlon_@mail.ru&gt;
Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'dt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc</title>
<updated>2013-09-06T20:26:27+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2013-09-06T20:26:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=dccfd1e439c11422d7aca0d834b0430d24650e85'/>
<id>dccfd1e439c11422d7aca0d834b0430d24650e85</id>
<content type='text'>
Pull ARM SoC DT updates from Olof Johansson:
 "Device tree and bindings updates for 3.12.

  General additions of various on-chip and on-board peripherals on
  various platforms as support gets added.  Some of the bigger changes
  are:

   - Addition of (new) PCI-e support on Tegra.
   - More Tegra4 support, including PMC configuration for Dalmore.
   - Addition of a new board for Exynos4 (trats2) and more bindings for
     4x12 IP.
   - Addition of Allwinner A20 and A31 SoC and board files.
   - Move of the ST Ericsson device tree files to now use ste-* prefix.
   - More move of hardware description of shmobile platforms to DT.
   - Two new board dts files for Freescale MXs"

* tag 'dt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (177 commits)
  dts: Rename DW APB timer compatible strings
  dts: Deprecate ALTR as a vendor prefix
  of: add vendor prefix for Altera Corp.
  ARM: at91/dt: sam9x5ek: add sound configuration
  ARM: at91/dt: sam9x5ek: enable SSC
  ARM: at91/dt: sam9x5ek: add WM8731 codec
  ARM: at91/dt: sam9x5: add SSC DMA parameters
  ARM: at91/dt: add at91rm9200 PQFP package version
  ARM: at91: at91rm9200: set default mmc0 pinctrl-names
  ARM: at91: at91sam9n12: correct pin number of gpio-key
  ARM: at91: at91sam9n12: add qt1070 support
  ARM: at91: at91sam9n12: add pinctrl of TWI
  ARM: at91: Add PMU support for sama5d3
  ARM: at91: at91sam9260: add missing pinctrl-names on mmc
  ARM: tegra: configure power off for Dalmore
  ARM: DT: binding fixup to align with vendor-prefixes.txt (DT)
  ARM: dts: add sdio blocks to bcm28155-ap board
  ARM: dts: align sdio numbers to HW definition
  ARM: sun7i: Add Olimex A20-Olinuxino-Micro support
  ARM: sun7i: Add Allwinner A20 DTSI
  ...
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull ARM SoC DT updates from Olof Johansson:
 "Device tree and bindings updates for 3.12.

  General additions of various on-chip and on-board peripherals on
  various platforms as support gets added.  Some of the bigger changes
  are:

   - Addition of (new) PCI-e support on Tegra.
   - More Tegra4 support, including PMC configuration for Dalmore.
   - Addition of a new board for Exynos4 (trats2) and more bindings for
     4x12 IP.
   - Addition of Allwinner A20 and A31 SoC and board files.
   - Move of the ST Ericsson device tree files to now use ste-* prefix.
   - More move of hardware description of shmobile platforms to DT.
   - Two new board dts files for Freescale MXs"

* tag 'dt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (177 commits)
  dts: Rename DW APB timer compatible strings
  dts: Deprecate ALTR as a vendor prefix
  of: add vendor prefix for Altera Corp.
  ARM: at91/dt: sam9x5ek: add sound configuration
  ARM: at91/dt: sam9x5ek: enable SSC
  ARM: at91/dt: sam9x5ek: add WM8731 codec
  ARM: at91/dt: sam9x5: add SSC DMA parameters
  ARM: at91/dt: add at91rm9200 PQFP package version
  ARM: at91: at91rm9200: set default mmc0 pinctrl-names
  ARM: at91: at91sam9n12: correct pin number of gpio-key
  ARM: at91: at91sam9n12: add qt1070 support
  ARM: at91: at91sam9n12: add pinctrl of TWI
  ARM: at91: Add PMU support for sama5d3
  ARM: at91: at91sam9260: add missing pinctrl-names on mmc
  ARM: tegra: configure power off for Dalmore
  ARM: DT: binding fixup to align with vendor-prefixes.txt (DT)
  ARM: dts: add sdio blocks to bcm28155-ap board
  ARM: dts: align sdio numbers to HW definition
  ARM: sun7i: Add Olimex A20-Olinuxino-Micro support
  ARM: sun7i: Add Allwinner A20 DTSI
  ...
</pre>
</div>
</content>
</entry>
<entry>
<title>dts: Deprecate ALTR as a vendor prefix</title>
<updated>2013-08-29T19:58:55+00:00</updated>
<author>
<name>Dinh Nguyen</name>
<email>dinguyen@altera.com</email>
</author>
<published>2013-08-14T20:25:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=13960b47dc1df695f8537c32a0e0ce5ae5d4eee4'/>
<id>13960b47dc1df695f8537c32a0e0ce5ae5d4eee4</id>
<content type='text'>
Because most of the vendor prefixes are lower case, deprecate
the vendor prefix "ALTR" in place of "altr" for Altera Corp..

Signed-off-by: Dinh Nguyen &lt;dinguyen@altera.com&gt;
Acked-by: Stephen Warren &lt;swarren@wwwdotorg.org&gt;
Cc: Rob Herring &lt;rob.herring@calxeda.com&gt;
Cc: Pawel Moll &lt;pawel.moll@arm.com&gt;
Cc: Mark Rutland &lt;mark.rutland@arm.com&gt;
Cc: Stephen Warren &lt;swarren@wwwdotorg.org&gt;
Cc: Ian Campbell &lt;ian.campbell@citrix.com&gt;
Cc: devicetree@vger.kernel.org
Signed-off-by: Olof Johansson &lt;olof@lixom.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Because most of the vendor prefixes are lower case, deprecate
the vendor prefix "ALTR" in place of "altr" for Altera Corp..

Signed-off-by: Dinh Nguyen &lt;dinguyen@altera.com&gt;
Acked-by: Stephen Warren &lt;swarren@wwwdotorg.org&gt;
Cc: Rob Herring &lt;rob.herring@calxeda.com&gt;
Cc: Pawel Moll &lt;pawel.moll@arm.com&gt;
Cc: Mark Rutland &lt;mark.rutland@arm.com&gt;
Cc: Stephen Warren &lt;swarren@wwwdotorg.org&gt;
Cc: Ian Campbell &lt;ian.campbell@citrix.com&gt;
Cc: devicetree@vger.kernel.org
Signed-off-by: Olof Johansson &lt;olof@lixom.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tty: serial: altera: drop uart_port-&gt;lock before calling tty_flip_buffer_push()</title>
<updated>2013-08-27T23:17:33+00:00</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2013-08-19T14:44:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=dd085ed8ef6c97e0b606da304856b36e0d3496ac'/>
<id>dd085ed8ef6c97e0b606da304856b36e0d3496ac</id>
<content type='text'>
The current driver triggers a lockdep warning for if tty_flip_buffer_push() is
called with uart_port-&gt;lock locked. This never shows up on UP kernels and comes
up only on SMP kernels.

Crash looks like this (produced with samsung.c driver):

-----
[&lt;c0014d58&gt;] (unwind_backtrace+0x0/0xf8) from [&lt;c0011908&gt;] (show_stack+0x10/0x14)
[&lt;c0011908&gt;] (show_stack+0x10/0x14) from [&lt;c035da34&gt;] (dump_stack+0x6c/0xac)
[&lt;c035da34&gt;] (dump_stack+0x6c/0xac) from [&lt;c01b59ac&gt;] (do_raw_spin_unlock+0xc4/0xd8)
[&lt;c01b59ac&gt;] (do_raw_spin_unlock+0xc4/0xd8) from [&lt;c03627e4&gt;] (_raw_spin_unlock_irqrestore+0xc/0)
[&lt;c03627e4&gt;] (_raw_spin_unlock_irqrestore+0xc/0x38) from [&lt;c020a1a8&gt;] (s3c24xx_serial_rx_chars+0)
[&lt;c020a1a8&gt;] (s3c24xx_serial_rx_chars+0x12c/0x260) from [&lt;c020aae8&gt;] (s3c64xx_serial_handle_irq+)
[&lt;c020aae8&gt;] (s3c64xx_serial_handle_irq+0x48/0x60) from [&lt;c006aaa0&gt;] (handle_irq_event_percpu+0x)
[&lt;c006aaa0&gt;] (handle_irq_event_percpu+0x50/0x194) from [&lt;c006ac20&gt;] (handle_irq_event+0x3c/0x5c)
[&lt;c006ac20&gt;] (handle_irq_event+0x3c/0x5c) from [&lt;c006d864&gt;] (handle_fasteoi_irq+0x80/0x13c)
[&lt;c006d864&gt;] (handle_fasteoi_irq+0x80/0x13c) from [&lt;c006a4a4&gt;] (generic_handle_irq+0x20/0x30)
[&lt;c006a4a4&gt;] (generic_handle_irq+0x20/0x30) from [&lt;c000f454&gt;] (handle_IRQ+0x38/0x94)
[&lt;c000f454&gt;] (handle_IRQ+0x38/0x94) from [&lt;c0008538&gt;] (gic_handle_irq+0x34/0x68)
[&lt;c0008538&gt;] (gic_handle_irq+0x34/0x68) from [&lt;c00123c0&gt;] (__irq_svc+0x40/0x70)
Exception stack(0xc04cdf70 to 0xc04cdfb8)
df60:                                     00000000 00000000 0000166e 00000000
df80: c04cc000 c050278f c050278f 00000001 c04d444c 410fc0f4 c03649b0 00000000
dfa0: 00000001 c04cdfb8 c000f758 c000f75c 60070013 ffffffff
[&lt;c00123c0&gt;] (__irq_svc+0x40/0x70) from [&lt;c000f75c&gt;] (arch_cpu_idle+0x28/0x30)
[&lt;c000f75c&gt;] (arch_cpu_idle+0x28/0x30) from [&lt;c0054888&gt;] (cpu_startup_entry+0x5c/0x148)
[&lt;c0054888&gt;] (cpu_startup_entry+0x5c/0x148) from [&lt;c0497aa4&gt;] (start_kernel+0x334/0x38c)
BUG: spinlock lockup suspected on CPU#0, kworker/0:1/360
 lock: s3c24xx_serial_ports+0x1d8/0x370, .magic: dead4ead, .owner: &lt;none&gt;/-1, .owner_cpu: -1
CPU: 0 PID: 360 Comm: kworker/0:1 Not tainted 3.11.0-rc6-next-20130819-00003-g75485f1 #2
Workqueue: events flush_to_ldisc
[&lt;c0014d58&gt;] (unwind_backtrace+0x0/0xf8) from [&lt;c0011908&gt;] (show_stack+0x10/0x14)
[&lt;c0011908&gt;] (show_stack+0x10/0x14) from [&lt;c035da34&gt;] (dump_stack+0x6c/0xac)
[&lt;c035da34&gt;] (dump_stack+0x6c/0xac) from [&lt;c01b581c&gt;] (do_raw_spin_lock+0x100/0x17c)
[&lt;c01b581c&gt;] (do_raw_spin_lock+0x100/0x17c) from [&lt;c03628a0&gt;] (_raw_spin_lock_irqsave+0x20/0x28)
[&lt;c03628a0&gt;] (_raw_spin_lock_irqsave+0x20/0x28) from [&lt;c0203224&gt;] (uart_start+0x18/0x34)
[&lt;c0203224&gt;] (uart_start+0x18/0x34) from [&lt;c01ef890&gt;] (__receive_buf+0x4b4/0x738)
[&lt;c01ef890&gt;] (__receive_buf+0x4b4/0x738) from [&lt;c01efb44&gt;] (n_tty_receive_buf2+0x30/0x98)
[&lt;c01efb44&gt;] (n_tty_receive_buf2+0x30/0x98) from [&lt;c01f2ba8&gt;] (flush_to_ldisc+0xec/0x138)
[&lt;c01f2ba8&gt;] (flush_to_ldisc+0xec/0x138) from [&lt;c0031af0&gt;] (process_one_work+0xfc/0x348)
[&lt;c0031af0&gt;] (process_one_work+0xfc/0x348) from [&lt;c0032138&gt;] (worker_thread+0x138/0x37c)
[&lt;c0032138&gt;] (worker_thread+0x138/0x37c) from [&lt;c0037a7c&gt;] (kthread+0xa4/0xb0)
[&lt;c0037a7c&gt;] (kthread+0xa4/0xb0) from [&lt;c000e5f8&gt;] (ret_from_fork+0x14/0x3c)
-----

Release the port lock before calling tty_flip_buffer_push() and reacquire it
after the call.

Similar stuff was already done for few other drivers in the past, like:

commit 2389b272168ceec056ca1d8a870a97fa9c26e11a
Author: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Date:   Tue May 29 21:53:50 2007 +0100

    [ARM] 4417/1: Serial: Fix AMBA drivers locking

Cc: Tobias Klauser &lt;tklauser@distanz.ch&gt;
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The current driver triggers a lockdep warning for if tty_flip_buffer_push() is
called with uart_port-&gt;lock locked. This never shows up on UP kernels and comes
up only on SMP kernels.

Crash looks like this (produced with samsung.c driver):

-----
[&lt;c0014d58&gt;] (unwind_backtrace+0x0/0xf8) from [&lt;c0011908&gt;] (show_stack+0x10/0x14)
[&lt;c0011908&gt;] (show_stack+0x10/0x14) from [&lt;c035da34&gt;] (dump_stack+0x6c/0xac)
[&lt;c035da34&gt;] (dump_stack+0x6c/0xac) from [&lt;c01b59ac&gt;] (do_raw_spin_unlock+0xc4/0xd8)
[&lt;c01b59ac&gt;] (do_raw_spin_unlock+0xc4/0xd8) from [&lt;c03627e4&gt;] (_raw_spin_unlock_irqrestore+0xc/0)
[&lt;c03627e4&gt;] (_raw_spin_unlock_irqrestore+0xc/0x38) from [&lt;c020a1a8&gt;] (s3c24xx_serial_rx_chars+0)
[&lt;c020a1a8&gt;] (s3c24xx_serial_rx_chars+0x12c/0x260) from [&lt;c020aae8&gt;] (s3c64xx_serial_handle_irq+)
[&lt;c020aae8&gt;] (s3c64xx_serial_handle_irq+0x48/0x60) from [&lt;c006aaa0&gt;] (handle_irq_event_percpu+0x)
[&lt;c006aaa0&gt;] (handle_irq_event_percpu+0x50/0x194) from [&lt;c006ac20&gt;] (handle_irq_event+0x3c/0x5c)
[&lt;c006ac20&gt;] (handle_irq_event+0x3c/0x5c) from [&lt;c006d864&gt;] (handle_fasteoi_irq+0x80/0x13c)
[&lt;c006d864&gt;] (handle_fasteoi_irq+0x80/0x13c) from [&lt;c006a4a4&gt;] (generic_handle_irq+0x20/0x30)
[&lt;c006a4a4&gt;] (generic_handle_irq+0x20/0x30) from [&lt;c000f454&gt;] (handle_IRQ+0x38/0x94)
[&lt;c000f454&gt;] (handle_IRQ+0x38/0x94) from [&lt;c0008538&gt;] (gic_handle_irq+0x34/0x68)
[&lt;c0008538&gt;] (gic_handle_irq+0x34/0x68) from [&lt;c00123c0&gt;] (__irq_svc+0x40/0x70)
Exception stack(0xc04cdf70 to 0xc04cdfb8)
df60:                                     00000000 00000000 0000166e 00000000
df80: c04cc000 c050278f c050278f 00000001 c04d444c 410fc0f4 c03649b0 00000000
dfa0: 00000001 c04cdfb8 c000f758 c000f75c 60070013 ffffffff
[&lt;c00123c0&gt;] (__irq_svc+0x40/0x70) from [&lt;c000f75c&gt;] (arch_cpu_idle+0x28/0x30)
[&lt;c000f75c&gt;] (arch_cpu_idle+0x28/0x30) from [&lt;c0054888&gt;] (cpu_startup_entry+0x5c/0x148)
[&lt;c0054888&gt;] (cpu_startup_entry+0x5c/0x148) from [&lt;c0497aa4&gt;] (start_kernel+0x334/0x38c)
BUG: spinlock lockup suspected on CPU#0, kworker/0:1/360
 lock: s3c24xx_serial_ports+0x1d8/0x370, .magic: dead4ead, .owner: &lt;none&gt;/-1, .owner_cpu: -1
CPU: 0 PID: 360 Comm: kworker/0:1 Not tainted 3.11.0-rc6-next-20130819-00003-g75485f1 #2
Workqueue: events flush_to_ldisc
[&lt;c0014d58&gt;] (unwind_backtrace+0x0/0xf8) from [&lt;c0011908&gt;] (show_stack+0x10/0x14)
[&lt;c0011908&gt;] (show_stack+0x10/0x14) from [&lt;c035da34&gt;] (dump_stack+0x6c/0xac)
[&lt;c035da34&gt;] (dump_stack+0x6c/0xac) from [&lt;c01b581c&gt;] (do_raw_spin_lock+0x100/0x17c)
[&lt;c01b581c&gt;] (do_raw_spin_lock+0x100/0x17c) from [&lt;c03628a0&gt;] (_raw_spin_lock_irqsave+0x20/0x28)
[&lt;c03628a0&gt;] (_raw_spin_lock_irqsave+0x20/0x28) from [&lt;c0203224&gt;] (uart_start+0x18/0x34)
[&lt;c0203224&gt;] (uart_start+0x18/0x34) from [&lt;c01ef890&gt;] (__receive_buf+0x4b4/0x738)
[&lt;c01ef890&gt;] (__receive_buf+0x4b4/0x738) from [&lt;c01efb44&gt;] (n_tty_receive_buf2+0x30/0x98)
[&lt;c01efb44&gt;] (n_tty_receive_buf2+0x30/0x98) from [&lt;c01f2ba8&gt;] (flush_to_ldisc+0xec/0x138)
[&lt;c01f2ba8&gt;] (flush_to_ldisc+0xec/0x138) from [&lt;c0031af0&gt;] (process_one_work+0xfc/0x348)
[&lt;c0031af0&gt;] (process_one_work+0xfc/0x348) from [&lt;c0032138&gt;] (worker_thread+0x138/0x37c)
[&lt;c0032138&gt;] (worker_thread+0x138/0x37c) from [&lt;c0037a7c&gt;] (kthread+0xa4/0xb0)
[&lt;c0037a7c&gt;] (kthread+0xa4/0xb0) from [&lt;c000e5f8&gt;] (ret_from_fork+0x14/0x3c)
-----

Release the port lock before calling tty_flip_buffer_push() and reacquire it
after the call.

Similar stuff was already done for few other drivers in the past, like:

commit 2389b272168ceec056ca1d8a870a97fa9c26e11a
Author: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Date:   Tue May 29 21:53:50 2007 +0100

    [ARM] 4417/1: Serial: Fix AMBA drivers locking

Cc: Tobias Klauser &lt;tklauser@distanz.ch&gt;
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>serial: use dev_get_platdata()</title>
<updated>2013-08-01T00:56:15+00:00</updated>
<author>
<name>Jingoo Han</name>
<email>jg1.han@samsung.com</email>
</author>
<published>2013-07-30T08:06:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=574de559c1797618fd8ed03576837eb3113c5d26'/>
<id>574de559c1797618fd8ed03576837eb3113c5d26</id>
<content type='text'>
Use the wrapper function for retrieving the platform data instead of
accessing dev-&gt;platform_data directly.

Signed-off-by: Jingoo Han &lt;jg1.han@samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use the wrapper function for retrieving the platform data instead of
accessing dev-&gt;platform_data directly.

Signed-off-by: Jingoo Han &lt;jg1.han@samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>serial: altera: remove unnecessary platform_set_drvdata()</title>
<updated>2013-05-20T18:53:46+00:00</updated>
<author>
<name>Jingoo Han</name>
<email>jg1.han@samsung.com</email>
</author>
<published>2013-05-07T07:15:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=cd97721a1b6bbf6eaa9ad050eb472c7f180bd0e0'/>
<id>cd97721a1b6bbf6eaa9ad050eb472c7f180bd0e0</id>
<content type='text'>
The driver core clears the driver data to NULL after device_release
or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d
(device-core: Ensure drvdata = NULL when no driver is bound).
Thus, it is not needed to manually clear the device driver data to NULL.

Signed-off-by: Jingoo Han &lt;jg1.han@samsung.com&gt;
Acked-by: Tobias Klauser &lt;tklauser@distanz.ch&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The driver core clears the driver data to NULL after device_release
or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d
(device-core: Ensure drvdata = NULL when no driver is bound).
Thus, it is not needed to manually clear the device driver data to NULL.

Signed-off-by: Jingoo Han &lt;jg1.han@samsung.com&gt;
Acked-by: Tobias Klauser &lt;tklauser@distanz.ch&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
