All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: Bjorn Helgaas <bhelgaas@google.com>, linux-pci@vger.kernel.org
Cc: "Jason Cooper" <jason@lakedaemon.net>,
	"Andrew Lunn" <andrew@lunn.ch>,
	"Sebastian Hesselbarth" <sebastian.hesselbarth@gmail.com>,
	"Gregory Clement" <gregory.clement@free-electrons.com>,
	"Nadav Haklai" <nadavh@marvell.com>,
	"Hanna Hawa" <hannah@marvell.com>,
	"Yehuda Yitschak" <yehuday@marvell.com>,
	linux-arm-kernel@lists.infradead.org,
	"Antoine Tenart" <antoine.tenart@free-electrons.com>,
	"Miquèl Raynal" <miquel.raynal@free-electrons.com>,
	"Thomas Petazzoni" <thomas.petazzoni@free-electrons.com>,
	stable@vger.kernel.org
Subject: [PATCH v2 7/7] PCI: aardvark: define IRQ related hooks in pci_host_bridge
Date: Thu, 28 Sep 2017 14:58:38 +0200	[thread overview]
Message-ID: <20170928125838.11887-8-thomas.petazzoni@free-electrons.com> (raw)
In-Reply-To: <20170928125838.11887-1-thomas.petazzoni@free-electrons.com>

