linux/arch
Akira Takeuchi a8893fb3e6 MN10300: Discard low-priority Tx interrupts when closing an on-chip serial port
Discard low-prioriy Tx interrupts when closing an MN10300 on-chip serial port.

The MN10300 on-chip serial port uses three interrupts to manage its serial
ports:

 (1) A very high priority interrupt that drives virtual DMA for Rx.

 (2) A very high priority interrupt that drives virtual DMA for Tx.

 (3) A normal priority virtual interrupt that does the normal UART interrupt
     stuff and is shared between Rx and Tx.

mn10300_serial_stop_tx() only disables the high priority Tx interrupt.  It
doesn't also disable the normal priority one because it is shared with Rx.

However, the high priority interrupt may interrupt local_irq_disabled()
sections, and so may have queued up a low priority virtual interrupt whilst the
UART driver is asking for the Tx interrupt to be disabled.

The result of this can be an oops when we try to process the interrupt in
mn10300_serial_transmit_interrupt() as port->uart.info and port->uart.info->tty
may have gone away.

To deal with this, if either of those pointers is NULL, we make sure the
high-priority Tx interrupt is disabled and discard the interrupt.  The low
priority interrupt is disabled by the mn10300_serial_pic irq_chip table.

Signed-off-by: Akira Takeuchi <takeuchi.akr@jp.panasonic.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-12-10 13:34:33 -08:00
..
alpha alpha: pcibios_resource_to_bus() is callable from normal code 2008-11-30 10:03:37 -08:00
arm Merge master.kernel.org:/home/rmk/linux-2.6-arm 2008-12-09 08:29:31 -08:00
avr32 Merge branches 'boards' and 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32-2.6 2008-10-23 15:24:10 +02:00
blackfin Blackfin arch: fix a broken define in dma-mapping 2008-11-18 17:48:22 +08:00
cris [CRIS] Remove links from CRIS build 2008-10-31 23:37:57 +01:00
frv frv: fix mmap2 error handling 2008-12-01 19:55:24 -08:00
h8300 Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb 2008-10-23 08:20:34 -07:00
ia64 [IA64] SN: prevent IRQ retargetting in request_irq() 2008-12-09 10:57:18 -08:00
m32r m32r: section noise in head.S 2008-11-30 10:03:37 -08:00
m68k m68k: Update defconfigs for 2.6.28-rc7 2008-12-02 20:58:26 +01:00
m68knommu container freezer: implement freezer cgroup subsystem 2008-10-20 08:52:34 -07:00
mips Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus 2008-12-10 10:03:55 -08:00
mn10300 MN10300: Discard low-priority Tx interrupts when closing an on-chip serial port 2008-12-10 13:34:33 -08:00
parisc Merge git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6 2008-11-30 14:04:31 -08:00
powerpc Merge branch 'merge' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc into merge 2008-12-09 14:58:37 +11:00
s390 Merge branch 'kvm-updates/2.6.28' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm 2008-12-02 15:56:17 -08:00
sh serial: sh-sci: Reorder the SCxTDR write after the TDxE clear. 2008-11-13 17:46:06 +09:00
sparc sparc: asm/bitops.h should define __fls 2008-12-03 16:04:52 -08:00
sparc64 sparc64: Sync FPU state in VIS emulation handler. 2008-12-04 09:12:57 -08:00
um uml: boot broken due to buffer overrun 2008-12-10 08:01:52 -08:00
x86 x86: fix default_spin_lock_flags() prototype 2008-12-08 16:08:29 +01:00
xtensa Merge git://git.kernel.org/pub/scm/linux/kernel/git/czankel/xtensa-2.6 2008-10-23 09:16:56 -07:00
.gitignore
Kconfig remove __ARCH_WANT_COMPAT_SYS_PTRACE 2008-11-30 11:00:15 -08:00