mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
PCI: Propagate the "ignore hotplug" setting to parent
Refine the mechanism introduced by commitf244d8b623("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:b440bde74f("PCI: Add pci_ignore_hotplug() to ignore hotplug events for a device") Reported-and-tested-by: tiagdtd-lava <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> CC: [email protected] # v3.17+
This commit is contained in:
parent
d41be3466f
commit
0824965140
2 changed files with 12 additions and 5 deletions
|
|
@ -4324,6 +4324,17 @@ bool pci_device_is_present(struct pci_dev *pdev)
|
|||
}
|
||||
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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue