powerpc/powernv: Rework EEH reset
authorGavin Shan <shangw@linux.vnet.ibm.com>
Wed, 12 Feb 2014 07:24:54 +0000 (15:24 +0800)
committerJiri Slaby <jslaby@suse.cz>
Wed, 5 Mar 2014 16:13:41 +0000 (17:13 +0100)
commit16b360d6bc1b2fd7e97d6e7512f47d92325aa465
tree0f4e3620b97e6dfacd9de13573e03792ee9be877
parenta0dc9944ebd01a0b279e4bed299016e7ed1115e3
powerpc/powernv: Rework EEH reset

commit 5b2e198e50f6ba57081586b853163ea1bb95f1a8 upstream.

When doing reset in order to recover the affected PE, we issue
hot reset on PE primary bus if it's not root bus. Otherwise, we
issue hot or fundamental reset on root port or PHB accordingly.
For the later case, we didn't cover the situation where PE only
includes root port and it potentially causes kernel crash upon
EEH error to the PE.

The patch reworks the logic of EEH reset to improve the code
readability and also avoid the kernel crash.

Reported-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
arch/powerpc/platforms/powernv/eeh-ioda.c