Commit 4bdaa73e authored by Shaohua Li's avatar Shaohua Li Committed by Greg Kroah-Hartman

ACPI: dock: avoid check _STA method

commit 8b59560a upstream.

ACPI: dock: avoid check _STA method

In some BIOSes, every _STA method call will send a notification again,
this cause freeze. And in some BIOSes, it appears _STA should be called
after _DCK. This tries to avoid calls _STA, and still keep the device
present check.

http://bugzilla.kernel.org/show_bug.cgi?id=10431Signed-off-by: default avatarShaohua Li <shaohua.li@intel.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent a133c85c
...@@ -599,14 +599,17 @@ static int handle_eject_request(struct dock_station *ds, u32 event) ...@@ -599,14 +599,17 @@ static int handle_eject_request(struct dock_station *ds, u32 event)
static void dock_notify(acpi_handle handle, u32 event, void *data) static void dock_notify(acpi_handle handle, u32 event, void *data)
{ {
struct dock_station *ds = data; struct dock_station *ds = data;
struct acpi_device *tmp;
switch (event) { switch (event) {
case ACPI_NOTIFY_BUS_CHECK: case ACPI_NOTIFY_BUS_CHECK:
if (!dock_in_progress(ds) && dock_present(ds)) { if (!dock_in_progress(ds) && acpi_bus_get_device(ds->handle,
&tmp)) {
begin_dock(ds); begin_dock(ds);
dock(ds); dock(ds);
if (!dock_present(ds)) { if (!dock_present(ds)) {
printk(KERN_ERR PREFIX "Unable to dock!\n"); printk(KERN_ERR PREFIX "Unable to dock!\n");
complete_dock(ds);
break; break;
} }
atomic_notifier_call_chain(&dock_notifier_list, atomic_notifier_call_chain(&dock_notifier_list,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment