Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Disable MSI also when pcie-octeon.pcie_disable on

Octeon has an boot-time option to disable pcie.

Since MSI depends on PCI-E, we should also disable MSI also with
this option is on in order to avoid inadvertently accessing PCIe
registers.

Signed-off-by: YunQiang Su <ysu@wavecomp.com>
Signed-off-by: Paul Burton <paul.burton@mips.com>
Cc: pburton@wavecomp.com
Cc: linux-mips@vger.kernel.org
Cc: aaro.koskinen@iki.fi
Cc: stable@vger.kernel.org # v3.3+

authored by

YunQiang Su and committed by
Paul Burton
a214720c 321c46b9

+3 -1
+3 -1
arch/mips/pci/msi-octeon.c
··· 369 369 int irq; 370 370 struct irq_chip *msi; 371 371 372 - if (octeon_dma_bar_type == OCTEON_DMA_BAR_TYPE_PCIE) { 372 + if (octeon_dma_bar_type == OCTEON_DMA_BAR_TYPE_INVALID) { 373 + return 0; 374 + } else if (octeon_dma_bar_type == OCTEON_DMA_BAR_TYPE_PCIE) { 373 375 msi_rcv_reg[0] = CVMX_PEXP_NPEI_MSI_RCV0; 374 376 msi_rcv_reg[1] = CVMX_PEXP_NPEI_MSI_RCV1; 375 377 msi_rcv_reg[2] = CVMX_PEXP_NPEI_MSI_RCV2;