ACPIPHP / radeon / nouveau: Remove acpi_bus_no_hotplug()
Revert parts of f244d8b623
("ACPIPHP / radeon / nouveau: Fix VGA
switcheroo problem related to hotplug").
A previous commit 5493b31f0b55 ("PCI: Add pci_ignore_hotplug() to ignore
hotplug events for a device") added equivalent functionality implemented in
a different way for both acpiphp and pciehp.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Acked-by: Rajat Jain <rajatxjain@gmail.com>
This commit is contained in:
parent
b440bde74f
commit
f91ce35e47
@ -177,16 +177,6 @@ void acpi_bus_detach_private_data(acpi_handle handle)
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(acpi_bus_detach_private_data);
|
EXPORT_SYMBOL_GPL(acpi_bus_detach_private_data);
|
||||||
|
|
||||||
void acpi_bus_no_hotplug(acpi_handle handle)
|
|
||||||
{
|
|
||||||
struct acpi_device *adev = NULL;
|
|
||||||
|
|
||||||
acpi_bus_get_device(handle, &adev);
|
|
||||||
if (adev)
|
|
||||||
adev->flags.no_hotplug = true;
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL_GPL(acpi_bus_no_hotplug);
|
|
||||||
|
|
||||||
static void acpi_print_osc_error(acpi_handle handle,
|
static void acpi_print_osc_error(acpi_handle handle,
|
||||||
struct acpi_osc_context *context, char *error)
|
struct acpi_osc_context *context, char *error)
|
||||||
{
|
{
|
||||||
|
@ -46,7 +46,6 @@ static struct nouveau_dsm_priv {
|
|||||||
bool dsm_detected;
|
bool dsm_detected;
|
||||||
bool optimus_detected;
|
bool optimus_detected;
|
||||||
acpi_handle dhandle;
|
acpi_handle dhandle;
|
||||||
acpi_handle other_handle;
|
|
||||||
acpi_handle rom_handle;
|
acpi_handle rom_handle;
|
||||||
} nouveau_dsm_priv;
|
} nouveau_dsm_priv;
|
||||||
|
|
||||||
@ -222,10 +221,9 @@ static int nouveau_dsm_pci_probe(struct pci_dev *pdev)
|
|||||||
if (!dhandle)
|
if (!dhandle)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!acpi_has_method(dhandle, "_DSM")) {
|
if (!acpi_has_method(dhandle, "_DSM"))
|
||||||
nouveau_dsm_priv.other_handle = dhandle;
|
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
if (acpi_check_dsm(dhandle, nouveau_dsm_muid, 0x00000102,
|
if (acpi_check_dsm(dhandle, nouveau_dsm_muid, 0x00000102,
|
||||||
1 << NOUVEAU_DSM_POWER))
|
1 << NOUVEAU_DSM_POWER))
|
||||||
retval |= NOUVEAU_DSM_HAS_MUX;
|
retval |= NOUVEAU_DSM_HAS_MUX;
|
||||||
@ -301,16 +299,6 @@ static bool nouveau_dsm_detect(void)
|
|||||||
printk(KERN_INFO "VGA switcheroo: detected DSM switching method %s handle\n",
|
printk(KERN_INFO "VGA switcheroo: detected DSM switching method %s handle\n",
|
||||||
acpi_method_name);
|
acpi_method_name);
|
||||||
nouveau_dsm_priv.dsm_detected = true;
|
nouveau_dsm_priv.dsm_detected = true;
|
||||||
/*
|
|
||||||
* On some systems hotplug events are generated for the device
|
|
||||||
* being switched off when _DSM is executed. They cause ACPI
|
|
||||||
* hotplug to trigger and attempt to remove the device from
|
|
||||||
* the system, which causes it to break down. Prevent that from
|
|
||||||
* happening by setting the no_hotplug flag for the involved
|
|
||||||
* ACPI device objects.
|
|
||||||
*/
|
|
||||||
acpi_bus_no_hotplug(nouveau_dsm_priv.dhandle);
|
|
||||||
acpi_bus_no_hotplug(nouveau_dsm_priv.other_handle);
|
|
||||||
ret = true;
|
ret = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,7 +33,6 @@ static struct radeon_atpx_priv {
|
|||||||
bool atpx_detected;
|
bool atpx_detected;
|
||||||
/* handle for device - and atpx */
|
/* handle for device - and atpx */
|
||||||
acpi_handle dhandle;
|
acpi_handle dhandle;
|
||||||
acpi_handle other_handle;
|
|
||||||
struct radeon_atpx atpx;
|
struct radeon_atpx atpx;
|
||||||
} radeon_atpx_priv;
|
} radeon_atpx_priv;
|
||||||
|
|
||||||
@ -453,10 +452,9 @@ static bool radeon_atpx_pci_probe_handle(struct pci_dev *pdev)
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
status = acpi_get_handle(dhandle, "ATPX", &atpx_handle);
|
status = acpi_get_handle(dhandle, "ATPX", &atpx_handle);
|
||||||
if (ACPI_FAILURE(status)) {
|
if (ACPI_FAILURE(status))
|
||||||
radeon_atpx_priv.other_handle = dhandle;
|
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
radeon_atpx_priv.dhandle = dhandle;
|
radeon_atpx_priv.dhandle = dhandle;
|
||||||
radeon_atpx_priv.atpx.handle = atpx_handle;
|
radeon_atpx_priv.atpx.handle = atpx_handle;
|
||||||
return true;
|
return true;
|
||||||
@ -540,16 +538,6 @@ static bool radeon_atpx_detect(void)
|
|||||||
printk(KERN_INFO "VGA switcheroo: detected switching method %s handle\n",
|
printk(KERN_INFO "VGA switcheroo: detected switching method %s handle\n",
|
||||||
acpi_method_name);
|
acpi_method_name);
|
||||||
radeon_atpx_priv.atpx_detected = true;
|
radeon_atpx_priv.atpx_detected = true;
|
||||||
/*
|
|
||||||
* On some systems hotplug events are generated for the device
|
|
||||||
* being switched off when ATPX is executed. They cause ACPI
|
|
||||||
* hotplug to trigger and attempt to remove the device from
|
|
||||||
* the system, which causes it to break down. Prevent that from
|
|
||||||
* happening by setting the no_hotplug flag for the involved
|
|
||||||
* ACPI device objects.
|
|
||||||
*/
|
|
||||||
acpi_bus_no_hotplug(radeon_atpx_priv.dhandle);
|
|
||||||
acpi_bus_no_hotplug(radeon_atpx_priv.other_handle);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -204,10 +204,9 @@ struct acpi_device_flags {
|
|||||||
u32 match_driver:1;
|
u32 match_driver:1;
|
||||||
u32 initialized:1;
|
u32 initialized:1;
|
||||||
u32 visited:1;
|
u32 visited:1;
|
||||||
u32 no_hotplug:1;
|
|
||||||
u32 hotplug_notify:1;
|
u32 hotplug_notify:1;
|
||||||
u32 is_dock_station:1;
|
u32 is_dock_station:1;
|
||||||
u32 reserved:22;
|
u32 reserved:23;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* File System */
|
/* File System */
|
||||||
@ -412,7 +411,6 @@ void acpi_bus_private_data_handler(acpi_handle, void *);
|
|||||||
int acpi_bus_get_private_data(acpi_handle, void **);
|
int acpi_bus_get_private_data(acpi_handle, void **);
|
||||||
int acpi_bus_attach_private_data(acpi_handle, void *);
|
int acpi_bus_attach_private_data(acpi_handle, void *);
|
||||||
void acpi_bus_detach_private_data(acpi_handle);
|
void acpi_bus_detach_private_data(acpi_handle);
|
||||||
void acpi_bus_no_hotplug(acpi_handle handle);
|
|
||||||
extern int acpi_notifier_call_chain(struct acpi_device *, u32, u32);
|
extern int acpi_notifier_call_chain(struct acpi_device *, u32, u32);
|
||||||
extern int register_acpi_notifier(struct notifier_block *);
|
extern int register_acpi_notifier(struct notifier_block *);
|
||||||
extern int unregister_acpi_notifier(struct notifier_block *);
|
extern int unregister_acpi_notifier(struct notifier_block *);
|
||||||
|
Loading…
Reference in New Issue
Block a user