public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Min Zhang <mzhang@mvista.com>
Cc: gregkh@linuxfoundation.org, linux-serial@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] serial: 8250 check iir rdi in interrupt
Date: Fri, 26 Oct 2012 15:19:02 +0100	[thread overview]
Message-ID: <20121026151902.0a382d16@pyramind.ukuu.org.uk> (raw)
In-Reply-To: <CAJ0e-Fofs48N9VnYr1_8Kch6+yHjGx9iCWBRtRsqpD-B_rWutQ@mail.gmail.com>

> It is racing. For "too much work for irq", here is sequence events
> analyzed by a Motorola engineer:

Thanks - this is enormously helpful in understanding the report.

>         5) The LSR indicates that the transmitter needs data,
> but also indicates the presence of data in the FIFO (0x61 in the LSR)
>         6) The processing function receives the characters, and
> outputs data to the FIFO
>         7) At the exact time (very very small window) that the
> character is read from the FIFO, the FIFO timeout occurs locking in an
> interrupt cause
>         8) The next loop through the interrupt code begins
>         9) The IIR now indicates the data timeout interrupt
> (0xCC in the IIR)
>         10) The processing function is called and it reads the
> LSR
>         11) The LSR is 0 indicating nothing to do

>         12) The interrupt loop continues (the IIR won't clear
> until a character is pulled) until it reaches its max count and
> displays the error.

So we only need to check this in serial8250_handle_irq when IIR indicates
a data timeout interrupt ? 

Can we do

	if ((iir & 0x0F) == 0x0C) {
		/* Expensive RDI check */
	}



Alan

  reply	other threads:[~2012-10-26 14:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-23  0:19 [PATCH] serial: 8250 check iir rdi in interrupt Min Zhang
2012-10-23 10:01 ` Alan Cox
2012-10-23 19:43   ` Min Zhang
2012-10-26 14:19     ` Alan Cox [this message]
2012-10-26 21:57       ` Min Zhang
2012-10-30 14:24         ` Alan Cox
2012-10-26 22:16       ` [PATCHv2] " Min Zhang

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=20121026151902.0a382d16@pyramind.ukuu.org.uk \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=mzhang@mvista.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