Commit 769b461fc0c0 ("arm64: PCI: Drop DT IRQ allocation from
pcibios_alloc_irq()") was assuming all PCI host controller drivers had
been converted to use ->map_irq(), but that wasn't the case:
pci-aardvark had not been converted. Due to this, it broke the support
for legacy PCI interrupts when using the pci-aardvark driver (used on
Marvell Armada 3720 platforms).

In order to fix this, we make sure the ->map_irq and ->swizzle_irq
fields of pci_host_bridge are properly filled in.

Fixes: 769b461fc0c0 ("arm64: PCI: Drop DT IRQ allocation from pcibios_alloc_irq()")
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: <stable@vger.kernel.org> # v4.13+
---
 drivers/pci/host/pci-aardvark.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/pci/host/pci-aardvark.c b/drivers/pci/host/pci-aardvark.c
index c1093b023e48..249a088b463c 100644
--- a/drivers/pci/host/pci-aardvark.c
+++ b/drivers/pci/host/pci-aardvark.c
@@ -998,6 +998,8 @@ static int advk_pcie_probe(struct platform_device *pdev)
 	bridge->sysdata = pcie;
 	bridge->busnr = 0;
 	bridge->ops = &advk_pcie_ops;
+	bridge->map_irq = of_irq_parse_and_map_pci;
+	bridge->swizzle_irq = pci_common_swizzle;
 
 	ret = pci_scan_root_bus_bridge(bridge);
 	if (ret < 0) {
-- 
2.13.5

WARNING: multiple messages have this Message-ID (diff)
From: thomas.petazzoni@free-electrons.com (Thomas Petazzoni)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 7/7] PCI: aardvark: define IRQ related hooks in pci_host_bridge
Date: Thu, 28 Sep 2017 14:58:38 +0200	[thread overview]
Message-ID: <20170928125838.11887-8-thomas.petazzoni@free-electrons.com> (raw)
In-Reply-To: <20170928125838.11887-1-thomas.petazzoni@free-electrons.com>

Commit 769b461fc0c0 ("arm64: PCI: Drop DT IRQ allocation from
pcibios_alloc_irq()") was assuming all PCI host controller drivers had
been converted to use ->map_irq(), but that wasn't the case:
pci-aardvark had not been converted. Due to this, it broke the support
for legacy PCI interrupts when using the pci-aardvark driver (used on
Marvell Armada 3720 platforms).

In order to fix this, we make sure the ->map_irq and ->swizzle_irq
fields of pci_host_bridge are properly filled in.

Fixes: 769b461fc0c0 ("arm64: PCI: Drop DT IRQ allocation from pcibios_alloc_irq()")
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: <stable@vger.kernel.org> # v4.13+
---
 drivers/pci/host/pci-aardvark.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/pci/host/pci-aardvark.c b/drivers/pci/host/pci-aardvark.c
index c1093b023e48..249a088b463c 100644
--- a/drivers/pci/host/pci-aardvark.c
+++ b/drivers/pci/host/pci-aardvark.c
@@ -998,6 +998,8 @@ static int advk_pcie_probe(struct platform_device *pdev)
 	bridge->sysdata = pcie;
 	bridge->busnr = 0;
 	bridge->ops = &advk_pcie_ops;
+	bridge->map_irq = of_irq_parse_and_map_pci;
+	bridge->swizzle_irq = pci_common_swizzle;
 
 	ret = pci_scan_root_bus_bridge(bridge);
 	if (ret < 0) {
-- 
2.13.5

  parent reply	other threads:[~2017-09-28 12:58 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-28 12:58 [PATCH v2 0/7] PCI: aardvark: improve compatibility with PCI devices Thomas Petazzoni
2017-09-28 12:58 ` Thomas Petazzoni
2017-09-28 12:58 ` [PATCH v2 1/7] PCI: aardvark: fix logic in PCI configuration read/write functions Thomas Petazzoni
2017-09-28 12:58   ` Thomas Petazzoni
2017-09-28 12:58   ` Thomas Petazzoni
2017-10-05 17:23   ` Bjorn Helgaas
2017-10-05 17:23     ` Bjorn Helgaas
2017-10-05 17:23     ` Bjorn Helgaas
2018-01-09 16:49     ` Thomas Petazzoni
2018-01-09 16:49       ` Thomas Petazzoni
2018-01-10  1:11       ` Bjorn Helgaas
2018-01-10  1:11         ` Bjorn Helgaas
2018-01-10  1:11         ` Bjorn Helgaas
2017-10-09  7:59   ` Mason
2017-09-28 12:58 ` [PATCH v2 2/7] PCI: aardvark: set PIO_ADDR_LS correctly in advk_pcie_rd_conf() Thomas Petazzoni
2017-09-28 12:58   ` Thomas Petazzoni
2017-09-28 12:58   ` Thomas Petazzoni
2017-10-05 17:25   ` Bjorn Helgaas
2017-10-05 17:25     ` Bjorn Helgaas
2018-01-09 16:10     ` Thomas Petazzoni
2018-01-09 16:10       ` Thomas Petazzoni
2017-09-28 12:58 ` [PATCH v2 3/7] PCI: aardvark: set host and device to the same MAX payload size Thomas Petazzoni
2017-09-28 12:58   ` Thomas Petazzoni
2017-10-05 17:31   ` Bjorn Helgaas
2017-10-05 17:31     ` Bjorn Helgaas
2018-01-09 15:39     ` Thomas Petazzoni
2018-01-09 15:39       ` Thomas Petazzoni
2018-01-09 22:14       ` Bjorn Helgaas
2018-01-09 22:14         ` Bjorn Helgaas
2018-01-12 10:14         ` Thomas Petazzoni
2018-01-12 10:14           ` Thomas Petazzoni
2018-01-12 14:40           ` Bjorn Helgaas
2018-01-12 14:40             ` Bjorn Helgaas
2018-01-12 15:46             ` Thomas Petazzoni
2018-01-12 15:46               ` Thomas Petazzoni
2018-01-12 19:39               ` Bjorn Helgaas
2018-01-12 19:39                 ` Bjorn Helgaas
2017-09-28 12:58 ` [PATCH v2 4/7] PCI: aardvark: use isr1 instead of isr0 interrupt in legacy irq mode Thomas Petazzoni
2017-09-28 12:58   ` Thomas Petazzoni
2017-09-28 12:58 ` [PATCH v2 5/7] PCI: aardvark: disable LOS state by default Thomas Petazzoni
2017-09-28 12:58   ` Thomas Petazzoni
2017-10-05 17:46   ` Bjorn Helgaas
2017-10-05 17:46     ` Bjorn Helgaas
2017-10-09  6:54     ` Thomas Petazzoni
2017-10-09  6:54       ` Thomas Petazzoni
2017-09-28 12:58 ` [PATCH v2 6/7] PCI: aardvark: fix PCIe max read request size setting Thomas Petazzoni
2017-09-28 12:58   ` Thomas Petazzoni
2017-09-28 12:58 ` Thomas Petazzoni [this message]
2017-09-28 12:58   ` [PATCH v2 7/7] PCI: aardvark: define IRQ related hooks in pci_host_bridge Thomas Petazzoni
2017-10-05 17:55   ` Bjorn Helgaas
2017-10-05 17:55     ` Bjorn Helgaas
2017-10-05 17:55     ` Bjorn Helgaas
2017-10-05 19:25     ` Thomas Petazzoni
2017-10-05 19:25       ` Thomas Petazzoni
2017-10-05 15:53 ` [PATCH v2 0/7] PCI: aardvark: improve compatibility with PCI devices Thomas Petazzoni
2017-10-05 15:53   ` Thomas Petazzoni
2017-10-05 18:16   ` Bjorn Helgaas
2017-10-05 18:16     ` Bjorn Helgaas
2017-10-05 19:35     ` Thomas Petazzoni
2017-10-05 19:35       ` Thomas Petazzoni
2017-10-06  8:47     ` Lorenzo Pieralisi
2017-10-06  8:47       ` Lorenzo Pieralisi

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=20170928125838.11887-8-thomas.petazzoni@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=andrew@lunn.ch \
    --cc=antoine.tenart@free-electrons.com \
    --cc=bhelgaas@google.com \
    --cc=gregory.clement@free-electrons.com \
    --cc=hannah@marvell.com \
    --cc=jason@lakedaemon.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=miquel.raynal@free-electrons.com \
    --cc=nadavh@marvell.com \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=stable@vger.kernel.org \
    --cc=yehuday@marvell.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.