From owner-svn-src-head@FreeBSD.ORG Sun Mar 16 08:38:31 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D0A918DA; Sun, 16 Mar 2014 08:38:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BD13DED3; Sun, 16 Mar 2014 08:38:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2G8cVkA059147; Sun, 16 Mar 2014 08:38:31 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2G8cVsr059146; Sun, 16 Mar 2014 08:38:31 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201403160838.s2G8cVsr059146@svn.freebsd.org> From: Adrian Chadd Date: Sun, 16 Mar 2014 08:38:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r263228 - head/sys/mips/atheros X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Mar 2014 08:38:31 -0000 Author: adrian Date: Sun Mar 16 08:38:31 2014 New Revision: 263228 URL: http://svnweb.freebsd.org/changeset/base/263228 Log: * Handle the three other timer interrupts for now, from the AR724x later. If the interrupts are ACKed even if they're not masked, we get the interrupts again later. Grr. * The AR724x and later chips want the interrupt bits cleared by writing the relevant bit to it, NOT by writing all but the current interrupt to it. Tested: * AR9344, DB120 reference board TODO: * Test ar724x and later chips to ensure no regressions have occured. Modified: head/sys/mips/atheros/apb.c Modified: head/sys/mips/atheros/apb.c ============================================================================== --- head/sys/mips/atheros/apb.c Sun Mar 16 08:04:06 2014 (r263227) +++ head/sys/mips/atheros/apb.c Sun Mar 16 08:38:31 2014 (r263228) @@ -362,9 +362,9 @@ apb_filter(void *arg) case AR71XX_SOC_AR9341: case AR71XX_SOC_AR9342: case AR71XX_SOC_AR9344: - /* Ack/clear the irq on status register for AR724x */ + /* ACK/clear the given interrupt */ ATH_WRITE_REG(AR71XX_MISC_INTR_STATUS, - reg & ~(1 << irq)); + (1 << irq)); break; default: /* fallthrough */ @@ -385,7 +385,7 @@ apb_filter(void *arg) continue; } /* Ignore timer interrupts */ - if (irq != 0) + if (irq != 0 && irq != 8 && irq != 9 && irq != 10) printf("Stray APB IRQ %d\n", irq); continue; }