Skip to content

Commit a214720

Browse files
YunQiang Supaulburton
authored andcommitted
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+
1 parent 321c46b commit a214720

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎arch/mips/pci/msi-octeon.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,9 @@ int __init octeon_msi_initialize(void)
369369
int irq;
370370
struct irq_chip *msi;
371371

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) {
373375
msi_rcv_reg[0] = CVMX_PEXP_NPEI_MSI_RCV0;
374376
msi_rcv_reg[1] = CVMX_PEXP_NPEI_MSI_RCV1;
375377
msi_rcv_reg[2] = CVMX_PEXP_NPEI_MSI_RCV2;

0 commit comments

Comments
 (0)