From patchwork Fri Jun 2 18:54:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Burton X-Patchwork-Id: 9763191 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8E17F602BF for ; Fri, 2 Jun 2017 18:55:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7C67D285B1 for ; Fri, 2 Jun 2017 18:55:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 70C76285BF; Fri, 2 Jun 2017 18:55:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7FC64285BA for ; Fri, 2 Jun 2017 18:55:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751176AbdFBSzN (ORCPT ); Fri, 2 Jun 2017 14:55:13 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:63931 "EHLO mailapp01.imgtec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751007AbdFBSzN (ORCPT ); Fri, 2 Jun 2017 14:55:13 -0400 Received: from hhmail02.hh.imgtec.org (unknown [10.100.10.20]) by Forcepoint Email with ESMTPS id 87305433D8AF8; Fri, 2 Jun 2017 19:55:07 +0100 (IST) Received: from localhost (10.20.1.33) by hhmail02.hh.imgtec.org (10.100.10.21) with Microsoft SMTP Server (TLS) id 14.3.294.0; Fri, 2 Jun 2017 19:55:11 +0100 From: Paul Burton To: CC: Bjorn Helgaas , Michal Simek , Bharat Kumar Gogada , Ravikiran Gummaluri , Paul Burton Subject: [PATCH v4 1/4] PCI: xilinx: Fix INTX irq dispatch Date: Fri, 2 Jun 2017 11:54:16 -0700 Message-ID: <20170602185420.22281-2-paul.burton@imgtec.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170602185420.22281-1-paul.burton@imgtec.com> References: <20170602185420.22281-1-paul.burton@imgtec.com> MIME-Version: 1.0 X-Originating-IP: [10.20.1.33] Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The IRQ domain for INTX interrupts has 4 entries, numbered 0 to 3. This matches what the hardware reports from the interrupt FIFO exactly, but xilinx_pcie_intr_handler was adding 1 to that value to convert to the range 1 to 4. Stop adding 1, such that all of INTA through to INTD fall within the range of the IRQ domain. Signed-off-by: Paul Burton Fixes: 8961def56845 ("PCI: xilinx: Add Xilinx AXI PCIe Host Bridge IP driver") Cc: Bharat Kumar Gogada Cc: Bjorn Helgaas Cc: Michal Simek Cc: Ravikiran Gummaluri Cc: linux-pci@vger.kernel.org --- Changes in v4: None Changes in v3: - Split out from Boston patchset. Changes in v2: - Add Fixes tag. drivers/pci/host/pcie-xilinx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pci/host/pcie-xilinx.c b/drivers/pci/host/pcie-xilinx.c index 2fe2df51f9f8..6be2e5ee44f1 100644 --- a/drivers/pci/host/pcie-xilinx.c +++ b/drivers/pci/host/pcie-xilinx.c @@ -440,8 +440,8 @@ static irqreturn_t xilinx_pcie_intr_handler(int irq, void *data) XILINX_PCIE_REG_RPIFR1); /* Handle INTx Interrupt */ - val = ((val & XILINX_PCIE_RPIFR1_INTR_MASK) >> - XILINX_PCIE_RPIFR1_INTR_SHIFT) + 1; + val = (val & XILINX_PCIE_RPIFR1_INTR_MASK) >> + XILINX_PCIE_RPIFR1_INTR_SHIFT; generic_handle_irq(irq_find_mapping(port->leg_domain, val)); }