linux/drivers/pci/hotplug
Rafael J. Wysocki f244d8b623 ACPIPHP / radeon / nouveau: Fix VGA switcheroo problem related to hotplug
The changes in the ACPI-based PCI hotplug (ACPIPHP) subsystem made
during the 3.12 development cycle uncovered a problem with VGA
switcheroo that on some systems, when the device-specific method
(ATPX in the radeon case, _DSM in the nouveau case) is used to turn
off the discrete graphics, the BIOS generates ACPI hotplug events for
that device and those events cause ACPIPHP to attempt to remove the
device from the system (they are events for a device that was present
previously and is not present any more, so that's what should be done
according to the spec).  Then, the system stops functioning correctly.

Since the hotplug events in question were simply silently ignored
previously, the least intrusive way to address that problem is to
make ACPIPHP ignore them again.  For this purpose, introduce a new
ACPI device flag, no_hotplug, and modify ACPIPHP to ignore hotplug
events for PCI devices whose ACPI companions have that flag set.
Next, make the radeon and nouveau switcheroo detection code set the
no_hotplug flag for the discrete graphics' ACPI companion.

Fixes: bbd34fcdd1 (ACPI / hotplug / PCI: Register all devices under the given bridge)
References: https://bugzilla.kernel.org/show_bug.cgi?id=61891
References: https://bugzilla.kernel.org/show_bug.cgi?id=64891
Reported-and-tested-by: Mike Lothian <mike@fireburn.co.uk>
Reported-and-tested-by: <madcatx@atlas.cz>
Reported-and-tested-by: Joaquín Aramendía <samsagax@gmail.com>
Cc: Alex Deucher <alexdeucher@gmail.com>
Cc: Dave Airlie <airlied@linux.ie>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: 3.12+ <stable@vger.kernel.org> # 3.12+
2013-12-31 13:39:42 +01:00
..
acpi_pcihp.c ACPI: Eliminate the DEVICE_ACPI_HANDLE() macro 2013-11-14 23:17:21 +01:00
acpiphp_core.c PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
acpiphp_glue.c ACPIPHP / radeon / nouveau: Fix VGA switcheroo problem related to hotplug 2013-12-31 13:39:42 +01:00
acpiphp_ibm.c PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
acpiphp.h Merge branch 'acpi-hotplug' 2013-11-19 21:18:13 +01:00
cpci_hotplug_core.c PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
cpci_hotplug_pci.c PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
cpci_hotplug.h PCI: Remove "extern" from function declarations 2013-04-17 10:21:17 -06:00
cpcihp_generic.c PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
cpcihp_zt5550.c PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
cpcihp_zt5550.h PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
cpqphp_core.c PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
cpqphp_ctrl.c PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
cpqphp_nvram.c PCI Hotplug: cpqphp: fix comment style 2009-06-11 12:04:08 -07:00
cpqphp_nvram.h PCI: Remove "extern" from function declarations 2013-04-17 10:21:17 -06:00
cpqphp_pci.c PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
cpqphp_sysfs.c cpqphp_sysfs: switch to fixed_size_llseek() 2013-06-29 12:57:52 +04:00
cpqphp.h PCI: Remove "extern" from function declarations 2013-04-17 10:21:17 -06:00
ibmphp_core.c PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
ibmphp_ebda.c PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
ibmphp_hpc.c PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
ibmphp_pci.c PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
ibmphp_res.c PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
ibmphp.h PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
Kconfig PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
Makefile PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
pci_hotplug_core.c PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
pciehp_acpi.c PCI updates for v3.13: 2013-11-22 10:53:47 -08:00
pciehp_core.c PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
pciehp_ctrl.c PCI: pciehp: Use per-slot workqueues to avoid deadlock 2013-01-12 13:56:33 -07:00
pciehp_hpc.c PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
pciehp_pci.c PCI: pciehp: Fix null pointer deref when hot-removing SR-IOV device 2013-07-25 14:11:06 -06:00
pciehp.h PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
pcihp_skeleton.c PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
pcihp_slot.c PCI: Simplify pcie_bus_configure_settings() interface 2013-08-22 10:47:02 -06:00
rpadlpar_core.c PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
rpadlpar_sysfs.c PCI: introduce pci_slot 2008-06-10 14:37:03 -07:00
rpadlpar.h PCI: Remove "extern" from function declarations 2013-04-17 10:21:17 -06:00
rpaphp_core.c PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
rpaphp_pci.c PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
rpaphp_slot.c PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
rpaphp.h PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
s390_pci_hpc.c s390/pci: message cleanup 2013-10-24 17:17:15 +02:00
sgi_hotplug.c ACPI / driver core: Store an ACPI device pointer in struct acpi_dev_node 2013-11-14 23:14:43 +01:00
shpchp_core.c PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
shpchp_ctrl.c PCI: shpchp: Use per-slot workqueues to avoid deadlock 2013-01-14 10:23:22 -07:00
shpchp_hpc.c PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
shpchp_pci.c PCI: shpchp: Iterate over all devices in slot, not functions 0-7 2013-01-25 09:23:08 -07:00
shpchp_sysfs.c PCI: Remove __must_check from definitions 2013-04-17 10:20:58 -06:00
shpchp.h PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00