From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Stefan Wahren <wahrenst@gmx.net>,
Florian Fainelli <florian.fainelli@broadcom.com>,
Thomas Gleixner <tglx@linutronix.de>,
Bjorn Helgaas <bhelgaas@google.com>,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Subject: [PATCH 1/1] PCI/PME+pciehp: Request IRQF_ONESHOT because bwctrl shares IRQ
Date: Thu, 14 Nov 2024 16:20:34 +0200 [thread overview]
Message-ID: <20241114142034.4388-1-ilpo.jarvinen@linux.intel.com> (raw)
PCIe BW controller uses IRQF_ONESHOT to solve the problem fixed by the
commit 3e82a7f9031f ("PCI/LINK: Supply IRQ handler so level-triggered
IRQs are acked"). The IRQ is shared with PME and PCIe hotplug. Due to
probe order, PME and hotplug can request IRQ first without IRQF_ONESHOT
and when BW controller requests IRQ later with IRQF_ONESHOT, the IRQ
request fails. The problem is seen at least on Rasperry Pi 4:
pcieport 0000:00:00.0: PME: Signaling with IRQ 39
pcieport 0000:00:00.0: AER: enabled with IRQ 39
genirq: Flags mismatch irq 39. 00002084 (PCIe bwctrl) vs.00200084 (PCIe PME)
pcie_bwctrl 0000:00:00.0:pcie010: probe with driver pcie_bwctrl failed with error -16
BW controller is always enabled so change PME and pciehp too to use
IRQF_ONESHOT.
Fixes: 470b218c2bdf ("PCI/bwctrl: Re-add BW notification portdrv as PCIe BW controller")
Reported-by: Stefan Wahren <wahrenst@gmx.net>
Link: https://lore.kernel.org/linux-pci/dcd660fd-a265-4f47-8696-776a85e097a0@gmx.net/
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
---
drivers/pci/hotplug/pciehp_hpc.c | 3 ++-
drivers/pci/pcie/pme.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c
index 736ad8baa2a5..0778305cff9d 100644
--- a/drivers/pci/hotplug/pciehp_hpc.c
+++ b/drivers/pci/hotplug/pciehp_hpc.c
@@ -68,7 +68,8 @@ static inline int pciehp_request_irq(struct controller *ctrl)
/* Installs the interrupt handler */
retval = request_threaded_irq(irq, pciehp_isr, pciehp_ist,
- IRQF_SHARED, "pciehp", ctrl);
+ IRQF_SHARED | IRQF_ONESHOT,
+ "pciehp", ctrl);
if (retval)
ctrl_err(ctrl, "Cannot get irq %d for the hotplug controller\n",
irq);
diff --git a/drivers/pci/pcie/pme.c b/drivers/pci/pcie/pme.c
index a2daebd9806c..04f0e5a7b74c 100644
--- a/drivers/pci/pcie/pme.c
+++ b/drivers/pci/pcie/pme.c
@@ -347,7 +347,8 @@ static int pcie_pme_probe(struct pcie_device *srv)
pcie_pme_interrupt_enable(port, false);
pcie_clear_root_pme_status(port);
- ret = request_irq(srv->irq, pcie_pme_irq, IRQF_SHARED, "PCIe PME", srv);
+ ret = request_irq(srv->irq, pcie_pme_irq, IRQF_SHARED | IRQF_ONESHOT,
+ "PCIe PME", srv);
if (ret) {
kfree(data);
return ret;
--
2.39.5
next reply other threads:[~2024-11-14 14:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-14 14:20 Ilpo Järvinen [this message]
2024-11-15 7:07 ` Ilpo Järvinen
2024-11-15 12:29 ` Stefan Wahren
2024-11-15 13:00 ` Lukas Wunner
2024-11-15 16:27 ` Ilpo Järvinen
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=20241114142034.4388-1-ilpo.jarvinen@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=bhelgaas@google.com \
--cc=florian.fainelli@broadcom.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=wahrenst@gmx.net \
/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
all inboxes | Powered by JetHome®