PCIe BW controller uses IRQF_ONESHOT to solve the problem fixed by theI tested this patch on my Raspberry Pi 4B (linux-next, arm64/defconfig),
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@xxxxxxx>
Link: https://lore.kernel.org/linux-pci/dcd660fd-a265-4f47-8696-776a85e097a0@xxxxxxx/
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx>
---