• Gavin Shan's avatar
    powerpc/eeh: Introduce EEH_PE_INVALID type PE · 5efc3ad7
    Gavin Shan authored
    When EEH error happens on the PE whose PCI devices don't have
    attached drivers. In function eeh_handle_event(), the default
    value PCI_ERS_RESULT_NONE will be returned after iterating all
    drivers of those PCI devices belonging to the PE. Actually, we
    don't have installed drivers for the PCI devices. Under the
    circumstance, we will remove the corresponding PCI bus of the PE,
    including the associated EEH devices and PE instance. However,
    we still need the information stored in the PE instance to do PE
    reset after that. So it's unsafe to free the PE instance.
    
    The patch introduces EEH_PE_INVALID type PE to address the issue.
    When the PCI bus and the corresponding attached EEH devices are
    removed, we will mark the PE as EEH_PE_INVALID. At later point,
    the PE will be changed to EEH_PE_DEVICE or EEH_PE_BUS when the
    corresponding EEH devices are attached again.
    Signed-off-by: default avatarGavin Shan <shangw@linux.vnet.ibm.com>
    Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
    5efc3ad7
eeh_pe.c 15 KB