From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Chanho Min <chanho0207@gmail.com>
Cc: Alan Cox <alan@linux.intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Linus Walleij <linus.walleij@linaro.org>,
Shreshtha Kumar Sahu <shreshthakumar.sahu@stericsson.com>,
"Kim, Jong-Sung" <neidhard.kim@lge.com>,
linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org
Subject: Re: [PATCH] Clear previous interrupts after fifo is disabled
Date: Tue, 28 Feb 2012 09:21:40 +0000 [thread overview]
Message-ID: <20120228092140.GD18045@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <CAOAMb1CJ=G45G3JsxwP23GSdEOnDmY5xVoQmWLXaKJJv2cLOLg@mail.gmail.com>
On Tue, Feb 28, 2012 at 06:16:10PM +0900, Chanho Min wrote:
> > RXFE _will_ be set. Think about it - RXFE means Receive Fifo Empty.
> > If the receive fifo is empty, it _will_ be set.
> I know meaning of the RXFE. I also don't understand why RXFE is set by
> clearing FEN. We checked this by bellow debug codes.
>
> fr_before = readw(uap->port.membase + UART01x_FR);
> writew(0, uap->port.membase + uap->lcrh_rx);
> fr_after = readw(uap->port.membase + UART01x_FR);
>
> If rx interrupt is ocurred before, fr_after becomes 0x90 but fr_before is 0x80.
Because the flags are manipulated to give the illusion of a one byte
FIFO, as stated in the TRM.
> > And RIS is the _Raw_ interrupt status. That's the status _before_ the
> > mask is acted upon.
> >
> > But it won't be delivered because the mask register is zero.
> It can be delivered just after mask register is set to 1.
And we don't set the mask register to 1 until later.
> >> Root cause is that Rx interrupt set but Rx fifo is empty. If we just
> >> remove the sentence for clearing LCRH, nothing happens and interrupt
> >> handler don't this misbehave.
> >
> > No.
> When we just removed the sentence for clearing LCRH, this hangup doesn't
> happen.
But we want to do the transmit interrupt provocation with the FIFO disabled.
next prev parent reply other threads:[~2012-02-28 9:22 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-27 9:30 [PATCH] Clear previous interrupts after fifo is disabled Chanho Min
2012-02-27 10:45 ` Linus Walleij
2012-02-27 10:48 ` Russell King - ARM Linux
2012-02-27 11:02 ` Russell King - ARM Linux
2012-02-27 13:54 ` Linus Walleij
2012-02-28 1:35 ` Chanho Min
2012-02-28 8:35 ` Russell King - ARM Linux
2012-02-28 9:16 ` Chanho Min
2012-02-28 9:21 ` Russell King - ARM Linux [this message]
2012-02-28 9:46 ` Chanho Min
2012-02-28 10:23 ` Russell King - ARM Linux
2012-02-29 2:47 ` Chanho Min
2012-03-08 9:02 ` Kim, Jong-Sung
2012-03-08 18:49 ` Greg Kroah-Hartman
2012-03-09 16:34 ` Linus Walleij
2012-03-09 16:37 ` Greg Kroah-Hartman
2012-03-10 2:14 ` Chanho Min
2012-03-12 1:24 ` Kim, Jong-Sung
2012-03-12 8:29 ` Linus Walleij
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=20120228092140.GD18045@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=alan@linux.intel.com \
--cc=chanho0207@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=neidhard.kim@lge.com \
--cc=shreshthakumar.sahu@stericsson.com \
/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