Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 17149
b: refs/heads/master
c: e2a296e
h: refs/heads/master
i:
  17147: b5784f7
v: v3
  • Loading branch information
Linas Vepstas authored and Paul Mackerras committed Jan 9, 2006
1 parent 96e5ff6 commit 53c3745
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 74761bb53df1e2d603937b6abbd8437b03840e38
refs/heads/master: e2a296eeaa344450196e910a136ab14119d7ae48
26 changes: 26 additions & 0 deletions trunk/arch/powerpc/platforms/pseries/eeh.c
Original file line number Diff line number Diff line change
Expand Up @@ -1093,6 +1093,15 @@ void eeh_add_device_early(struct device_node *dn)
}
EXPORT_SYMBOL_GPL(eeh_add_device_early);

void eeh_add_device_tree_early(struct device_node *dn)
{
struct device_node *sib;
for (sib = dn->child; sib; sib = sib->sibling)
eeh_add_device_tree_early(sib);
eeh_add_device_early(dn);
}
EXPORT_SYMBOL_GPL(eeh_add_device_tree_early);

/**
* eeh_add_device_late - perform EEH initialization for the indicated pci device
* @dev: pci device for which to set up EEH
Expand Down Expand Up @@ -1147,6 +1156,23 @@ void eeh_remove_device(struct pci_dev *dev)
}
EXPORT_SYMBOL_GPL(eeh_remove_device);

void eeh_remove_bus_device(struct pci_dev *dev)
{
eeh_remove_device(dev);
if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) {
struct pci_bus *bus = dev->subordinate;
struct list_head *ln;
if (!bus)
return;
for (ln = bus->devices.next; ln != &bus->devices; ln = ln->next) {
struct pci_dev *pdev = pci_dev_b(ln);
if (pdev)
eeh_remove_bus_device(pdev);
}
}
}
EXPORT_SYMBOL_GPL(eeh_remove_bus_device);

static int proc_eeh_show(struct seq_file *m, void *v)
{
unsigned int cpu;
Expand Down
10 changes: 10 additions & 0 deletions trunk/include/asm-powerpc/eeh.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ void __init pci_addr_cache_build(void);
* to finish the eeh setup for this device.
*/
void eeh_add_device_early(struct device_node *);
void eeh_add_device_tree_early(struct device_node *);
void eeh_add_device_late(struct pci_dev *);

/**
Expand All @@ -71,6 +72,15 @@ void eeh_add_device_late(struct pci_dev *);
*/
void eeh_remove_device(struct pci_dev *);

/**
* eeh_remove_device_recursive - undo EEH for device & children.
* @dev: pci device to be removed
*
* As above, this removes the device; it also removes child
* pci devices as well.
*/
void eeh_remove_bus_device(struct pci_dev *);

/**
* EEH_POSSIBLE_ERROR() -- test for possible MMIO failure.
*
Expand Down

0 comments on commit 53c3745

Please sign in to comment.