Commit b59f07cf authored by Linda Xie's avatar Linda Xie Committed by Deepak Saxena

[PATCH] PCI Hotplug: rpaphp: set eeh option (enabled ) prior to any i/o to newly added IOA

Attached patch fix the problem I have found during DLPAR I/O slots
testing on our new hardware.  rpaphp needs to set eeh-option(eanbled)
for newly added IOA prior to performing PCI config(pci_setup_device),
otherwise the pci_dev of the IOA will have invalid base address
information.

Linas Vepstas impleted eeh changes.
parent 07608e1e
...@@ -175,6 +175,7 @@ static void rpaphp_fixup_new_pci_devices(struct pci_bus *bus) ...@@ -175,6 +175,7 @@ static void rpaphp_fixup_new_pci_devices(struct pci_bus *bus)
pci_read_irq_line(dev); pci_read_irq_line(dev);
for (i = 0; i < PCI_NUM_RESOURCES; i++) { for (i = 0; i < PCI_NUM_RESOURCES; i++) {
struct resource *r = &dev->resource[i]; struct resource *r = &dev->resource[i];
if (r->parent || !r->start || !r->flags) if (r->parent || !r->start || !r->flags)
continue; continue;
rpaphp_claim_resource(dev, i); rpaphp_claim_resource(dev, i);
...@@ -256,8 +257,9 @@ static struct pci_dev *rpaphp_config_pci_adapter(struct slot *slot) ...@@ -256,8 +257,9 @@ static struct pci_dev *rpaphp_config_pci_adapter(struct slot *slot)
goto exit; goto exit;
} }
eeh_add_device_early(slot->dn->child);
dev = rpaphp_pci_config_dn(slot->dn, pci_bus); dev = rpaphp_pci_config_dn(slot->dn, pci_bus);
eeh_add_device(dev); eeh_add_device_late(dev);
} else { } else {
/* slot is not enabled */ /* slot is not enabled */
err("slot doesn't have pci_dev structure\n"); err("slot doesn't have pci_dev structure\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment