]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
powerpc/eeh: Fix invalid cached PE primary bus
authorGavin Shan <gwshan@linux.vnet.ibm.com>
Tue, 19 Jul 2016 02:27:41 +0000 (20:27 -0600)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 9 Aug 2016 13:07:35 +0000 (15:07 +0200)
commit59ae8c6d5b4595997419c9a0c74ec050833f88b2
treed1a36a42434f135deb37e344f91892d85a9934bd
parentb169dfdd0bebb8b419bfe836a13ec579e9a70bd4
powerpc/eeh: Fix invalid cached PE primary bus

BugLink: http://bugs.launchpad.net/bugs/1603449
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 <05ba75f84864> ("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: 67086e32b564 ("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>
(backported from commit a3aa256b7258b3d19f8b44557cc64525a993b941)
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Brad Figg <brad.figg@canonical.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
arch/powerpc/kernel/eeh_driver.c