Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Jan 2010 13:33:31 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r202624 - stable/8/sys/dev/ahci
Message-ID:  <201001191333.o0JDXVHf003597@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Tue Jan 19 13:33:31 2010
New Revision: 202624
URL: http://svn.freebsd.org/changeset/base/202624

Log:
  MFC r200814:
  Clear all ports interrupt status bits in single write. Clearing one by one
  causes additional MSIs messages sent if several ports asked for attention
  same time. Time window before clearing is not important, as these interrupts
  are level triggered by interrupt source.

Modified:
  stable/8/sys/dev/ahci/ahci.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/ahci/ahci.c
==============================================================================
--- stable/8/sys/dev/ahci/ahci.c	Tue Jan 19 13:31:57 2010	(r202623)
+++ stable/8/sys/dev/ahci/ahci.c	Tue Jan 19 13:33:31 2010	(r202624)
@@ -596,20 +596,18 @@ ahci_intr(void *data)
 		unit = irq->r_irq_rid - 1;
 		is = ATA_INL(ctlr->r_mem, AHCI_IS);
 	}
+	/* Some controllers have edge triggered IS. */
+	if (ctlr->quirks & AHCI_Q_EDGEIS)
+		ATA_OUTL(ctlr->r_mem, AHCI_IS, is);
 	for (; unit < ctlr->channels; unit++) {
 		if ((is & (1 << unit)) != 0 &&
 		    (arg = ctlr->interrupt[unit].argument)) {
-			if (ctlr->quirks & AHCI_Q_EDGEIS) {
-				/* Some controller have edge triggered IS. */
-				ATA_OUTL(ctlr->r_mem, AHCI_IS, 1 << unit);
-				ctlr->interrupt[unit].function(arg);
-			} else {
-				/* but AHCI declares level triggered IS. */
 				ctlr->interrupt[unit].function(arg);
-				ATA_OUTL(ctlr->r_mem, AHCI_IS, 1 << unit);
-			}
 		}
 	}
+	/* AHCI declares level triggered IS. */
+	if (!(ctlr->quirks & AHCI_Q_EDGEIS))
+		ATA_OUTL(ctlr->r_mem, AHCI_IS, is);
 }
 
 /*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001191333.o0JDXVHf003597>