|
@@ -788,7 +788,6 @@ static void eeh_add_device_late(struct pci_dev *dev)
|
|
|
dev->dev.archdata.edev = edev;
|
|
|
|
|
|
eeh_addr_cache_insert_dev(dev);
|
|
|
- eeh_sysfs_add_device(dev);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -814,6 +813,29 @@ void eeh_add_device_tree_late(struct pci_bus *bus)
|
|
|
}
|
|
|
EXPORT_SYMBOL_GPL(eeh_add_device_tree_late);
|
|
|
|
|
|
+/**
|
|
|
+ * eeh_add_sysfs_files - Add EEH sysfs files for the indicated PCI bus
|
|
|
+ * @bus: PCI bus
|
|
|
+ *
|
|
|
+ * This routine must be used to add EEH sysfs files for PCI
|
|
|
+ * devices which are attached to the indicated PCI bus. The PCI bus
|
|
|
+ * is added after system boot through hotplug or dlpar.
|
|
|
+ */
|
|
|
+void eeh_add_sysfs_files(struct pci_bus *bus)
|
|
|
+{
|
|
|
+ struct pci_dev *dev;
|
|
|
+
|
|
|
+ list_for_each_entry(dev, &bus->devices, bus_list) {
|
|
|
+ eeh_sysfs_add_device(dev);
|
|
|
+ if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) {
|
|
|
+ struct pci_bus *subbus = dev->subordinate;
|
|
|
+ if (subbus)
|
|
|
+ eeh_add_sysfs_files(subbus);
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+EXPORT_SYMBOL_GPL(eeh_add_sysfs_files);
|
|
|
+
|
|
|
/**
|
|
|
* eeh_remove_device - Undo EEH setup for the indicated pci device
|
|
|
* @dev: pci device to be removed
|