stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "PCI: Propagate the "ignore hotplug" setting to parent" has been added to the 4.0-stable tree
@ 2015-07-17  3:14 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2015-07-17  3:14 UTC (permalink / raw)
  To: rafael.j.wysocki, bhelgaas, gregkh, tiagdtd-lava; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    PCI: Propagate the "ignore hotplug" setting to parent

to the 4.0-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     pci-propagate-the-ignore-hotplug-setting-to-parent.patch
and it can be found in the queue-4.0 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From 0824965140fff1bf640a987dc790d1594a8e0699 Mon Sep 17 00:00:00 2001
From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Date: Mon, 13 Apr 2015 16:23:36 +0200
Subject: PCI: Propagate the "ignore hotplug" setting to parent

From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>

commit 0824965140fff1bf640a987dc790d1594a8e0699 upstream.

Refine the mechanism introduced by commit f244d8b623da ("ACPIPHP / radeon /
nouveau: Fix VGA switcheroo problem related to hotplug") to propagate the
ignore_hotplug setting of the device to its parent bridge in case hotplug
notifications related to the graphics adapter switching are given for the
bridge rather than for the device itself (they need to be ignored in both
cases).

Link: https://bugzilla.kernel.org/show_bug.cgi?id=61891
Link: https://bugs.freedesktop.org/show_bug.cgi?id=88927
Fixes: b440bde74f04 ("PCI: Add pci_ignore_hotplug() to ignore hotplug events for a device")
Reported-and-tested-by: tiagdtd-lava <tiagdtd-lava@yahoo.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/pci/pci.c   |   11 +++++++++++
 include/linux/pci.h |    6 +-----
 2 files changed, 12 insertions(+), 5 deletions(-)

--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -4319,6 +4319,17 @@ bool pci_device_is_present(struct pci_de
 }
 EXPORT_SYMBOL_GPL(pci_device_is_present);
 
+void pci_ignore_hotplug(struct pci_dev *dev)
+{
+	struct pci_dev *bridge = dev->bus->self;
+
+	dev->ignore_hotplug = 1;
+	/* Propagate the "ignore hotplug" setting to the parent bridge. */
+	if (bridge)
+		bridge->ignore_hotplug = 1;
+}
+EXPORT_SYMBOL_GPL(pci_ignore_hotplug);
+
 #define RESOURCE_ALIGNMENT_PARAM_SIZE COMMAND_LINE_SIZE
 static char resource_alignment_param[RESOURCE_ALIGNMENT_PARAM_SIZE] = {0};
 static DEFINE_SPINLOCK(resource_alignment_lock);
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1002,6 +1002,7 @@ int __must_check pci_assign_resource(str
 int __must_check pci_reassign_resource(struct pci_dev *dev, int i, resource_size_t add_size, resource_size_t align);
 int pci_select_bars(struct pci_dev *dev, unsigned long flags);
 bool pci_device_is_present(struct pci_dev *pdev);
+void pci_ignore_hotplug(struct pci_dev *dev);
 
 /* ROM control related routines */
 int pci_enable_rom(struct pci_dev *pdev);
@@ -1039,11 +1040,6 @@ bool pci_dev_run_wake(struct pci_dev *de
 bool pci_check_pme_status(struct pci_dev *dev);
 void pci_pme_wakeup_bus(struct pci_bus *bus);
 
-static inline void pci_ignore_hotplug(struct pci_dev *dev)
-{
-	dev->ignore_hotplug = 1;
-}
-
 static inline int pci_enable_wake(struct pci_dev *dev, pci_power_t state,
 				  bool enable)
 {


Patches currently in stable-queue which might be from rafael.j.wysocki@intel.com are

queue-4.0/leds-pm-fix-hibernation-on-arm-when-gpio-led-used-with-cpu-led-trigger.patch
queue-4.0/acpi-init-switch-over-platform-to-the-acpi-mode-later.patch
queue-4.0/acpi-pm-add-missing-pm_generic_complete-invocation.patch
queue-4.0/pci-propagate-the-ignore-hotplug-setting-to-parent.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-07-17  3:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-17  3:14 Patch "PCI: Propagate the "ignore hotplug" setting to parent" has been added to the 4.0-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).