@@ -768,9 +768,16 @@ static int pnv_pci_read_config(struct pci_bus *bus,
*val = 0xFFFFFFFF;
pdn = pci_get_pdn_by_devfn(bus, devfn);
- if (!pdn)
- return pnv_pci_cfg_read_raw(phb->opal_id, bus->number, devfn,
- where, size, val);
+ if (!pdn) {
+ ret = pnv_pci_cfg_read_raw(phb->opal_id, bus->number, devfn,
+ where, size, val);
+
+ if (!ret && (*val == EEH_IO_ERROR_VALUE(size)) && phb->unfreeze_pe)
+ phb->unfreeze_pe(phb, phb->ioda.reserved_pe_idx,
+ OPAL_EEH_ACTION_CLEAR_FREEZE_ALL);
+
+ return ret;
+ }
if (!pnv_pci_cfg_check(pdn))
return PCIBIOS_DEVICE_NOT_FOUND;
Reading an empty slot returns all ones, which triggers a false EEH error event on PowerNV. A rescan is performed after all the PEs have been unmapped, so the reserved PE index is used for unfreezing. CC: Oliver O'Halloran <oohall@gmail.com> CC: Sam Bobroff <sbobroff@linux.ibm.com> Signed-off-by: Sergey Miroshnichenko <s.miroshnichenko@yadro.com> --- arch/powerpc/platforms/powernv/pci.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)