<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/tty/serial/serial-tegra.c, branch linux-4.1.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.1.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.1.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2015-03-26T21:49:10Z</updated>
<entry>
<title>tty: constify of_device_id array</title>
<updated>2015-03-26T21:49:10Z</updated>
<author>
<name>Fabian Frederick</name>
<email>fabf@skynet.be</email>
</author>
<published>2015-03-16T19:17:11Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ed0bb2323c9321b91dfa0ea8317fdc4d9592dce4'/>
<id>urn:sha1:ed0bb2323c9321b91dfa0ea8317fdc4d9592dce4</id>
<content type='text'>
of_device_id is always used as const.
(See driver.of_match_table and open firmware functions)

Signed-off-by: Fabian Frederick &lt;fabf@skynet.be&gt;
Acked-by: Peter Korsgaard &lt;peter@korsgaard.com&gt;
Acked-by: Timur Tabi &lt;timur@tabi.org&gt;
Acked-by: Patrice Chotard &lt;patrice.chotard@st.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: tegra: clean up tty-flag assignments</title>
<updated>2014-11-26T01:06:39Z</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2014-11-18T10:18:02Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f0c1e460452138df03cb7a7f0e7546b74950b783'/>
<id>urn:sha1:f0c1e460452138df03cb7a7f0e7546b74950b783</id>
<content type='text'>
The tty break and error flags are not bit masks so do not to use bitwise
OR when assigning them.

Note that there is no functional change due to the if-else construct and
flag having been initialised to zero (TTY_NORMAL).

Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: Refactor uart_flush_buffer() from uart_close()</title>
<updated>2014-11-06T02:53:54Z</updated>
<author>
<name>Peter Hurley</name>
<email>peter@hurleysoftware.com</email>
</author>
<published>2014-10-16T20:54:18Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=479e9b94fdce7bc46f669831012fc12f56696fd7'/>
<id>urn:sha1:479e9b94fdce7bc46f669831012fc12f56696fd7</id>
<content type='text'>
In the context of the final tty &amp; port close, flushing the tx
ring buffer after the hardware has already been shutdown and
the ring buffer freed is neither required nor desirable.

uart_flush_buffer() performs 3 operations:
1. Resets tx ring buffer indices, but the tx ring buffer has
   already been freed and the indices are reset if the port is
   re-opened.
2. Calls uart driver's flush_buffer() method
   5 in-tree uart drivers define flush_buffer() methods:
     amba-pl011, atmel-serial, imx, serial-tegra, timbuart
   These have been refactored into the shutdown() method, if
   required.
3. Kicks the ldisc for more writing, but this is undesirable.
   The file handle is being released; any waiting writer will
   will be kicked out by tty_release() with a warning. Further,
   the N_TTY ldisc may generate SIGIO for a file handle which
   is no longer valid.

Cc: Nicolas Ferre &lt;nicolas.ferre@atmel.com&gt;
Cc: Russell King &lt;linux@arm.linux.org.uk&gt;
Cc: Laxman Dewangan &lt;ldewangan@nvidia.com&gt;
Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: tegra: ack the rx dma desc after transfer terminated</title>
<updated>2014-07-10T22:53:20Z</updated>
<author>
<name>Pradeep Goudagunta</name>
<email>pgoudagunta@nvidia.com</email>
</author>
<published>2014-06-06T11:18:09Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b31245b9420731cc62bb1eea0a2240b3e90a2e78'/>
<id>urn:sha1:b31245b9420731cc62bb1eea0a2240b3e90a2e78</id>
<content type='text'>
The Rx dma descriptor allocated without the DMA_ACK flags so that
once after tarnsfer done or terminated, client can ack the descriptor
to free it for later use.

If the Rx DMA is terminated for some reason then rx-dma descriptor
is not getting acked which causes the memory leak and list of usage
desc to grow continuously.

Hence, acknowledge the rx-dma descriptor once transfer is terminated
to avoid memory leak and desc list to grow.

