From patchwork Tue Mar 29 13:52:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 8687351 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2E039C0553 for ; Tue, 29 Mar 2016 13:53:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 56B342014A for ; Tue, 29 Mar 2016 13:53:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5D86020154 for ; Tue, 29 Mar 2016 13:53:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756665AbcC2NxH (ORCPT ); Tue, 29 Mar 2016 09:53:07 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:51520 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756137AbcC2NxF (ORCPT ); Tue, 29 Mar 2016 09:53:05 -0400 Received: from wuerfel.localnet ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue101) with ESMTPSA (Nemesis) id 0MGAYZ-1aYaXS1scp-00FAHA; Tue, 29 Mar 2016 15:52:13 +0200 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: Tim Harvey , Lucas Stach , "linux-pci@vger.kernel.org" , Richard Zhu , linux-kernel , Krzysztof =?utf-8?B?SGHFgmFzYQ==?= , Bjorn Helgaas , Petr =?utf-8?B?xaB0ZXRpYXI=?= , Fabio Estevam Subject: Re: [PATCH] i.MX6 PCIe: Fix imx6_pcie_deassert_core_reset() polarity Date: Tue, 29 Mar 2016 15:52:11 +0200 Message-ID: <23031613.R8qN30TbTq@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: References: <1459248921.2565.15.camel@pengutronix.de> MIME-Version: 1.0 X-Provags-ID: V03:K0:YrlEjRe1lhofRbWDViAb2qmSCF9UIgsnFqTOIyTgcUBrPXlWRhN wDitW4QAI9VsbnQKPCR+jcy/4ZL8YxWB+5mCbqltUjm9pPVS9kCpRdieGY8JJoBHV7dwAXI XRaqwGw1N3pd2zgdfKJTCx/t/7v7IKc+5L90fue7J3mYUJWLIOFC7dekfZHrx8XJoCoObcn v+HY0liDRcdfhSPwwOyVQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:xMOZPjsL/gk=:VBDkucVIwiQTaS4Bo5z6zh KTPfPWtiVuWo1+qf4drZjDqJKTjgcIF7e6nCsih4BPcNUvQwAIdrNRqjZExCV6raAtlYBOg9J DKVEMXOPXx4rnep2gYaDoqOe2xjtaPpJRS4AumNxOol/CWVA7BVnSn3ePUs6PQy9k4lu48qTL oFy+0t9R0XpLR4PNQgNfNo0bwRBpEHipNWPSWdykQMtRJnx62pyC7oQhkEouq/ZA4wgqxkFbj WYYSgLmEGWJx2U3YrJP5LIsR3gZ9V8bWj5jwMHf8YSU8OQ3cLCywy8+9246moFFWryG+IpPC3 uDUtdv0kF5qS9XcuCPygNheaGT5l4pLDEcZTx8AAny7Qp9qXPXb0ZyfLuyhwUxfAomGQxMGCY UzJFLFstPO9xgdGsckNLIllOT8k3+Eb/XKKOOvJY1n0Xjlb/0YYJ5ncmoZ0m/+biFf6wajM66 hqU/QeCw6gxm75jQRBEKz4XjaB+08hHG9kEcyKrKc2XtaPtJg0wV1rt/QiUEF7DzPp4sjlFe8 dtiYRJ7GB2BZnMHnjCUzFMPjWf1wQQnTLwmq39coMn+rimpX5c8c5480z5dxB8WXnxXhSoMxz 7jHR0x3JdZQzmUNzfOipUO72XQdNwHNteZn4xd9KSeaX4GIbIffZJetvYd1PvCs6tUxHKWWcW XPE8UvqFRjvuJHKFaeBarsz9+mhF7J9W1NdYszB9CndWcGRExv2V4xzGgEpTg4aIvc2EA1A+P VqXuqgkxypR27erl Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 On Tuesday 29 March 2016 06:32:29 Tim Harvey wrote: > > > > There is no upstream driver for this chip, so I don't know where to look > > to find out if the driver tries to enable MSI. > > > > Is what you are saying that if you enable MSI support in the kernel, it > > breaks legacy IRQs? > > Yes - any driver that does not support MSI will use legacy IRQ's and > they never fire. > > The Ventana GW53xx and GW54xx boards have a Marvell PCIe GigE > supported by the sky2 driver as eth1 which does support MSI and I > verified it gets an MSI interrupt and does work (along ath9k devices > with legacy interrupts that fail to work). > > root@ventana:~# cat /proc/interrupts | grep MSI > 299: 0 0 PCI-MSI 0 Edge PCIe PME, aerdrv > 308: 8726 0 PCI-MSI 9 Edge eth1 > > So it appears that MSI works for those drivers that use it, but does > somehow cause legacy IRQ's to break. > > I sent you a GW5400 dev kit over a while back to use for through > bridge testing on IMX6 that you should be able to repeat this with > assuming you have a PCIe card with a driver that doesn't support MSI > (or that you can tweak its driver to not support MSI). > > I think 31e98e0d24cd2537a63e06e235e050a06b175df7 "ARM: > imx_v6_v7_defconfig: enable PCI_MSI" should be reverted as well until > we figure this out. That doesn't sound like a helpful solution, multi_v7_defconfig for instance will still be broken because it enables PCI_MSI, and so will be all major distros. What happens if we patch the pci-imx6 driver to not make use of its MSI support even when that is enabled in the kernel? Does that get both devices in your GW5xxx to work with legacy interrupts or is one or both of them still broken? Arnd --- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/pci/host/pci-imx6.c b/drivers/pci/host/pci-imx6.c index eb5a2755a164..d7607b2695c6 100644 --- a/drivers/pci/host/pci-imx6.c +++ b/drivers/pci/host/pci-imx6.c @@ -470,7 +470,7 @@ static void imx6_pcie_host_init(struct pcie_port *pp) imx6_pcie_establish_link(pp); - if (IS_ENABLED(CONFIG_PCI_MSI)) + if (0 && IS_ENABLED(CONFIG_PCI_MSI)) dw_pcie_msi_init(pp); } @@ -490,7 +490,7 @@ static int __init imx6_add_pcie_port(struct pcie_port *pp, { int ret; - if (IS_ENABLED(CONFIG_PCI_MSI)) { + if (0 && IS_ENABLED(CONFIG_PCI_MSI)) { pp->msi_irq = platform_get_irq_byname(pdev, "msi"); if (pp->msi_irq <= 0) { dev_err(&pdev->dev, "failed to get MSI irq\n");