summaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorYunQiang Su <ysu@wavecomp.com>2019-01-08 13:45:10 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-01-26 09:42:50 +0100
commit93e6b2659b167b15207221bc4c05c11d94e6a14c (patch)
tree4f8433ce3a291935c8f3223802b8b07a33a3a744 /arch/mips
parentaf135bd839452e0c6b4f764255b50a372ef30efd (diff)
downloadlinux-stable-93e6b2659b167b15207221bc4c05c11d94e6a14c.tar.gz
linux-stable-93e6b2659b167b15207221bc4c05c11d94e6a14c.tar.bz2
linux-stable-93e6b2659b167b15207221bc4c05c11d94e6a14c.zip
Disable MSI also when pcie-octeon.pcie_disable on
commit a214720cbf50cd8c3f76bbb9c3f5c283910e9d33 upstream. 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+ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/pci/msi-octeon.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/mips/pci/msi-octeon.c b/arch/mips/pci/msi-octeon.c
index 2a5bb849b10e..288b58b00dc8 100644
--- a/arch/mips/pci/msi-octeon.c
+++ b/arch/mips/pci/msi-octeon.c
@@ -369,7 +369,9 @@ int __init octeon_msi_initialize(void)
int irq;
struct irq_chip *msi;
- if (octeon_dma_bar_type == OCTEON_DMA_BAR_TYPE_PCIE) {
+ if (octeon_dma_bar_type == OCTEON_DMA_BAR_TYPE_INVALID) {
+ return 0;
+ } else if (octeon_dma_bar_type == OCTEON_DMA_BAR_TYPE_PCIE) {
msi_rcv_reg[0] = CVMX_PEXP_NPEI_MSI_RCV0;
msi_rcv_reg[1] = CVMX_PEXP_NPEI_MSI_RCV1;
msi_rcv_reg[2] = CVMX_PEXP_NPEI_MSI_RCV2;