]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/eeh: Fix invalid cached PE primary bus
authorGavin Shan <gwshan@linux.vnet.ibm.com>
Fri, 17 Jun 2016 03:05:11 +0000 (13:05 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 17 Jun 2016 09:51:47 +0000 (19:51 +1000)
commit54f92ee29bd746cf8ab5bf4c26346149b67a7386
treee4041e60841311d7f5a5a3ac7d9fac34e1bc5080
parent2d0d35d70191e3da6f001d9f67ada3e1b1c84a1c
powerpc/eeh: Fix invalid cached PE primary bus

The PE primary bus cannot be got from its child devices when having
full hotplug in error recovery. The PE primary bus is cached, which
is done in commit <7c65d97d4641> ("powerpc/eeh: Fix stale cached primary
bus"). In eeh_reset_device(), the flag (EEH_PE_PRI_BUS) is cleared
before the PCI hot remove. eeh_pe_bus_get() then returns NULL as the
PE primary bus in pnv_eeh_reset() and it crashes the kernel eventually.

This fixes the issue by clearing the flag (EEH_PE_PRI_BUS) before the
PCI hot add. With it, the PowerNV EEH reset backend (pnv_eeh_reset())
can get valid PE primary bus through eeh_pe_bus_get().

Fixes: ed40cf2191a9 ("powerpc/eeh: powerpc/eeh: Support error recovery for VF PE")
Reported-by: Pridhiviraj Paidipeddi <ppaiddipe@in.ibm.com>
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/eeh_driver.c