linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: tj@kernel.org (Tejun Heo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 1/2] libahci: Add support to handle HOST_IRQ_STAT as edge trigger latch.
Date: Mon, 4 May 2015 11:47:26 -0400	[thread overview]
Message-ID: <20150504154726.GA1971@htj.duckdns.org> (raw)
In-Reply-To: <1430667220-23477-2-git-send-email-stripathi@apm.com>

On Sun, May 03, 2015 at 09:03:39PM +0530, Suman Tripathi wrote:
> This patch adds the support to handle HOST_IRQ_STAT as edge trigger
> latch.
...
> +	/*
> +	 * HOST_IRQ_STAT behaves as edge trigger latch. When HOST_IRQ_STAT
> +	 * detects a egde from PORT_IRQ_STAT, it happens to loose interrupts
> +	 * when interrupts are triggered from both ports. So handling of
> +	 * the residual interrupt is required.
> +	 */
> +	if (hpriv->flags & AHCI_HFLAG_EDGE_TRIG_IRQ) {
> +		for (i = 0; i < host->n_ports; i++) {
> +			struct ata_port *ap;
> +
> +			ap = host->ports[i];
> +			if (ap) {
> +				ahci_port_intr(ap);
> +				VPRINTK("Residual irq from port %u\n", i);
> +			}
> +			handled = 1;
> +		}
> +	}

This is kinda gross.  The right thing do is clearing irq stat
registers before handling the events, right?  That shouldn't be too
difficult to implement.  Create a separate set of irq functions which
clear irqs before processing rather than after.

Thanks.

-- 
tejun

  parent reply	other threads:[~2015-05-04 15:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1430667220-23477-1-git-send-email-stripathi@apm.com>
     [not found] ` <1430667220-23477-3-git-send-email-stripathi@apm.com>
2015-05-04  0:26   ` [PATCH v3 2/2] ata: ahci_xgene: Add AHCI Support for 2nd HW version of APM X-Gene SoC AHCI SATA Host controller Julian Calaby
2015-05-04  2:51     ` Suman Tripathi
2015-05-04  3:22       ` Julian Calaby
2015-05-04  4:33         ` Suman Tripathi
     [not found] ` <1430667220-23477-2-git-send-email-stripathi@apm.com>
2015-05-04 13:08   ` [PATCH v3 1/2] libahci: Add support to handle HOST_IRQ_STAT as edge trigger latch Sergei Shtylyov
2015-05-04 15:47   ` Tejun Heo [this message]
2015-05-04 16:43     ` Suman Tripathi
2015-05-04 18:26       ` Tejun Heo
2015-05-05  5:55         ` Suman Tripathi
2015-05-05 13:18           ` Tejun Heo

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=20150504154726.GA1971@htj.duckdns.org \
    --to=tj@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.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).