public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] i.MX6 PCIe: Fix imx6_pcie_deassert_core_reset() polarity
Date: Tue, 29 Mar 2016 15:52:11 +0200	[thread overview]
Message-ID: <23031613.R8qN30TbTq@wuerfel> (raw)
In-Reply-To: <CAJ+vNU3o98T2cev1Pj0VJR884kOxVxhrzmowDixGuV2Tb=Sh1Q@mail.gmail.com>

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 at 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

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");

  reply	other threads:[~2016-03-29 13:52 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-25 13:32 [PATCH] i.MX6 PCIe: Fix imx6_pcie_deassert_core_reset() polarity Krzysztof Hałasa
2016-03-27 14:44 ` Fabio Estevam
2016-03-28  0:26   ` Fabio Estevam
2016-03-28 19:59     ` Tim Harvey
2016-03-28 20:13       ` Fabio Estevam
2016-03-28 20:42         ` Tim Harvey
2016-03-28 21:30           ` Fabio Estevam
2016-03-28 22:06             ` Tim Harvey
2016-03-28 22:13               ` Fabio Estevam
2016-03-29  5:40                 ` Krzysztof Hałasa
2016-03-29  5:43                   ` Krzysztof Hałasa
2016-03-29  5:29               ` Krzysztof Hałasa
2016-03-29  8:55               ` Lucas Stach
2016-03-29 10:39                 ` Krzysztof Hałasa
2016-03-29 10:55                   ` Lucas Stach
2016-03-29 13:12                     ` Arnd Bergmann
2016-03-29 13:32                     ` Tim Harvey
2016-03-29 13:52                       ` Arnd Bergmann [this message]
2016-03-29 14:29                         ` Tim Harvey
2016-03-29 14:50                           ` Arnd Bergmann
2016-03-29 15:10                             ` Tim Harvey
2016-03-29 15:24                               ` Arnd Bergmann
2016-03-29 17:38                                 ` Tim Harvey
2016-03-29 19:39                                   ` Arnd Bergmann
2016-03-29 17:56                                 ` Marc Zyngier
2016-03-29 16:13                               ` Roberto Fichera
2016-03-29 16:40                                 ` Tim Harvey
2016-03-29 16:44                                   ` Roberto Fichera
2016-03-29 17:31                                     ` Tim Harvey
2016-03-30  8:00                                       ` Roberto Fichera
2016-03-30 10:10                                         ` Arnd Bergmann
2016-03-30 12:50                                           ` Roberto Fichera
2016-03-30 13:38                                             ` Tim Harvey
2016-03-30 15:20                                               ` Roberto Fichera
2016-03-30  8:10                     ` Krzysztof Hałasa
2016-03-31 16:19                       ` Tim Harvey
2016-04-04 10:37                         ` Krzysztof Hałasa
2016-03-29 14:14                 ` Fabio Estevam
2016-03-29  5:21           ` Krzysztof Hałasa
2016-03-30 12:06 ` Petr Štetiar
2016-03-30 12:45   ` Fabio Estevam
2016-03-30 14:38   ` Marcel Ziswiler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=23031613.R8qN30TbTq@wuerfel \
    --to=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox