Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/eeh: Force reset on fenced PHB

On fenced PHB, the error handlers in the drivers of its subordinate
devices could return PCI_ERS_RESULT_CAN_RECOVER, indicating no reset
will be issued during the recovery. It's conflicting with the fact
that fenced PHB won't be recovered without reset.

This limits the return value from the error handlers in the drivers
of the fenced PHB's subordinate devices to PCI_ERS_RESULT_NEED_NONE
or PCI_ERS_RESULT_NEED_RESET, to ensure reset will be issued during
recovery.

Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Reviewed-by: Daniel Axtens <dja@axtens.net>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

authored by

Gavin Shan and committed by
Michael Ellerman
8234fced f2da4ccf

+8
+8
arch/powerpc/kernel/eeh_driver.c
··· 664 664 * to accomplish the reset. Each child gets a report of the 665 665 * status ... if any child can't handle the reset, then the entire 666 666 * slot is dlpar removed and added. 667 + * 668 + * When the PHB is fenced, we have to issue a reset to recover from 669 + * the error. Override the result if necessary to have partially 670 + * hotplug for this case. 667 671 */ 668 672 pr_info("EEH: Notify device drivers to shutdown\n"); 669 673 eeh_pe_dev_traverse(pe, eeh_report_error, &result); 674 + if ((pe->type & EEH_PE_PHB) && 675 + result != PCI_ERS_RESULT_NONE && 676 + result != PCI_ERS_RESULT_NEED_RESET) 677 + result = PCI_ERS_RESULT_NEED_RESET; 670 678 671 679 /* Get the current PCI slot state. This can take a long time, 672 680 * sometimes over 300 seconds for certain systems.