From: Ralf Baechle <ralf@linux-mips.org>
To: Jan Nikitenko <jan.nikitenko@gmail.com>
Cc: linux-mips@linux-mips.org, linux-serial@vger.kernel.org
Subject: Re: [PATCH] serial: fix au1xxx UART0 irq setup
Date: Thu, 25 Oct 2007 15:09:40 +0100 [thread overview]
Message-ID: <20071025140940.GC23398@linux-mips.org> (raw)
In-Reply-To: <4720A11E.5060101@gmail.com>
On Thu, Oct 25, 2007 at 03:58:54PM +0200, Jan Nikitenko wrote:
> UART0 on Alchemy mips platforms (au1xxx) does not use real uart's hw
> irq, causing 'ttyS0: 1 input overrun(s)' kernel message with data loss,
> when more characters than uart's fifo size were to be received by the uart.
>
> This problem can be experienced for example when uart0 is used as a
> serial console on au1550 and more than 16 characters are pasted from
> clipboard to the console.
>
> The is_real_interrupt(irq) macro is defined in drivers/serial/8250.c as
> a check, if the irq number is other than zero.
> Because UART0 on au1xxx platforms uses irq number 0, the
> is_real_interrupt() check fails and serial8250_backup_timeout() is used
> instead of uart's hw irq.
>
> The patch redefines the is_real_interrupt(irq) macro, as suggested in
> the comment above the macro definition in 8250.c, in the
> asm-mips/serial.h to be always true for CONFIG_SERIAL_8250_AU1X00.
> This allows the irq number 0 to be used as hw irq for the alchemy uart0
> and fixes the overrun problem.
>
> Signed-off-by: Jan Nikitenko <jan.nikitenko@gmail.com>
Fairly unelegent imho but anyway, for 2.6.24 I've added support for
tickless to MIPS which in turn required a bit of a cleanup on the Alchemy
code so I renumbered the Alchemy interrupt numbers, so what used to be
IRQ 0 is now IRQ 8 which means your patch is no longer needed for master.
That said, irq 0 is imho totally valid (take the good old PIT timer
interrupt of the PC as the classic example) and treating it as an invalid
interrupt number is broken.
It's however equally pretty crude hack to undefine a symbol in a file other
than the one defining it ...
Ralf
next prev parent reply other threads:[~2007-10-25 14:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-25 13:58 [PATCH] serial: fix au1xxx UART0 irq setup Jan Nikitenko
2007-10-25 14:09 ` Ralf Baechle [this message]
2007-10-25 14:47 ` Jan Nikitenko
2007-10-25 14:57 ` Maciej W. Rozycki
2007-10-25 16:41 ` Ralf Baechle
2007-10-25 14:09 ` Sergei Shtylyov
2007-10-29 15:28 ` Ralf Baechle
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=20071025140940.GC23398@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=jan.nikitenko@gmail.com \
--cc=linux-mips@linux-mips.org \
--cc=linux-serial@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;
as well as URLs for NNTP newsgroup(s).