diff options
-rw-r--r-- | arch/powerpc/platforms/pseries/eeh_cache.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/powerpc/platforms/pseries/eeh_cache.c b/arch/powerpc/platforms/pseries/eeh_cache.c index e49c815eae2..1e83fcd0df3 100644 --- a/arch/powerpc/platforms/pseries/eeh_cache.c +++ b/arch/powerpc/platforms/pseries/eeh_cache.c | |||
@@ -225,6 +225,10 @@ void pci_addr_cache_insert_device(struct pci_dev *dev) | |||
225 | { | 225 | { |
226 | unsigned long flags; | 226 | unsigned long flags; |
227 | 227 | ||
228 | /* Ignore PCI bridges */ | ||
229 | if ((dev->class >> 16) == PCI_BASE_CLASS_BRIDGE) | ||
230 | return; | ||
231 | |||
228 | spin_lock_irqsave(&pci_io_addr_cache_root.piar_lock, flags); | 232 | spin_lock_irqsave(&pci_io_addr_cache_root.piar_lock, flags); |
229 | __pci_addr_cache_insert_device(dev); | 233 | __pci_addr_cache_insert_device(dev); |
230 | spin_unlock_irqrestore(&pci_io_addr_cache_root.piar_lock, flags); | 234 | spin_unlock_irqrestore(&pci_io_addr_cache_root.piar_lock, flags); |
@@ -285,16 +289,13 @@ void __init pci_addr_cache_build(void) | |||
285 | spin_lock_init(&pci_io_addr_cache_root.piar_lock); | 289 | spin_lock_init(&pci_io_addr_cache_root.piar_lock); |
286 | 290 | ||
287 | while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { | 291 | while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { |
288 | /* Ignore PCI bridges */ | ||
289 | if ((dev->class >> 16) == PCI_BASE_CLASS_BRIDGE) | ||
290 | continue; | ||
291 | 292 | ||
292 | pci_addr_cache_insert_device(dev); | 293 | pci_addr_cache_insert_device(dev); |
293 | 294 | ||
294 | dn = pci_device_to_OF_node(dev); | 295 | dn = pci_device_to_OF_node(dev); |
295 | if (!dn) | 296 | if (!dn) |
296 | continue; | 297 | continue; |
297 | pci_dev_get (dev); /* matching put is in eeh_remove_device() */ | 298 | pci_dev_get(dev); /* matching put is in eeh_remove_device() */ |
298 | PCI_DN(dn)->pcidev = dev; | 299 | PCI_DN(dn)->pcidev = dev; |
299 | 300 | ||
300 | eeh_sysfs_add_device(dev); | 301 | eeh_sysfs_add_device(dev); |