diff options
Diffstat (limited to 'arch/powerpc/platforms/powernv/eeh-ioda.c')
| -rw-r--r-- | arch/powerpc/platforms/powernv/eeh-ioda.c | 32 |
1 files changed, 6 insertions, 26 deletions
diff --git a/arch/powerpc/platforms/powernv/eeh-ioda.c b/arch/powerpc/platforms/powernv/eeh-ioda.c index e1e71618b70c..f51474336460 100644 --- a/arch/powerpc/platforms/powernv/eeh-ioda.c +++ b/arch/powerpc/platforms/powernv/eeh-ioda.c | |||
| @@ -44,7 +44,8 @@ static int ioda_eeh_event(struct notifier_block *nb, | |||
| 44 | 44 | ||
| 45 | /* We simply send special EEH event */ | 45 | /* We simply send special EEH event */ |
| 46 | if ((changed_evts & OPAL_EVENT_PCI_ERROR) && | 46 | if ((changed_evts & OPAL_EVENT_PCI_ERROR) && |
| 47 | (events & OPAL_EVENT_PCI_ERROR)) | 47 | (events & OPAL_EVENT_PCI_ERROR) && |
| 48 | eeh_enabled()) | ||
| 48 | eeh_send_failure_event(NULL); | 49 | eeh_send_failure_event(NULL); |
| 49 | 50 | ||
| 50 | return 0; | 51 | return 0; |
| @@ -489,8 +490,7 @@ static int ioda_eeh_bridge_reset(struct pci_controller *hose, | |||
| 489 | static int ioda_eeh_reset(struct eeh_pe *pe, int option) | 490 | static int ioda_eeh_reset(struct eeh_pe *pe, int option) |
| 490 | { | 491 | { |
| 491 | struct pci_controller *hose = pe->phb; | 492 | struct pci_controller *hose = pe->phb; |
| 492 | struct eeh_dev *edev; | 493 | struct pci_bus *bus; |
| 493 | struct pci_dev *dev; | ||
| 494 | int ret; | 494 | int ret; |
| 495 | 495 | ||
| 496 | /* | 496 | /* |
| @@ -519,31 +519,11 @@ static int ioda_eeh_reset(struct eeh_pe *pe, int option) | |||
| 519 | if (pe->type & EEH_PE_PHB) { | 519 | if (pe->type & EEH_PE_PHB) { |
| 520 | ret = ioda_eeh_phb_reset(hose, option); | 520 | ret = ioda_eeh_phb_reset(hose, option); |
| 521 | } else { | 521 | } else { |
| 522 | if (pe->type & EEH_PE_DEVICE) { | 522 | bus = eeh_pe_bus_get(pe); |
| 523 | /* | 523 | if (pci_is_root_bus(bus)) |
| 524 | * If it's device PE, we didn't refer to the parent | ||
| 525 | * PCI bus yet. So we have to figure it out indirectly. | ||
| 526 | */ | ||
| 527 | edev = list_first_entry(&pe->edevs, | ||
| 528 | struct eeh_dev, list); | ||
| 529 | dev = eeh_dev_to_pci_dev(edev); | ||
| 530 | dev = dev->bus->self; | ||
| 531 | } else { | ||
| 532 | /* | ||
| 533 | * If it's bus PE, the parent PCI bus is already there | ||
| 534 | * and just pick it up. | ||
| 535 | */ | ||
| 536 | dev = pe->bus->self; | ||
| 537 | } | ||
| 538 | |||
| 539 | /* | ||
| 540 | * Do reset based on the fact that the direct upstream bridge | ||
| 541 | * is root bridge (port) or not. | ||
| 542 | */ | ||
| 543 | if (dev->bus->number == 0) | ||
| 544 | ret = ioda_eeh_root_reset(hose, option); | 524 | ret = ioda_eeh_root_reset(hose, option); |
| 545 | else | 525 | else |
| 546 | ret = ioda_eeh_bridge_reset(hose, dev, option); | 526 | ret = ioda_eeh_bridge_reset(hose, bus->self, option); |
| 547 | } | 527 | } |
| 548 | 528 | ||
| 549 | return ret; | 529 | return ret; |