Signed-off-by: Laxman Dewangan &lt;ldewangan@nvidia.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: tegra: update tx_circular buffer only when TX_DMA is in progress</title>
<updated>2014-07-10T22:53:20Z</updated>
<author>
<name>Pradeep Goudagunta</name>
<email>pgoudagunta@nvidia.com</email>
</author>
<published>2014-06-06T11:18:08Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5e3dbfca3b14a4a2950255c1628cd53b384d963e'/>
<id>urn:sha1:5e3dbfca3b14a4a2950255c1628cd53b384d963e</id>
<content type='text'>
When channel is require to stop transmit then update the Tx circular
buffer only when DMA based transfer is in progress. If there is no
DMA based transfer then no need to update the Tx buffer.

Signed-off-by: Pradeep Goudagunta &lt;pgoudagunta@nvidia.com&gt;
Signed-off-by: Laxman Dewangan &lt;ldewangan@nvidia.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: tegra: convert to standard DMA DT bindings</title>
<updated>2013-12-11T23:44:35Z</updated>
<author>
<name>Stephen Warren</name>
<email>swarren@nvidia.com</email>
</author>
<published>2013-11-11T21:16:38Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c2b329f56196cce5ebde42f0b6ffc3c12db4c826'/>
<id>urn:sha1:c2b329f56196cce5ebde42f0b6ffc3c12db4c826</id>
<content type='text'>
By using dma_request_slave_channel_or_err(), the DMA slave ID can be
looked up from standard DT properties, and squirrelled away during
channel allocation. Hence, there's no need to use a custom DT property
to store the slave ID.

Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Reviewed-by: Thierry Reding &lt;treding@nvidia.com&gt;
</content>
</entry>
<entry>
<title>serial: tegra: use reset framework</title>
<updated>2013-12-11T23:44:28Z</updated>
<author>
<name>Stephen Warren</name>
<email>swarren@nvidia.com</email>
</author>
<published>2013-11-06T23:50:44Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d3d654ef230d8b8370e1b2820589521282c868d8'/>
<id>urn:sha1:d3d654ef230d8b8370e1b2820589521282c868d8</id>
<content type='text'>
Tegra's clock driver now provides an implementation of the common
reset API (include/linux/reset.h). Use this instead of the old Tegra-
specific API; that will soon be removed.

Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Reviewed-by: Thierry Reding &lt;treding@nvidia.com&gt;
</content>
</entry>
<entry>
<title>serial: tegra: remove deprecated IRQF_DISABLED</title>
<updated>2013-10-07T07:13:58Z</updated>
<author>
<name>Michael Opdenacker</name>
<email>michael.opdenacker@free-electrons.com</email>
</author>
<published>2013-10-06T06:30:17Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=cf81e054d63bca1da899057802e561abc2acecce'/>
<id>urn:sha1:cf81e054d63bca1da899057802e561abc2acecce</id>
<content type='text'>
This patch proposes to remove the use of the IRQF_DISABLED flag

It's a NOOP since 2.6.35 and it will be removed one day.

Signed-off-by: Michael Opdenacker &lt;michael.opdenacker@free-electrons.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: tegra: fix tty-kref leak</title>
<updated>2013-09-17T17:05:47Z</updated>
<author>
<name>Johan Hovold</name>
<email>jhovold@gmail.com</email>
</author>
<published>2013-09-10T10:50:48Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=cfd29aa0e81b791985e8428e6507e80e074e6730'/>
<id>urn:sha1:cfd29aa0e81b791985e8428e6507e80e074e6730</id>
<content type='text'>
Fix potential tty-kref leak in stop_rx path.

Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold &lt;jhovold@gmail.com&gt;
Tested-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: serial: tegra: drop uart_port-&gt;lock before calling tty_flip_buffer_push()</title>
<updated>2013-08-27T23:17:35Z</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2013-08-19T14:44:27Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=9b88748b362c3b449bfac05ae1353b73b40a785f'/>
<id>urn:sha1:9b88748b362c3b449bfac05ae1353b73b40a785f</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: Stephen Warren &lt;swarren@wwwdotorg.org&gt;
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
