aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/acpiphp_glue.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-11-14 00:02:00 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-14 00:02:00 -0500
commit2f466d33f5f60542d3d82c0477de5863b22c94b9 (patch)
tree839972958941d55852a9af270b04af09e3147116 /drivers/pci/hotplug/acpiphp_glue.c
parentf9300eaaac1ca300083ad41937923a90cc3a2394 (diff)
parenteaaeb1cb33310dea6c3fa45d8bfc63e5a1d0a846 (diff)
Merge tag 'pci-v3.13-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
Pull PCI changes from Bjorn Helgaas: "Resource management - Fix host bridge window coalescing (Alexey Neyman) - Pass type, width, and prefetchability for window alignment (Wei Yang) PCI device hotplug - Convert acpiphp, acpiphp_ibm to dynamic debug (Lan Tianyu) Power management - Remove pci_pm_complete() (Liu Chuansheng) MSI - Fail initialization if device is not in PCI_D0 (Yijing Wang) MPS (Max Payload Size) - Use pcie_get_mps() and pcie_set_mps() to simplify code (Yijing Wang) - Use pcie_set_readrq() to simplify code (Yijing Wang) - Use cached pci_dev->pcie_mpss to simplify code (Yijing Wang) SR-IOV - Enable upstream bridges even for VFs on virtual buses (Bjorn Helgaas) - Use pci_is_root_bus() to avoid catching virtual buses (Wei Yang) Virtualization - Add x86 MSI masking ops (Konrad Rzeszutek Wilk) Freescale i.MX6 - Support i.MX6 PCIe controller (Sean Cross) - Increase link startup timeout (Marek Vasut) - Probe PCIe in fs_initcall() (Marek Vasut) - Fix imprecise abort handler (Tim Harvey) - Remove redundant of_match_ptr (Sachin Kamat) Renesas R-Car - Support Gen2 internal PCIe controller (Valentine Barshak) Samsung Exynos - Add MSI support (Jingoo Han) - Turn off power when link fails (Jingoo Han) - Add Jingoo Han as maintainer (Jingoo Han) - Add clk_disable_unprepare() on error path (Wei Yongjun) - Remove redundant of_match_ptr (Sachin Kamat) Synopsys DesignWare - Add irq_create_mapping() (Pratyush Anand) - Add header guards (Seungwon Jeon) Miscellaneous - Enable native PCIe services by default on non-ACPI (Andrew Murray) - Cleanup _OSC usage and messages (Bjorn Helgaas) - Remove pcibios_last_bus boot option on non-x86 (Bjorn Helgaas) - Convert bus code to use bus_, drv_, and dev_groups (Greg Kroah-Hartman) - Remove unused pci_mem_start (Myron Stowe) - Make sysfs functions static (Sachin Kamat) - Warn on invalid return from driver probe (Stephen M. Cameron) - Remove Intel Haswell D3 delays (Todd E Brandt) - Call pci_set_master() in core if driver doesn't do it (Yinghai Lu) - Use pci_is_pcie() to simplify code (Yijing Wang) - Use PCIe capability accessors to simplify code (Yijing Wang) - Use cached pci_dev->pcie_cap to simplify code (Yijing Wang) - Removed unused "is_pcie" from struct pci_dev (Yijing Wang) - Simplify sysfs CPU affinity implementation (Yijing Wang)" * tag 'pci-v3.13-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (79 commits) PCI: Enable upstream bridges even for VFs on virtual buses PCI: Add pci_upstream_bridge() PCI: Add x86_msi.msi_mask_irq() and msix_mask_irq() PCI: Warn on driver probe return value greater than zero PCI: Drop warning about drivers that don't use pci_set_master() PCI: Workaround missing pci_set_master in pci drivers powerpc/pci: Use pci_is_pcie() to simplify code [fix] PCI: Update pcie_ports 'auto' behavior for non-ACPI platforms PCI: imx6: Probe the PCIe in fs_initcall() PCI: Add R-Car Gen2 internal PCI support PCI: imx6: Remove redundant of_match_ptr PCI: Report pci_pme_active() kmalloc failure mn10300/PCI: Remove useless pcibios_last_bus frv/PCI: Remove pcibios_last_bus PCI: imx6: Increase link startup timeout PCI: exynos: Remove redundant of_match_ptr PCI: imx6: Fix imprecise abort handler PCI: Fail MSI/MSI-X initialization if device is not in PCI_D0 PCI: imx6: Remove redundant dev_err() in imx6_pcie_probe() x86/PCI: Coalesce multiple overlapping host bridge windows ...
Diffstat (limited to 'drivers/pci/hotplug/acpiphp_glue.c')
-rw-r--r--drivers/pci/hotplug/acpiphp_glue.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c
index 4a0a9ac7a1e5..5b4e9eb0e8ff 100644
--- a/drivers/pci/hotplug/acpiphp_glue.c
+++ b/drivers/pci/hotplug/acpiphp_glue.c
@@ -39,6 +39,8 @@
39 * bus. It loses the refcount when the the driver unloads. 39 * bus. It loses the refcount when the the driver unloads.
40 */ 40 */
41 41
42#define pr_fmt(fmt) "acpiphp_glue: " fmt
43
42#include <linux/init.h> 44#include <linux/init.h>
43#include <linux/module.h> 45#include <linux/module.h>
44 46
@@ -58,8 +60,6 @@ static LIST_HEAD(bridge_list);
58static DEFINE_MUTEX(bridge_mutex); 60static DEFINE_MUTEX(bridge_mutex);
59static DEFINE_MUTEX(acpiphp_context_lock); 61static DEFINE_MUTEX(acpiphp_context_lock);
60 62
61#define MY_NAME "acpiphp_glue"
62
63static void handle_hotplug_event(acpi_handle handle, u32 type, void *data); 63static void handle_hotplug_event(acpi_handle handle, u32 type, void *data);
64static void acpiphp_sanitize_bus(struct pci_bus *bus); 64static void acpiphp_sanitize_bus(struct pci_bus *bus);
65static void acpiphp_set_hpp_values(struct pci_bus *bus); 65static void acpiphp_set_hpp_values(struct pci_bus *bus);
@@ -335,7 +335,7 @@ static acpi_status register_slot(acpi_handle handle, u32 lvl, void *data,
335 if (ACPI_FAILURE(status)) 335 if (ACPI_FAILURE(status))
336 sun = bridge->nr_slots; 336 sun = bridge->nr_slots;
337 337
338 dbg("found ACPI PCI Hotplug slot %llu at PCI %04x:%02x:%02x\n", 338 pr_debug("found ACPI PCI Hotplug slot %llu at PCI %04x:%02x:%02x\n",
339 sun, pci_domain_nr(pbus), pbus->number, device); 339 sun, pci_domain_nr(pbus), pbus->number, device);
340 340
341 retval = acpiphp_register_hotplug_slot(slot, sun); 341 retval = acpiphp_register_hotplug_slot(slot, sun);
@@ -343,10 +343,10 @@ static acpi_status register_slot(acpi_handle handle, u32 lvl, void *data,
343 slot->slot = NULL; 343 slot->slot = NULL;
344 bridge->nr_slots--; 344 bridge->nr_slots--;
345 if (retval == -EBUSY) 345 if (retval == -EBUSY)
346 warn("Slot %llu already registered by another " 346 pr_warn("Slot %llu already registered by another "
347 "hotplug driver\n", sun); 347 "hotplug driver\n", sun);
348 else 348 else
349 warn("acpiphp_register_hotplug_slot failed " 349 pr_warn("acpiphp_register_hotplug_slot failed "
350 "(err code = 0x%x)\n", retval); 350 "(err code = 0x%x)\n", retval);
351 } 351 }
352 /* Even if the slot registration fails, we can still use it. */ 352 /* Even if the slot registration fails, we can still use it. */
@@ -369,7 +369,7 @@ static acpi_status register_slot(acpi_handle handle, u32 lvl, void *data,
369 if (register_hotplug_dock_device(handle, 369 if (register_hotplug_dock_device(handle,
370 &acpiphp_dock_ops, context, 370 &acpiphp_dock_ops, context,
371 acpiphp_dock_init, acpiphp_dock_release)) 371 acpiphp_dock_init, acpiphp_dock_release))
372 dbg("failed to register dock device\n"); 372 pr_debug("failed to register dock device\n");
373 } 373 }
374 374
375 /* install notify handler */ 375 /* install notify handler */
@@ -427,7 +427,7 @@ static void cleanup_bridge(struct acpiphp_bridge *bridge)
427 ACPI_SYSTEM_NOTIFY, 427 ACPI_SYSTEM_NOTIFY,
428 handle_hotplug_event); 428 handle_hotplug_event);
429 if (ACPI_FAILURE(status)) 429 if (ACPI_FAILURE(status))
430 err("failed to remove notify handler\n"); 430 pr_err("failed to remove notify handler\n");
431 } 431 }
432 } 432 }
433 if (slot->slot) 433 if (slot->slot)
@@ -826,8 +826,9 @@ static void hotplug_event(acpi_handle handle, u32 type, void *data)
826 switch (type) { 826 switch (type) {
827 case ACPI_NOTIFY_BUS_CHECK: 827 case ACPI_NOTIFY_BUS_CHECK:
828 /* bus re-enumerate */ 828 /* bus re-enumerate */
829 dbg("%s: Bus check notify on %s\n", __func__, objname); 829 pr_debug("%s: Bus check notify on %s\n", __func__, objname);
830 dbg("%s: re-enumerating slots under %s\n", __func__, objname); 830 pr_debug("%s: re-enumerating slots under %s\n",
831 __func__, objname);
831 if (bridge) { 832 if (bridge) {
832 acpiphp_check_bridge(bridge); 833 acpiphp_check_bridge(bridge);
833 } else { 834 } else {
@@ -841,7 +842,7 @@ static void hotplug_event(acpi_handle handle, u32 type, void *data)
841 842
842 case ACPI_NOTIFY_DEVICE_CHECK: 843 case ACPI_NOTIFY_DEVICE_CHECK:
843 /* device check */ 844 /* device check */
844 dbg("%s: Device check notify on %s\n", __func__, objname); 845 pr_debug("%s: Device check notify on %s\n", __func__, objname);
845 if (bridge) { 846 if (bridge) {
846 acpiphp_check_bridge(bridge); 847 acpiphp_check_bridge(bridge);
847 } else { 848 } else {
@@ -862,7 +863,7 @@ static void hotplug_event(acpi_handle handle, u32 type, void *data)
862 863
863 case ACPI_NOTIFY_EJECT_REQUEST: 864 case ACPI_NOTIFY_EJECT_REQUEST:
864 /* request device eject */ 865 /* request device eject */
865 dbg("%s: Device eject notify on %s\n", __func__, objname); 866 pr_debug("%s: Device eject notify on %s\n", __func__, objname);
866 acpiphp_disable_and_eject_slot(func->slot); 867 acpiphp_disable_and_eject_slot(func->slot);
867 break; 868 break;
868 } 869 }