<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/serial/8250.c, branch v2.6.27.12</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>8250: improve workaround for UARTs that don't re-assert THRE correctly</title>
<updated>2008-09-03T02:21:38+00:00</updated>
<author>
<name>Will Newton</name>
<email>will.newton@gmail.com</email>
</author>
<published>2008-09-02T21:35:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=363f66fe06c75270b669c88e321e6b354ba0201e'/>
<id>363f66fe06c75270b669c88e321e6b354ba0201e</id>
<content type='text'>
Recent changes to tighten the check for UARTs that don't correctly
re-assert THRE (01c194d9278efc15d4785ff205643e9c0bdcef53: "serial 8250:
tighten test for using backup timer") caused problems when such a UART was
opened for the second time - the bug could only successfully be detected
at first initialization.  For users of this version of this particular
UART IP it is fatal.

This patch stores the information about the bug in the bugs field of the
port structure when the port is first started up so subsequent opens can
check this bit even if the test for the bug fails.

David Brownell: "My own exposure to this is that the UART on DaVinci
hardware, which TI allegedly derived from its original 16550 logic, has
periodically gone from working to unusable with the mainline 8250.c ...
and back and forth a bunch.  Currently it's "unusable", a regression from
some previous versions.  With this patch from Will, it's usable."

Signed-off-by: Will Newton &lt;will.newton@gmail.com&gt;
Acked-by: Alex Williamson &lt;alex.williamson@hp.com&gt;
Cc: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Cc: David Brownell &lt;david-b@pacbell.net&gt;
Cc: &lt;stable@kernel.org&gt;		[2.6.26.x]
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Recent changes to tighten the check for UARTs that don't correctly
re-assert THRE (01c194d9278efc15d4785ff205643e9c0bdcef53: "serial 8250:
tighten test for using backup timer") caused problems when such a UART was
opened for the second time - the bug could only successfully be detected
at first initialization.  For users of this version of this particular
UART IP it is fatal.

This patch stores the information about the bug in the bugs field of the
port structure when the port is first started up so subsequent opens can
check this bit even if the test for the bug fails.

David Brownell: "My own exposure to this is that the UART on DaVinci
hardware, which TI allegedly derived from its original 16550 logic, has
periodically gone from working to unusable with the mainline 8250.c ...
and back and forth a bunch.  Currently it's "unusable", a regression from
some previous versions.  With this patch from Will, it's usable."

Signed-off-by: Will Newton &lt;will.newton@gmail.com&gt;
Acked-by: Alex Williamson &lt;alex.williamson@hp.com&gt;
Cc: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Cc: David Brownell &lt;david-b@pacbell.net&gt;
Cc: &lt;stable@kernel.org&gt;		[2.6.26.x]
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>8250.c: port.lock is irq-safe</title>
<updated>2008-07-30T16:41:45+00:00</updated>
<author>
<name>Borislav Petkov</name>
<email>petkovbb@googlemail.com</email>
</author>
<published>2008-07-30T05:33:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c389d27b5e643d745f55ffb939b1426060ba63d4'/>
<id>c389d27b5e643d745f55ffb939b1426060ba63d4</id>
<content type='text'>
serial8250_startup() doesn't disable interrupts while taking the &amp;up-&gt;port.lock
which might race against the interrupt handler serial8250_interrupt(), which
when entered, will deadlock waiting for the lock to be released.

Signed-off-by: Borislav Petkov &lt;petkovbb@gmail.com&gt;
Tested-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
serial8250_startup() doesn't disable interrupts while taking the &amp;up-&gt;port.lock
which might race against the interrupt handler serial8250_interrupt(), which
when entered, will deadlock waiting for the lock to be released.

Signed-off-by: Borislav Petkov &lt;petkovbb@gmail.com&gt;
Tested-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>8250: fix break handling for Intel 82571</title>
<updated>2008-07-24T17:47:29+00:00</updated>
<author>
<name>Aristeu Rozanski</name>
<email>arozansk@redhat.com</email>
</author>
<published>2008-07-24T04:29:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7500b1f602aad75901774a67a687ee985d85893f'/>
<id>7500b1f602aad75901774a67a687ee985d85893f</id>
<content type='text'>
Intel 82571 has a "Serial Over LAN" feature that doesn't properly
implements the receiving of break characters.  When a break is received,
it doesn't set UART_LSR_DR and unless another character is received, the
break won't be received by the application.

Signed-off-by: Aristeu Rozanski &lt;arozansk@redhat.com&gt;
Acked-by: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Intel 82571 has a "Serial Over LAN" feature that doesn't properly
implements the receiving of break characters.  When a break is received,
it doesn't set UART_LSR_DR and unless another character is received, the
break won't be received by the application.

Signed-off-by: Aristeu Rozanski &lt;arozansk@redhat.com&gt;
Acked-by: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>serial: 8250: fix shared interrupts issues with SMP and RT kernels</title>
<updated>2008-07-22T20:03:28+00:00</updated>
<author>
<name>Anton Vorontsov</name>
<email>avorontsov@ru.mvista.com</email>
</author>
<published>2008-07-22T10:21:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=768aec0b5bccbd460bcf6e9131f19b5a26f3862d'/>
<id>768aec0b5bccbd460bcf6e9131f19b5a26f3862d</id>
<content type='text'>
With SMP kernels _irqsave spinlock disables only local interrupts, while
the shared serial interrupt could be assigned to the CPU that is not
currently starting up the serial port.

This might cause issues because serial8250_startup() routine issues
IRQ-triggering operations before registering the port in the IRQ chain
(though, this is fine to do and done explicitly because we don't want to
process any interrupts on the port startup).

With RT kernels and preemptable hardirqs, _irqsave spinlock does not
disable local hardirqs, and the bug could be reproduced much easily:

$ cat /dev/ttyS0 &amp;
$ cat /dev/ttyS1
irq 42: nobody cared (try booting with the "irqpoll" option)
Call Trace:
[C0475EB0] [C0008A98] show_stack+0x4c/0x1ac (unreliable)
[C0475EF0] [C004BBD4] __report_bad_irq+0x34/0xb8
[C0475F10] [C004BD38] note_interrupt+0xe0/0x308
[C0475F50] [C004B09C] thread_simple_irq+0xdc/0x104
[C0475F70] [C004B3FC] do_irqd+0x338/0x3c8
[C0475FC0] [C00398E0] kthread+0xf8/0x100
[C0475FF0] [C0011FE0] original_kernel_thread+0x44/0x60
handlers:
[&lt;c02112c4&gt;] (serial8250_interrupt+0x0/0x138)
Disabling IRQ #42

After this, all serial ports on the given IRQ are non-functional.

To fix the issue we should explicitly disable shared IRQ before
issuing any IRQ-triggering operations.

I also changed spin_lock_irqsave to the ordinary spin_lock, since it
seems to be safe: chain does not contain new port (yet), thus nobody
will interfere us from the ISRs.

Signed-off-by: Anton Vorontsov &lt;avorontsov@ru.mvista.com&gt;
Signed-off-by: Alan Cox &lt;alan@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With SMP kernels _irqsave spinlock disables only local interrupts, while
the shared serial interrupt could be assigned to the CPU that is not
currently starting up the serial port.

This might cause issues because serial8250_startup() routine issues
IRQ-triggering operations before registering the port in the IRQ chain
(though, this is fine to do and done explicitly because we don't want to
process any interrupts on the port startup).

With RT kernels and preemptable hardirqs, _irqsave spinlock does not
disable local hardirqs, and the bug could be reproduced much easily:

$ cat /dev/ttyS0 &amp;
$ cat /dev/ttyS1
irq 42: nobody cared (try booting with the "irqpoll" option)
Call Trace:
[C0475EB0] [C0008A98] show_stack+0x4c/0x1ac (unreliable)
[C0475EF0] [C004BBD4] __report_bad_irq+0x34/0xb8
[C0475F10] [C004BD38] note_interrupt+0xe0/0x308
[C0475F50] [C004B09C] thread_simple_irq+0xdc/0x104
[C0475F70] [C004B3FC] do_irqd+0x338/0x3c8
[C0475FC0] [C00398E0] kthread+0xf8/0x100
[C0475FF0] [C0011FE0] original_kernel_thread+0x44/0x60
handlers:
[&lt;c02112c4&gt;] (serial8250_interrupt+0x0/0x138)
Disabling IRQ #42

After this, all serial ports on the given IRQ are non-functional.

To fix the issue we should explicitly disable shared IRQ before
issuing any IRQ-triggering operations.

I also changed spin_lock_irqsave to the ordinary spin_lock, since it
seems to be safe: chain does not contain new port (yet), thus nobody
will interfere us from the ISRs.

Signed-off-by: Anton Vorontsov &lt;avorontsov@ru.mvista.com&gt;
Signed-off-by: Alan Cox &lt;alan@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>serial: use tty_port</title>
<updated>2008-07-21T00:12:35+00:00</updated>
<author>
<name>Alan Cox</name>
<email>alan@redhat.com</email>
</author>
<published>2008-07-16T20:53:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=df4f4dd429870f435f8d5d9d561db029a29f063b'/>
<id>df4f4dd429870f435f8d5d9d561db029a29f063b</id>
<content type='text'>
Switch the serial_core based drivers to use the new tty_port structure.
We can't quite use all of it yet because of the dynamically allocated
extras in the serial_core layer.

Signed-off-by: Alan Cox &lt;alan@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Switch the serial_core based drivers to use the new tty_port structure.
We can't quite use all of it yet because of the dynamically allocated
extras in the serial_core layer.

Signed-off-by: Alan Cox &lt;alan@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drivers/serial/: remove CVS keywords</title>
<updated>2008-07-21T00:12:35+00:00</updated>
<author>
<name>Adrian Bunk</name>
<email>bunk@kernel.org</email>
</author>
<published>2008-07-16T20:53:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d87a6d951c6c09d191d9c10903deb3cc353fcd2c'/>
<id>d87a6d951c6c09d191d9c10903deb3cc353fcd2c</id>
<content type='text'>
This patch removes CVS keywords that weren't updated for a long time in
comments, printk's and MODULE_DESCRIPTION's (no printk's or
MODULE_DESCRIPTION's are completely removed).

While doing this I also found and fixed a missing \n in a printk
in m32r_sio.c

Signed-off-by: Adrian Bunk &lt;bunk@kernel.org&gt;
Signed-off-by: Alan Cox &lt;alan@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch removes CVS keywords that weren't updated for a long time in
comments, printk's and MODULE_DESCRIPTION's (no printk's or
MODULE_DESCRIPTION's are completely removed).

While doing this I also found and fixed a missing \n in a printk
in m32r_sio.c

Signed-off-by: Adrian Bunk &lt;bunk@kernel.org&gt;
Signed-off-by: Alan Cox &lt;alan@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>serial8250: sanity check nr_uarts on all paths.</title>
<updated>2008-07-12T21:33:41+00:00</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2008-07-12T20:47:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=05d81d2222beec7b63ac8c1c8cdb5bb4f82c2bad'/>
<id>05d81d2222beec7b63ac8c1c8cdb5bb4f82c2bad</id>
<content type='text'>
I had 8250.nr_uarts=16 in the boot line of a test kernel and I had a weird
mysterious crash in sysfs.  After taking an in-depth look I realized that
CONFIG_SERIAL_8250_NR_UARTS was set to 4 and I was walking off the end of
the serial8250_ports array.

Ouch!!!

Don't let this happen to someone else.

Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Acked-by: Alan Cox &lt;alan@redhat.com&gt;
Cc: &lt;stable@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I had 8250.nr_uarts=16 in the boot line of a test kernel and I had a weird
mysterious crash in sysfs.  After taking an in-depth look I realized that
CONFIG_SERIAL_8250_NR_UARTS was set to 4 and I was walking off the end of
the serial8250_ports array.

Ouch!!!

Don't let this happen to someone else.

Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Acked-by: Alan Cox &lt;alan@redhat.com&gt;
Cc: &lt;stable@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>8250 Serial Driver: revert extra IRQ flag definition patch</title>
<updated>2008-05-31T08:10:04+00:00</updated>
<author>
<name>Bryan Wu</name>
<email>cooloney@kernel.org</email>
</author>
<published>2008-05-31T08:10:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a4ed1e41a734d77c9a83a88a8736e19b68e6a2a0'/>
<id>a4ed1e41a734d77c9a83a88a8736e19b68e6a2a0</id>
<content type='text'>
As Russell pointed out, original patch will break some serial configurations
because of the dependency of the &lt;asm/serial.h&gt; header file.

Revert it first and try to find out other solution later

Cc: Javier Herrero &lt;jherrero@hvsistemas.es&gt;
Cc: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Cc: Russell King &lt;rmk+lkml@arm.linux.org.uk&gt;
Signed-off-by: Bryan Wu &lt;cooloney@kernel.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As Russell pointed out, original patch will break some serial configurations
because of the dependency of the &lt;asm/serial.h&gt; header file.

Revert it first and try to find out other solution later

Cc: Javier Herrero &lt;jherrero@hvsistemas.es&gt;
Cc: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Cc: Russell King &lt;rmk+lkml@arm.linux.org.uk&gt;
Signed-off-by: Bryan Wu &lt;cooloney@kernel.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>8250 Serial Driver: Added support for 8250-class UARTs in HV Sistemas H8606 board</title>
<updated>2008-05-17T10:21:42+00:00</updated>
<author>
<name>Javier Herrero</name>
<email>jherrero@hvsistemas.es</email>
</author>
<published>2008-05-17T10:21:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b4aa54d951d38d7a989d6b6385494ef5ea7371d7'/>
<id>b4aa54d951d38d7a989d6b6385494ef5ea7371d7</id>
<content type='text'>
Added support for 8250-class UARTs in HV Sistemas H8606 board,
modification in 8250.c driver for correct compilation with Blackfin

Besides, I think that there is more people using 8250-class UARTs
with a different hardware than the H8606 board. This code can be shared
by them.

Signed-off-by: Javier Herrero &lt;jherrero@hvsistemas.es&gt;
Acked-by: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Signed-off-by: Bryan Wu &lt;cooloney@kernel.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Added support for 8250-class UARTs in HV Sistemas H8606 board,
modification in 8250.c driver for correct compilation with Blackfin

Besides, I think that there is more people using 8250-class UARTs
with a different hardware than the H8606 board. This code can be shared
by them.

Signed-off-by: Javier Herrero &lt;jherrero@hvsistemas.es&gt;
Acked-by: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Signed-off-by: Bryan Wu &lt;cooloney@kernel.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>8250: switch 8250 drivers to use _nocache ioremaps</title>
<updated>2008-05-01T15:04:00+00:00</updated>
<author>
<name>Alan Cox</name>
<email>alan@lxorguk.ukuu.org.uk</email>
</author>
<published>2008-05-01T11:34:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6f441fe99814f64315b8c11890744230b990c460'/>
<id>6f441fe99814f64315b8c11890744230b990c460</id>
<content type='text'>
Signed-off-by: Alan Cox &lt;alan@redhat.com&gt;
Cc: Russell King &lt;rmk@arm.linux.org.uk&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Alan Cox &lt;alan@redhat.com&gt;
Cc: Russell King &lt;rmk@arm.linux.org.uk&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
