From: Linus Torvalds Date: Wed, 3 Jul 2013 23:31:35 +0000 (-0700) Subject: Merge tag 'pci-v3.11-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaa... X-Git-Tag: omap-for-v3.11/fixes-for-merge-window~18 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=862f0012549110d6f2586bf54b52ed4540cbff3a;p=pandora-kernel.git Merge tag 'pci-v3.11-changes' of git://git./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 ... --- 862f0012549110d6f2586bf54b52ed4540cbff3a diff --cc MAINTAINERS index 6d9578131c31,ce6555036d67..f4c2bc73fd24 --- a/MAINTAINERS +++ b/MAINTAINERS @@@ -242,8 -242,9 +242,11 @@@ F: drivers/acpi F: drivers/pnp/pnpacpi/ F: include/linux/acpi.h F: include/acpi/ +F: Documentation/acpi +F: Documentation/ABI/testing/sysfs-bus-acpi + F: drivers/pci/*acpi* + F: drivers/pci/*/*acpi* + F: drivers/pci/*/*/*acpi* ACPI FAN DRIVER M: Zhang Rui diff --cc arch/ia64/sn/kernel/io_init.c index 2b00adedc45e,e2c7733e18a7..0b5ce82d203d --- a/arch/ia64/sn/kernel/io_init.c +++ b/arch/ia64/sn/kernel/io_init.c @@@ -258,27 -316,17 +258,20 @@@ sn_pci_controller_fixup(int segment, in */ controller->platform_data = prom_bussoft_ptr; - sn_legacy_pci_window_fixup(controller, - prom_bussoft_ptr->bs_legacy_io, - prom_bussoft_ptr->bs_legacy_mem); - for (i = 0; i < controller->windows; i++) - pci_add_resource_offset(&resources, - &controller->window[i].resource, - controller->window[i].offset); + sn_legacy_pci_window_fixup(res, + prom_bussoft_ptr->bs_legacy_io, + prom_bussoft_ptr->bs_legacy_mem); + pci_add_resource_offset(&resources, &res[0], + prom_bussoft_ptr->bs_legacy_io); + pci_add_resource_offset(&resources, &res[1], + prom_bussoft_ptr->bs_legacy_mem); + bus = pci_scan_root_bus(NULL, busnum, &pci_root_ops, controller, &resources); -- if (bus == NULL) - goto error_return; /* error, or bus already scanned */ - - bus->sysdata = controller; - - return; - - error_return: - kfree(res); - kfree(controller); - return; ++ if (bus == NULL) { ++ kfree(res); + kfree(controller); ++ } } /* diff --cc drivers/acpi/apei/ghes.c index fcd7d91cec34,ab315515908e..ec9b57d428a1 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c @@@ -452,11 -453,18 +453,20 @@@ static void ghes_do_proc(struct ghes *g devfn = PCI_DEVFN(pcie_err->device_id.device, pcie_err->device_id.function); aer_severity = cper_severity_to_aer(sev); + + /* + * If firmware reset the component to contain + * the error, we must reinitialize it before + * use, so treat it as a fatal AER error. + */ + if (gdata->flags & CPER_SEC_RESET) + aer_severity = AER_FATAL; + aer_recover_queue(pcie_err->device_id.segment, pcie_err->device_id.bus, - devfn, aer_severity); + devfn, aer_severity, + (struct aer_capability_regs *) + pcie_err->aer_info); } } diff --cc drivers/acpi/pci_root.c index e427dc516c76,122b4dc7b0fa..5917839321b8 --- a/drivers/acpi/pci_root.c +++ b/drivers/acpi/pci_root.c @@@ -639,11 -620,9 +620,11 @@@ static void _handle_hotplug_event_root( switch (type) { case ACPI_NOTIFY_BUS_CHECK: /* bus enumerate */ - printk(KERN_DEBUG "%s: Bus check notify on %s\n", __func__, - (char *)buffer.pointer); + acpi_handle_printk(KERN_DEBUG, handle, + "Bus check notify on %s\n", __func__); - if (!root) + if (root) + acpiphp_check_host_bridge(handle); + else handle_root_bridge_insertion(handle); break; diff --cc include/linux/aer.h index 737f90ab4b62,55bb3dc4b2db..4dbaa7081530 --- a/include/linux/aer.h +++ b/include/linux/aer.h @@@ -49,11 -53,10 +53,11 @@@ static inline int pci_cleanup_aer_uncor } #endif - extern void cper_print_aer(struct pci_dev *dev, - int cper_severity, struct aer_capability_regs *aer); - extern int cper_severity_to_aer(int cper_severity); - extern void aer_recover_queue(int domain, unsigned int bus, unsigned int devfn, - int severity, - struct aer_capability_regs *aer_regs); -void cper_print_aer(const char *prefix, struct pci_dev *dev, int cper_severity, ++void cper_print_aer(struct pci_dev *dev, int cper_severity, + struct aer_capability_regs *aer); + int cper_severity_to_aer(int cper_severity); + void aer_recover_queue(int domain, unsigned int bus, unsigned int devfn, - int severity); ++ int severity, ++ struct aer_capability_regs *aer_regs); #endif //_AER_H_