<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/tty, branch v3.4.89</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.4.89</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.4.89'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2014-05-06T14:51:45Z</updated>
<entry>
<title>hvc: ensure hvc_init is only ever called once in hvc_console.c</title>
<updated>2014-05-06T14:51:45Z</updated>
<author>
<name>Paul Gortmaker</name>
<email>paul.gortmaker@windriver.com</email>
</author>
<published>2014-01-14T21:03:37Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=216583b5033215cd64468b865c0ee96d265cf546'/>
<id>urn:sha1:216583b5033215cd64468b865c0ee96d265cf546</id>
<content type='text'>
commit f76a1cbed18c86e2d192455f0daebb48458965f3 upstream.

Commit 3e6c6f630a5282df8f3393a59f10eb9c56536d23 ("Delay creation of
khcvd thread") moved the call of hvc_init from being a device_initcall
into hvc_alloc, and used a non-null hvc_driver as indication of whether
hvc_init had already been called.

The problem with this is that hvc_driver is only assigned a value
at the bottom of hvc_init, and so there is a window where multiple
hvc_alloc calls can be in progress at the same time and hence try
and call hvc_init multiple times.  Previously the use of device_init
guaranteed that hvc_init was only called once.

This manifests itself as sporadic instances of two hvc_init calls
racing each other, and with the loser of the race getting -EBUSY
from tty_register_driver() and hence that virtual console fails:

    Couldn't register hvc console driver
    virtio-ports vport0p1: error -16 allocating hvc for port

Here we add an atomic_t to guarantee we'll never run hvc_init twice.

Cc: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Fixes: 3e6c6f630a52 ("Delay creation of khcvd thread")
Reported-by: Jim Somerville &lt;Jim.Somerville@windriver.com&gt;
Tested-by: Jim Somerville &lt;Jim.Somerville@windriver.com&gt;
Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>tty: n_gsm: Fix for modems with brk in modem status control</title>
<updated>2014-02-22T18:32:45Z</updated>
<author>
<name>Lars Poeschel</name>
<email>poeschel@lemonage.de</email>
</author>
<published>2014-01-07T12:34:37Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=dce0ea4a4732af1333525b76bde5572073d4bbfa'/>
<id>urn:sha1:dce0ea4a4732af1333525b76bde5572073d4bbfa</id>
<content type='text'>
commit 3ac06b905655b3ef2fd2196bab36e4587e1e4e4f upstream.

3GPP TS 07.10 states in section 5.4.6.3.7:
"The length byte contains the value 2 or 3 ... depending on the break
signal." The break byte is optional and if it is sent, the length is
3. In fact the driver was not able to work with modems that send this
break byte in their modem status control message. If the modem just
sends the break byte if it is really set, then weird things might
happen.
The code for deconding the modem status to the internal linux
presentation in gsm_process_modem has already a big comment about
this 2 or 3 byte length thing and it is already able to decode the
brk, but the code calling the gsm_process_modem function in
gsm_control_modem does not encode it and hand it over the right way.
This patch fixes this.
Without this fix if the modem sends the brk byte in it's modem status
control message the driver will hang when opening a muxed channel.

Signed-off-by: Lars Poeschel &lt;poeschel@lemonage.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>serial: add support for 200 v3 series Titan card</title>
<updated>2014-02-06T19:05:47Z</updated>
<author>
<name>Yegor Yefremov</name>
<email>yegorslists@googlemail.com</email>
</author>
<published>2013-12-09T11:11:15Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=17b27b25f3618f48d3a80ab2b2887ab597446015'/>
<id>urn:sha1:17b27b25f3618f48d3a80ab2b2887ab597446015</id>
<content type='text'>
commit 48c0247d7b7bf58abb85a39021099529df365c4d upstream.

Signed-off-by: Yegor Yefremov &lt;yegorslists@googlemail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>tty/serial: at91: Handle shutdown more safely</title>
<updated>2014-02-06T19:05:47Z</updated>
<author>
<name>Marek Roszko</name>
<email>mark.roszko@gmail.com</email>
</author>
<published>2014-01-07T10:45:06Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3a9694557f5aefc34a08bddcfcbd0ca12d8dec9a'/>
<id>urn:sha1:3a9694557f5aefc34a08bddcfcbd0ca12d8dec9a</id>
<content type='text'>
commit 0cc7c6c7916b1b6f34350ff1473b80b9f7e459c0 upstream.

Interrupts were being cleaned up late in the shutdown handler, it is possible
that an interrupt can occur and schedule a tasklet that runs after the port is
cleaned up. There is a null dereference due to this race condition with the
following stacktrace:

[&lt;c02092b0&gt;] (atmel_tasklet_func+0x514/0x814) from [&lt;c001fd34&gt;] (tasklet_action+0x70/0xa8)
[&lt;c001fd34&gt;] (tasklet_action+0x70/0xa8) from [&lt;c001f60c&gt;] (__do_softirq+0x90/0x144)
[&lt;c001f60c&gt;] (__do_softirq+0x90/0x144) from [&lt;c001fa18&gt;] (irq_exit+0x40/0x4c)
[&lt;c001fa18&gt;] (irq_exit+0x40/0x4c) from [&lt;c000e298&gt;] (handle_IRQ+0x64/0x84)
[&lt;c000e298&gt;] (handle_IRQ+0x64/0x84) from [&lt;c000d6c0&gt;] (__irq_svc+0x40/0x50)
[&lt;c000d6c0&gt;] (__irq_svc+0x40/0x50) from [&lt;c0208060&gt;] (atmel_rx_dma_release+0x88/0xb8)
[&lt;c0208060&gt;] (atmel_rx_dma_release+0x88/0xb8) from [&lt;c0209740&gt;] (atmel_shutdown+0x104/0x160)
[&lt;c0209740&gt;] (atmel_shutdown+0x104/0x160) from [&lt;c0205e8c&gt;] (uart_port_shutdown+0x2c/0x38)

Signed-off-by: Marek Roszko &lt;mark.roszko@gmail.com&gt;
Acked-by: Leilei Zhao &lt;leilei.zhao@atmel.com&gt;
Signed-off-by: Nicolas Ferre &lt;nicolas.ferre@atmel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>TTY: pmac_zilog, check existence of ports in pmz_console_init()</title>
<updated>2014-01-08T17:42:10Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert@linux-m68k.org</email>
</author>
<published>2013-11-22T15:47:26Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=34ee0e8ad09ec1e58858bd3c8756a31a2b3c46bf'/>
<id>urn:sha1:34ee0e8ad09ec1e58858bd3c8756a31a2b3c46bf</id>
<content type='text'>
commit dc1dc2f8a5dd863bf2e79f338fc3ae29e99c683a upstream.

When booting a multi-platform m68k kernel on a non-Mac with "console=ttyS0"
on the kernel command line, it crashes with:

Unable to handle kernel NULL pointer dereference at virtual address   (null)
Oops: 00000000
PC: [&lt;0013ad28&gt;] __pmz_startup+0x32/0x2a0
...
Call Trace: [&lt;002c5d3e&gt;] pmz_console_setup+0x64/0xe4

The normal tty driver doesn't crash, because init_pmz() checks
pmz_ports_count again after calling pmz_probe().

In the serial console initialization path, pmz_console_init() doesn't do
this, causing the driver to crash later.

Add a check for pmz_ports_count to fix this.

Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Cc: Finn Thain &lt;fthain@telegraphics.com.au&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>powerpc/hvsi: Increase handshake timeout from 200ms to 400ms.</title>
<updated>2013-09-08T04:58:14Z</updated>
<author>
<name>Eugene Surovegin</name>
<email>ebs@ebshome.net</email>
</author>
<published>2013-08-26T18:53:32Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2ad23b795892c3f128cb05de5ee6d5ae5c422c28'/>
<id>urn:sha1:2ad23b795892c3f128cb05de5ee6d5ae5c422c28</id>
<content type='text'>
commit d220980b701d838560a70de691b53be007e99e78 upstream.

This solves a problem observed in kexec'ed kernel where 200ms timeout is
too short and bootconsole fails to initialize. Console did eventually
become workable but much later into the boot process.

Observed timeout was around 260ms, but I decided to make it a little bigger
for more reliability.

This has been tested on Power7 machine with Petitboot as a primary
bootloader and PowerNV firmware.

Signed-off-by: Eugene Surovegin &lt;surovegin@google.com&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>serial/mxs-auart: increase time to wait for transmitter to become idle</title>
<updated>2013-08-11T22:38:41Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2013-06-28T09:49:41Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=17754964dd55f71fd294ea521c595a1caff3fe5e'/>
<id>urn:sha1:17754964dd55f71fd294ea521c595a1caff3fe5e</id>
<content type='text'>
commit 079a036f4283e2b0e5c26080b8c5112bc0cc1831 upstream.

Without this patch the driver waits ~1 ms for the UART to become idle. At
115200n8 this time is (theoretically) enough to transfer 11.5 characters
(= 115200 bits/s / (10 Bits/char) * 1ms). As the mxs-auart has a fifo size
of 16 characters the clock is gated too early. The problem is worse for
lower baud rates.

This only happens to really shut down the transmitter in the middle of a
transfer if /dev/ttyAPPx isn't opened in userspace (e.g. by a getty) but
was at least once (because the bootloader doesn't disable the transmitter).

So increase the timeout to 20 ms which should be enough for 9600n8, too.
Moreover skip gating the clock if the timeout is elapsed.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>serial/mxs-auart: fix race condition in interrupt handler</title>
<updated>2013-08-11T22:38:41Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2013-07-04T09:28:51Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d11699ef0bb1c2bcb7ba071ee129c2a59457053a'/>
<id>urn:sha1:d11699ef0bb1c2bcb7ba071ee129c2a59457053a</id>
<content type='text'>
commit d970d7fe65adff5efe75b4a73c4ffc9be57089f7 upstream.

The handler needs to ack the pending events before actually handling them.
Otherwise a new event might come in after it it considered non-pending or
handled and is acked then without being handled. So this event is only
noticed when the next interrupt happens.

Without this patch an i.MX28 based machine running an rt-patched kernel
regularly hangs during boot.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Revert "serial: 8250_pci: add support for another kind of NetMos Technology PCI 9835 Multi-I/O Controller"</title>
<updated>2013-07-13T18:03:41Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2013-06-30T16:03:06Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=6d2698aa29a15559b89c54b86523632ea4110b6c'/>
<id>urn:sha1:6d2698aa29a15559b89c54b86523632ea4110b6c</id>
<content type='text'>
commit 828c6a102b1f2b8583fadc0e779c46b31d448f0b upstream.

This reverts commit 8d2f8cd424ca0b99001f3ff4f5db87c4e525f366.

As reported by Stefan, this device already works with the parport_serial
driver, so the 8250_pci driver should not also try to grab it as well.

Reported-by: Stefan Seyfried &lt;stefan.seyfried@googlemail.com&gt;
Cc: Wang YanQing &lt;udknight@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>pch_uart: fix a deadlock when pch_uart as console</title>
<updated>2013-07-03T17:59:05Z</updated>
<author>
<name>Liang Li</name>
<email>liang.li@windriver.com</email>
</author>
<published>2013-01-19T09:52:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5d2a2c717306c11672aef8ca6a1535ff78f57fa8'/>
<id>urn:sha1:5d2a2c717306c11672aef8ca6a1535ff78f57fa8</id>
<content type='text'>
commit 384e301e3519599b000c1a2ecd938b533fc15d85 upstream.

When we use pch_uart as system console like 'console=ttyPCH0,115200',
then 'send break' to it. We'll encounter the deadlock on a cpu/core,
with interrupts disabled on the core. When we happen to have all irqs
affinity to cpu0 then the deadlock on cpu0 actually deadlock whole
system.

In pch_uart_interrupt, we have spin_lock_irqsave(&amp;priv-&gt;lock, flags)
then call pch_uart_err_ir when break is received. Then the call to
dev_err would actually call to pch_console_write then we'll run into
another spin_lock(&amp;priv-&gt;lock), with interrupts disabled.

So in the call sequence lead by pch_uart_interrupt, we should be
carefully to call functions that will 'print message to console' only
in case the uart port is not being used as serial console.

Signed-off-by: Liang Li &lt;liang.li@windriver.com&gt;
Cc: Yijing Wang &lt;wangyijing@huawei.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
</feed>
