From: vb@vsbe.com
To: linux-kernel@vger.kernel.org
Subject: "irq 42: nobody cared" and I/O errors on serial ports
Date: Wed, 24 Feb 2010 17:39:33 -0800 [thread overview]
Message-ID: <f608b67d1002241739o2668b93cuc9eea669f70a407d@mail.gmail.com> (raw)
I saw this issue mentioned in the past
(http://lkml.indiana.edu/hypermail/linux/kernel/0612.3/0756.html) but
there has been no resolution. I also started experiencing this problem
recently, it happens on a dual uart powerpc CPU when one of the ports
is used by getty and its input is held in active state all the time,
(apparently generating continuous UART breaks).
It looks like getty gets tired of the junk it sees on the channel and
shuts the port down. Soon after that I see this message reporting a
dangling IRQ.
I investigated a bit, what happens is that the second port (which was
shut down on getty restart) asserts the IRQ, but the ISR
(8250.c:serial8250_interrupt()) does not look at the second port's
state, as the port is now unlinked from the list of active ports. The
ISR reports the interrupt not handled.
Now, why does the port assert the IRQ? This is because of the
following code in serial_core.c:uart_close():
uart_shutdown(state);
uart_flush_buffer(tty);
tty_ldisc_flush(tty);
uart_shutdown() disables ports interrupts and takes it out of the
list, uart_flush_buffer() returns right away on a port which is down,
uart_ldisc_flush() however doesn't mind. It goes like this:
[ee0b1c70] [c01848bc] serial8250_start_tx+0x2c/0x268
[ee0b1ca0] [c017a8e4] uart_send_xchar+0xb4/0xd4
[ee0b1cd0] [c017ec04] uart_unthrottle+0x80/0x144
[ee0b1d10] [c01754d0] tty_unthrottle+0x64/0x80
[ee0b1d20] [c0173ca4] reset_buffer_flags+0xb4/0xe8
[ee0b1d40] [c0173cf0] n_tty_flush_buffer+0x18/0x88
[ee0b1d60] [c01777d8] tty_ldisc_flush+0x3c/0x60
[ee0b1d70] [c017d850] uart_close+0x1ec/0x2d0
[ee0b1da0] [c01712dc] tty_release_dev+0x168/0x4f4
[ee0b1e40] [c0171688] tty_release+0x20/0x3c
[ee0b1e60] [c009c020] __fput+0x70/0x168
[ee0b1e80] [c0098884] filp_close+0x60/0x94
[ee0b1ea0] [c003d488] put_files_struct+0xf4/0x110
[ee0b1ec0] [c003f1a0] do_exit+0x560/0x5e8
[ee0b1f10] [c003f270] do_group_exit+0x48/0xac
[ee0b1f30] [c003f2e8] sys_exit_group+0x14/0x28
[ee0b1f40] [c000f9a0] ret_from_syscall+0x0/0x3c
where 8250.c:serial8250_start_tx() reenables transmit interrupt of the
channel which was excluded from interrupt processing.
what would be a proper fix here - should
serial_core.c:uart_unthrottle() be modified not to attempt sending a
character on the disabled tty?
cheers,
vadim
next reply other threads:[~2010-02-25 1:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-25 1:39 vb [this message]
2010-02-25 13:08 ` Alan Cox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f608b67d1002241739o2668b93cuc9eea669f70a407d@mail.gmail.com \
--to=vb@vsbe.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®