From owner-svn-src-all@FreeBSD.ORG Tue Jan 19 13:33:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 117D11065693; Tue, 19 Jan 2010 13:33:32 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 008DF8FC1B; Tue, 19 Jan 2010 13:33:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0JDXVu8003599; Tue, 19 Jan 2010 13:33:31 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0JDXVHf003597; Tue, 19 Jan 2010 13:33:31 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201001191333.o0JDXVHf003597@svn.freebsd.org> From: Alexander Motin Date: Tue, 19 Jan 2010 13:33:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202624 - stable/8/sys/dev/ahci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2010 13:33:32 -0000 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); } /*