aboutsummaryrefslogtreecommitdiff
path: root/pkgs/patches-linux-5.15/0010-PCI-mvebu-Disallow-mapping-interrupts-on-emulated-br.patch
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2022-10-15 23:01:29 +0200
committerKarel Kočí <cynerd@email.cz>2022-10-16 13:20:32 +0200
commit462a088c474832b19ff2730de1e6bea66d399c23 (patch)
treea512b3b451afde09a9cb06449bd7a3bdc5a8bdb4 /pkgs/patches-linux-5.15/0010-PCI-mvebu-Disallow-mapping-interrupts-on-emulated-br.patch
parentd5514ca4aeddc711639f46024528becfff7c2a70 (diff)
downloadnixturris-462a088c474832b19ff2730de1e6bea66d399c23.tar.gz
nixturris-462a088c474832b19ff2730de1e6bea66d399c23.tar.bz2
nixturris-462a088c474832b19ff2730de1e6bea66d399c23.zip
Add Turris kernel (includes patches from OpenWrt)
Diffstat (limited to 'pkgs/patches-linux-5.15/0010-PCI-mvebu-Disallow-mapping-interrupts-on-emulated-br.patch')
-rw-r--r--pkgs/patches-linux-5.15/0010-PCI-mvebu-Disallow-mapping-interrupts-on-emulated-br.patch51
1 files changed, 51 insertions, 0 deletions
diff --git a/pkgs/patches-linux-5.15/0010-PCI-mvebu-Disallow-mapping-interrupts-on-emulated-br.patch b/pkgs/patches-linux-5.15/0010-PCI-mvebu-Disallow-mapping-interrupts-on-emulated-br.patch
new file mode 100644
index 0000000..cfcb1e5
--- /dev/null
+++ b/pkgs/patches-linux-5.15/0010-PCI-mvebu-Disallow-mapping-interrupts-on-emulated-br.patch
@@ -0,0 +1,51 @@
+From 7931a2a131998d990e5f9732fc3dc448ec672046 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <pali@kernel.org>
+Date: Fri, 17 Sep 2021 13:42:10 +0200
+Subject: [PATCH 10/90] PCI: mvebu: Disallow mapping interrupts on emulated
+ bridges
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Interrupt support on mvebu emulated bridges is not implemented yet.
+
+So properly indicate return value to callers that they cannot request
+interrupts from emulated bridge.
+
+Signed-off-by: Pali Rohár <pali@kernel.org>
+Cc: stable@vger.kernel.org
+---
+ drivers/pci/controller/pci-mvebu.c | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/drivers/pci/controller/pci-mvebu.c b/drivers/pci/controller/pci-mvebu.c
+index 5bf1889cfb38..0a8b552364aa 100644
+--- a/drivers/pci/controller/pci-mvebu.c
++++ b/drivers/pci/controller/pci-mvebu.c
+@@ -787,6 +787,15 @@ static struct pci_ops mvebu_pcie_ops = {
+ .write = mvebu_pcie_wr_conf,
+ };
+
++static int mvebu_pcie_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
++{
++ /* Interrupt support on mvebu emulated bridges is not implemented yet */
++ if (dev->bus->number == 0)
++ return 0; /* Proper return code 0 == NO_IRQ */
++
++ return of_irq_parse_and_map_pci(dev, slot, pin);
++}
++
+ static resource_size_t mvebu_pcie_align_resource(struct pci_dev *dev,
+ const struct resource *res,
+ resource_size_t start,
+@@ -1279,6 +1288,7 @@ static int mvebu_pcie_probe(struct platform_device *pdev)
+ bridge->sysdata = pcie;
+ bridge->ops = &mvebu_pcie_ops;
+ bridge->align_resource = mvebu_pcie_align_resource;
++ bridge->map_irq = mvebu_pcie_map_irq;
+
+ return pci_host_probe(bridge);
+ }
+--
+2.34.1
+