Skip to content

Commit 09bc2f5

Browse files
lynxeye-devgregkh
authored andcommitted
PCI: dwc: skip MSI init if MSIs have been explicitly disabled
commit 3afc829 upstream. Since 7c5925a (PCI: dwc: Move MSI IRQs allocation to IRQ domains hierarchical API) the MSI init claims one of the controller IRQs as a chained IRQ line for the MSI controller. On some designs, like the i.MX6, this line is shared with a PCIe legacy IRQ. When the line is claimed for the MSI domain, any device trying to use this legacy IRQs will fail to request this IRQ line. As MSI and legacy IRQs are already mutually exclusive on the DWC core, as the core won't forward any legacy IRQs once any MSI has been enabled, users wishing to use legacy IRQs already need to explictly disable MSI support (usually via the pci=nomsi kernel commandline option). To avoid any issues with MSI conflicting with legacy IRQs, just skip all of the DWC MSI initalization, including the IRQ line claim, when MSI is disabled. Fixes: 7c5925a ("PCI: dwc: Move MSI IRQs allocation to IRQ domains hierarchical API") Tested-by: Tim Harvey <tharvey@gateworks.com> Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Acked-by: Gustavo Pimentel <gustavo.pimentel@synopsys.com> Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 13a9d14 commit 09bc2f5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/pci/controller/dwc/pcie-designware-host.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ int dw_pcie_host_init(struct pcie_port *pp)
439439
if (ret)
440440
pci->num_viewport = 2;
441441

442-
if (IS_ENABLED(CONFIG_PCI_MSI)) {
442+
if (IS_ENABLED(CONFIG_PCI_MSI) && pci_msi_enabled()) {
443443
/*
444444
* If a specific SoC driver needs to change the
445445
* default number of vectors, it needs to implement

0 commit comments

Comments
 (0)