From: Gavin Shan Date: Wed, 5 Jun 2013 07:34:02 +0000 (+0800) Subject: powerpc/eeh: Fix fetching bus for single-dev-PE X-Git-Tag: v3.9.9~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ba94200678873543591a50a5de36811ca99131aa;p=thirdparty%2Fkernel%2Fstable.git powerpc/eeh: Fix fetching bus for single-dev-PE commit ea461abf61753b4b79e625a7c20650105b990f21 upstream. While running Linux as guest on top of phyp, we possiblly have PE that includes single PCI device. However, we didn't return its PCI bus correctly and it leads to failure on recovery from EEH errors for single-dev-PE. The patch fixes the issue. Signed-off-by: Gavin Shan Cc: Steve Best Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Greg Kroah-Hartman --- diff --git a/arch/powerpc/platforms/pseries/eeh_pe.c b/arch/powerpc/platforms/pseries/eeh_pe.c index fe43d1aa2cf1c..9d4a9e8562b22 100644 --- a/arch/powerpc/platforms/pseries/eeh_pe.c +++ b/arch/powerpc/platforms/pseries/eeh_pe.c @@ -639,7 +639,8 @@ struct pci_bus *eeh_pe_bus_get(struct eeh_pe *pe) if (pe->type & EEH_PE_PHB) { bus = pe->phb->bus; - } else if (pe->type & EEH_PE_BUS) { + } else if (pe->type & EEH_PE_BUS || + pe->type & EEH_PE_DEVICE) { edev = list_first_entry(&pe->edevs, struct eeh_dev, list); pdev = eeh_dev_to_pci_dev(edev); if (pdev)