From patchwork Thu Dec 1 20:34:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Gospodarek X-Patchwork-Id: 701663 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3tV8LZ63Dvz9t1B for ; Fri, 2 Dec 2016 07:40:38 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=broadcom.com header.i=@broadcom.com header.b="Do3utIk6"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753657AbcLAUkh (ORCPT ); Thu, 1 Dec 2016 15:40:37 -0500 Received: from lpdvsmtp01.broadcom.com ([192.19.211.62]:37437 "EHLO relay.smtp.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754848AbcLAUkh (ORCPT ); Thu, 1 Dec 2016 15:40:37 -0500 X-Greylist: delayed 335 seconds by postgrey-1.27 at vger.kernel.org; Thu, 01 Dec 2016 15:40:36 EST Received: from mail-irv-17.broadcom.com (smtphost.broadcom.com [10.15.198.34]) by relay.smtp.broadcom.com (Postfix) with ESMTP id CFC25280096; Thu, 1 Dec 2016 12:34:57 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.10.3 relay.smtp.broadcom.com CFC25280096 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1480624498; bh=YGDO7yiNuMtaoemwlsDari9I03GOKJYaXjsjNEVcx4g=; h=From:To:Cc:Subject:Date:From; b=Do3utIk6lcqMf27iKHBZjOn1RIZRfWI3uaa2Ku6FDLF+9Sqb/Qr5J7CjVz1aKfCVF kN70l28NKTBQp+2yz9hWJzeVcc0/iLJwYQDayoxYGSQugUHVWp1/V2fSUO1n4hqTHB ulfSfPKbwqvJFASvyqWtMki89GoDaoscfXqlPVgU= Received: from xl-rtp-02.broadcom.com (xl-rtp-02.rtp.broadcom.com [10.27.128.235]) by mail-irv-17.broadcom.com (Postfix) with ESMTP id 05D5582025; Thu, 1 Dec 2016 12:34:57 -0800 (PST) Received: by xl-rtp-02.broadcom.com (Postfix, from userid 113978) id 685974C07D8; Thu, 1 Dec 2016 15:34:56 -0500 (EST) From: Andy Gospodarek To: bhelgaas@google.com, linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org Cc: Andy Gospodarek , Ray Jui Subject: [PATCH pci/host-iproc] pci-iproc: skip check for legacy IRQ on PAXC buses Date: Thu, 1 Dec 2016 15:34:52 -0500 Message-Id: <1480624492-32420-1-git-send-email-gospo@broadcom.com> X-Mailer: git-send-email 2.1.0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org PAXC and PAXCv2 buses do not support legacy IRQs so there is no reason to even try and map them. Without a change like this, one cannot create VFs on Nitro ports since legacy interrupts are checked as part of the PCI device creation process. Testing on PAXC hardware showed that VFs are properly created with only the change to not set pcie->map_irq, but just to be safe the change in iproc_pcie_setup will ensure that pdev_fixup_irq will not panic. Signed-off-by: Andy Gospodarek Signed-off-by: Ray Jui --- drivers/pci/host/pcie-iproc-platform.c | 9 ++++++++- drivers/pci/host/pcie-iproc.c | 5 ++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/pci/host/pcie-iproc-platform.c b/drivers/pci/host/pcie-iproc-platform.c index fd3ed9b..22d814a 100644 --- a/drivers/pci/host/pcie-iproc-platform.c +++ b/drivers/pci/host/pcie-iproc-platform.c @@ -108,7 +108,14 @@ static int iproc_pcie_pltfm_probe(struct platform_device *pdev) return ret; } - pcie->map_irq = of_irq_parse_and_map_pci; + /* PAXC doesn't support legacy IRQs, skip mapping */ + switch (pcie->type) { + case IPROC_PCIE_PAXC: + case IPROC_PCIE_PAXC_V2: + break; + default: + pcie->map_irq = of_irq_parse_and_map_pci; + } ret = iproc_pcie_setup(pcie, &res); if (ret) diff --git a/drivers/pci/host/pcie-iproc.c b/drivers/pci/host/pcie-iproc.c index cd51334..3ebc025 100644 --- a/drivers/pci/host/pcie-iproc.c +++ b/drivers/pci/host/pcie-iproc.c @@ -1274,7 +1274,10 @@ int iproc_pcie_setup(struct iproc_pcie *pcie, struct list_head *res) pci_scan_child_bus(bus); pci_assign_unassigned_bus_resources(bus); - pci_fixup_irqs(pci_common_swizzle, pcie->map_irq); + + if (pcie->map_irq) + pci_fixup_irqs(pci_common_swizzle, pcie->map_irq); + pci_bus_add_devices(bus); return 0;