MIPS: Octeon: Add PCIe link status check
authorSongyang Li <leesongyang@outlook.com>
Wed, 20 Mar 2024 15:22:00 +0000 (23:22 +0800)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Mon, 15 Apr 2024 08:22:22 +0000 (10:22 +0200)
commit29b83a64df3b42c88c0338696feb6fdcd7f1f3b7
tree50d57a01bbbaa8fa2a4f3ad0855c41e840f4fd6e
parenta1b7508cef6208ad06377d2aa05b0f89f7d6b516
MIPS: Octeon: Add PCIe link status check

The standard PCIe configuration read-write interface is used to
access the configuration space of the peripheral PCIe devices
of the mips processor after the PCIe link surprise down, it can
generate kernel panic caused by "Data bus error". So it is
necessary to add PCIe link status check for system protection.
When the PCIe link is down or in training, assigning a value
of 0 to the configuration address can prevent read-write behavior
to the configuration space of peripheral PCIe devices, thereby
preventing kernel panic.

Signed-off-by: Songyang Li <leesongyang@outlook.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/pci/pcie-octeon.c [changed mode: 0644->0755]