alistair23-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.h Merge branch 'acpi-hotplug' 2013-11-19 21:18:13 +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
cpci_hotplug.h
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
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.h
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
cpqphp_nvram.h
cpqphp_pci.c PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
cpqphp_sysfs.c
ibmphp.h PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07: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
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.h 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
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
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.h
rpadlpar_core.c PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
rpadlpar_sysfs.c
rpaphp.h PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07: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
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.h PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
shpchp_core.c PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
shpchp_ctrl.c
shpchp_hpc.c PCI: Fix whitespace, capitalization, and spelling errors 2013-11-14 11:28:18 -07:00
shpchp_pci.c
shpchp_sysfs.c