From patchwork Thu Dec 12 18:29:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harro Haan X-Patchwork-Id: 3333681 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D95719F2A9 for ; Thu, 12 Dec 2013 18:32:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 60D6120780 for ; Thu, 12 Dec 2013 18:32:46 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 83512205B9 for ; Thu, 12 Dec 2013 18:32:42 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VrB3o-0002oq-FP; Thu, 12 Dec 2013 18:32:32 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VrB3m-0005jA-38; Thu, 12 Dec 2013 18:32:30 +0000 Received: from mail-ee0-x22d.google.com ([2a00:1450:4013:c00::22d]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VrB3i-0005i8-Ly for linux-arm-kernel@lists.infradead.org; Thu, 12 Dec 2013 18:32:27 +0000 Received: by mail-ee0-f45.google.com with SMTP id d49so423441eek.4 for ; Thu, 12 Dec 2013 10:32:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:user-agent:date:from:to:cc:subject:content-disposition :mime-version:content-transfer-encoding; bh=ZwjGRuc0KiIiy8WQglYoaHGemZzTmnXua9JQLVCINB0=; b=rZTz8eOgZXkJzZoPz1Z2NTt6GAGZ+0LdSgLXUi9cGu9w0JnC9byIqcaC+/FL5S/74u 8d59tX/LhrbxxmoxJbTly8tjGk494k2Ef8Abau0lwnOX1KsMkhIi5ABIEcV/dgsvf4o1 HzXRtCkVEdBq9R+KyNEHKVVF1qQ5Y83r9Xf1jhpnXNp2P6A1R+Ebcv9o4tRmOgcNU/IP JoyovkWft9PqQMO+AVs2WWXrkwjjKiEc1PhmPX7HkOyaHoo8Q233scb+gqilI2xX9Bm2 S2upNkQ5BszHfOBhJJj6IMQdoxVxXaNGBcupsRm+sazNlxGAgoR87D2ZNC62VbuXr7uO 8Wew== X-Received: by 10.14.215.199 with SMTP id e47mr9523704eep.107.1386873121666; Thu, 12 Dec 2013 10:32:01 -0800 (PST) Received: from [10.0.1.200] (541D2AA4.cm-5-6a.dynamic.ziggo.nl. [84.29.42.164]) by mx.google.com with ESMTPSA id a51sm68708011eeh.8.2013.12.12.10.32.00 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 12 Dec 2013 10:32:00 -0800 (PST) Message-Id: <20131212182903.409515738@gmail.com> User-Agent: quilt/0.50-1 Date: Thu, 12 Dec 2013 19:29:03 +0100 From: Harro Haan To: Harro Haan , Mohit Kumar , Jingoo Han , Subject: [PATCH] pci: designware: fix missing msi irqs Content-Disposition: inline; filename=pci-designware-fix-missing-msi-irqs.patch Mime-Version: 1.0 X-Mailer: Evolution 3.2.3-0ubuntu6 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131212_133226_895231_9B23C41F X-CRM114-Status: GOOD ( 10.79 ) X-Spam-Score: -2.0 (--) Cc: Marek Vasut , Pratyush Anand , Arnd Bergmann , Siva Reddy Kallam , Richard Zhu , linux-pci@vger.kernel.org, Tim Harvey , Srikanth T Shivanand , Bjorn Helgaas , Sean Cross , Shawn Guo , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The interrupts were cleared after the irq handler was called. This means that new interrupts that occur after the handler handled the previous irq but before the interrupt is cleared will be missed. Signed-off-by: Harro Haan Cc: Mohit Kumar Cc: Jingoo Han Cc: Bjorn Helgaas Cc: Marek Vasut Cc: Richard Zhu Cc: Shawn Guo Cc: Pratyush Anand Cc: Tim Harvey Cc: Juergen Beisert Cc: Arnd Bergmann Cc: Siva Reddy Kallam Cc: Srikanth T Shivanand Cc: Sean Cross Cc: linux-pci@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Tested-by: Marek Vasut Tested-by: Matthias Mann Acked-by: Jingoo Han Acked-by: Mohit Kumar Tested-by: Marek Vasut Tested-by: Matthias Mann Acked-by: Jingoo Han Acked-by: Mohit Kumar --- drivers/pci/host/pcie-designware.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c index 1ce0453..762f596 100644 --- a/drivers/pci/host/pcie-designware.c +++ b/drivers/pci/host/pcie-designware.c @@ -167,11 +167,13 @@ void dw_handle_msi_irq(struct pcie_port *pp) while ((pos = find_next_bit(&val, 32, pos)) != 32) { irq = irq_find_mapping(pp->irq_domain, i * 32 + pos); + dw_pcie_wr_own_conf(pp, + PCIE_MSI_INTR0_STATUS + i * 12, + 4, 1 << pos); generic_handle_irq(irq); pos++; } } - dw_pcie_wr_own_conf(pp, PCIE_MSI_INTR0_STATUS + i * 12, 4, val); } }