aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-07-03 19:31:35 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-03 19:31:35 -0400
commit862f0012549110d6f2586bf54b52ed4540cbff3a (patch)
tree83d29a684b885b1f58af76e0cd29b8552fd480ea /arch
parentf991fae5c6d42dfc5029150b05a78cf3f6c18cc9 (diff)
parenta0f75f9d495b3905b4c658c1d813a127f558a350 (diff)
Merge tag 'pci-v3.11-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
Pull PCI changes from Bjorn Helgaas: "PCI device hotplug - Add pci_alloc_dev() interface (Gu Zheng) - Add pci_bus_get()/put() for reference counting (Jiang Liu) - Fix SR-IOV reference count issues (Jiang Liu) - Remove unused acpi_pci_roots list (Jiang Liu) MSI - Conserve interrupt resources on x86 (Alexander Gordeev) AER - Force fatal severity when component has been reset (Betty Dall) - Reset link below Root Port as well as Downstream Port (Betty Dall) - Fix "Firmware first" flag setting (Bjorn Helgaas) - Don't parse HEST for non-PCIe devices (Bjorn Helgaas) ASPM - Warn when we can't disable ASPM as driver requests (Bjorn Helgaas) Miscellaneous - Add CircuitCo PCI IDs (Darren Hart) - Add AMD CZ SATA and SMBus PCI IDs (Shane Huang) - Work around Ivytown NTB BAR size issue (Jon Mason) - Detect invalid initial BAR values (Kevin Hao) - Add pcibios_release_device() (Sebastian Ott) - Fix powerpc & sparc PCI_UNKNOWN power state usage (Bjorn Helgaas)" * tag 'pci-v3.11-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (51 commits) MAINTAINERS: Add ACPI folks for ACPI-related things under drivers/pci PCI: Add CircuitCo vendor ID and subsystem ID PCI: Use pdev->pm_cap instead of pci_find_capability(..,PCI_CAP_ID_PM) PCI: Return early on allocation failures to unindent mainline code PCI: Simplify IOV implementation and fix reference count races PCI: Drop redundant setting of bus->is_added in virtfn_add_bus() unicore32/PCI: Remove redundant call of pci_bus_add_devices() m68k/PCI: Remove redundant call of pci_bus_add_devices() PCI / ACPI / PM: Use correct power state strings in messages PCI: Fix comment typo for pcie_pme_remove() PCI: Rename pci_release_bus_bridge_dev() to pci_release_host_bridge_dev() PCI: Fix refcount issue in pci_create_root_bus() error recovery path ia64/PCI: Clean up pci_scan_root_bus() usage PCI/AER: Reset link for devices below Root Port or Downstream Port ACPI / APEI: Force fatal AER severity when component has been reset PCI/AER: Remove "extern" from function declarations PCI/AER: Move AER severity defines to aer.h PCI/AER: Set dev->__aer_firmware_first only for matching devices PCI/AER: Factor out HEST device type matching PCI/AER: Don't parse HEST table for non-PCIe devices ...
Diffstat (limited to 'arch')
-rw-r--r--arch/ia64/sn/kernel/io_init.c15
-rw-r--r--arch/m68k/platform/coldfire/pci.c1
-rw-r--r--arch/powerpc/kernel/pci_of_scan.c5
-rw-r--r--arch/sparc/kernel/pci.c5
-rw-r--r--arch/unicore32/kernel/pci.c5
-rw-r--r--arch/x86/pci/acpi.c7
6 files changed, 10 insertions, 28 deletions
diff --git a/arch/ia64/sn/kernel/io_init.c b/arch/ia64/sn/kernel/io_init.c
index 2b00adedc45e..0b5ce82d203d 100644
--- a/arch/ia64/sn/kernel/io_init.c
+++ b/arch/ia64/sn/kernel/io_init.c
@@ -268,17 +268,10 @@ sn_pci_controller_fixup(int segment, int busnum, struct pci_bus *bus)
268 268
269 bus = pci_scan_root_bus(NULL, busnum, &pci_root_ops, controller, 269 bus = pci_scan_root_bus(NULL, busnum, &pci_root_ops, controller,
270 &resources); 270 &resources);
271 if (bus == NULL) 271 if (bus == NULL) {
272 goto error_return; /* error, or bus already scanned */ 272 kfree(res);
273 273 kfree(controller);
274 bus->sysdata = controller; 274 }
275
276 return;
277
278error_return:
279 kfree(res);
280 kfree(controller);
281 return;
282} 275}
283 276
284/* 277/*
diff --git a/arch/m68k/platform/coldfire/pci.c b/arch/m68k/platform/coldfire/pci.c
index 8572246db84d..b33f97a13e6d 100644
--- a/arch/m68k/platform/coldfire/pci.c
+++ b/arch/m68k/platform/coldfire/pci.c
@@ -320,7 +320,6 @@ static int __init mcf_pci_init(void)
320 pci_bus_size_bridges(rootbus); 320 pci_bus_size_bridges(rootbus);
321 pci_bus_assign_resources(rootbus); 321 pci_bus_assign_resources(rootbus);
322 pci_enable_bridges(rootbus); 322 pci_enable_bridges(rootbus);
323 pci_bus_add_devices(rootbus);
324 return 0; 323 return 0;
325} 324}
326 325
diff --git a/arch/powerpc/kernel/pci_of_scan.c b/arch/powerpc/kernel/pci_of_scan.c
index 2a67e9baa59f..6b0ba5854d99 100644
--- a/arch/powerpc/kernel/pci_of_scan.c
+++ b/arch/powerpc/kernel/pci_of_scan.c
@@ -128,7 +128,7 @@ struct pci_dev *of_create_pci_dev(struct device_node *node,
128 const char *type; 128 const char *type;
129 struct pci_slot *slot; 129 struct pci_slot *slot;
130 130
131 dev = alloc_pci_dev(); 131 dev = pci_alloc_dev(bus);
132 if (!dev) 132 if (!dev)
133 return NULL; 133 return NULL;
134 type = of_get_property(node, "device_type", NULL); 134 type = of_get_property(node, "device_type", NULL);
@@ -137,7 +137,6 @@ struct pci_dev *of_create_pci_dev(struct device_node *node,
137 137
138 pr_debug(" create device, devfn: %x, type: %s\n", devfn, type); 138 pr_debug(" create device, devfn: %x, type: %s\n", devfn, type);
139 139
140 dev->bus = bus;
141 dev->dev.of_node = of_node_get(node); 140 dev->dev.of_node = of_node_get(node);
142 dev->dev.parent = bus->bridge; 141 dev->dev.parent = bus->bridge;
143 dev->dev.bus = &pci_bus_type; 142 dev->dev.bus = &pci_bus_type;
@@ -165,7 +164,7 @@ struct pci_dev *of_create_pci_dev(struct device_node *node,
165 pr_debug(" class: 0x%x\n", dev->class); 164 pr_debug(" class: 0x%x\n", dev->class);
166 pr_debug(" revision: 0x%x\n", dev->revision); 165 pr_debug(" revision: 0x%x\n", dev->revision);
167 166
168 dev->current_state = 4; /* unknown power state */ 167 dev->current_state = PCI_UNKNOWN; /* unknown power state */
169 dev->error_state = pci_channel_io_normal; 168 dev->error_state = pci_channel_io_normal;
170 dev->dma_mask = 0xffffffff; 169 dev->dma_mask = 0xffffffff;
171 170
diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c
index 2031c65fd4ea..bc4d3f5d2e5d 100644
--- a/arch/sparc/kernel/pci.c
+++ b/arch/sparc/kernel/pci.c
@@ -254,7 +254,7 @@ static struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm,
254 const char *type; 254 const char *type;
255 u32 class; 255 u32 class;
256 256
257 dev = alloc_pci_dev(); 257 dev = pci_alloc_dev(bus);
258 if (!dev) 258 if (!dev)
259 return NULL; 259 return NULL;
260 260
@@ -281,7 +281,6 @@ static struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm,
281 printk(" create device, devfn: %x, type: %s\n", 281 printk(" create device, devfn: %x, type: %s\n",
282 devfn, type); 282 devfn, type);
283 283
284 dev->bus = bus;
285 dev->sysdata = node; 284 dev->sysdata = node;
286 dev->dev.parent = bus->bridge; 285 dev->dev.parent = bus->bridge;
287 dev->dev.bus = &pci_bus_type; 286 dev->dev.bus = &pci_bus_type;
@@ -327,7 +326,7 @@ static struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm,
327 if ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE) 326 if ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE)
328 pci_set_master(dev); 327 pci_set_master(dev);
329 328
330 dev->current_state = 4; /* unknown power state */ 329 dev->current_state = PCI_UNKNOWN; /* unknown power state */
331 dev->error_state = pci_channel_io_normal; 330 dev->error_state = pci_channel_io_normal;
332 dev->dma_mask = 0xffffffff; 331 dev->dma_mask = 0xffffffff;
333 332
diff --git a/arch/unicore32/kernel/pci.c b/arch/unicore32/kernel/pci.c
index ef69c0c82825..374a055a8e6b 100644
--- a/arch/unicore32/kernel/pci.c
+++ b/arch/unicore32/kernel/pci.c
@@ -277,11 +277,6 @@ static int __init pci_common_init(void)
277 pci_bus_assign_resources(puv3_bus); 277 pci_bus_assign_resources(puv3_bus);
278 } 278 }
279 279
280 /*
281 * Tell drivers about devices found.
282 */
283 pci_bus_add_devices(puv3_bus);
284
285 return 0; 280 return 0;
286} 281}
287subsys_initcall(pci_common_init); 282subsys_initcall(pci_common_init);
diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c
index 3e724256dbee..d641897a1f4e 100644
--- a/arch/x86/pci/acpi.c
+++ b/arch/x86/pci/acpi.c
@@ -324,14 +324,11 @@ setup_resource(struct acpi_resource *acpi_res, void *data)
324 res->start = start; 324 res->start = start;
325 res->end = end; 325 res->end = end;
326 info->res_offset[info->res_num] = addr.translation_offset; 326 info->res_offset[info->res_num] = addr.translation_offset;
327 info->res_num++;
327 328
328 if (!pci_use_crs) { 329 if (!pci_use_crs)
329 dev_printk(KERN_DEBUG, &info->bridge->dev, 330 dev_printk(KERN_DEBUG, &info->bridge->dev,
330 "host bridge window %pR (ignored)\n", res); 331 "host bridge window %pR (ignored)\n", res);
331 return AE_OK;
332 }
333
334 info->res_num++;
335 332
336 return AE_OK; 333 return AE_OK;
337} 334}