diff options
author | Shaohua Li <shaohua.li@intel.com> | 2008-08-27 22:02:03 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-09-23 22:54:39 -0400 |
commit | 8b59560a3baf2e7c24e0fb92ea5d09eca92805db (patch) | |
tree | 667d19e207f65049873a3283049ff93fa8e68472 /drivers | |
parent | 72d31053f62c4bc464c2783974926969614a8649 (diff) |
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=10431
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/dock.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c index 7d2edf143f16..25d2161ae9d9 100644 --- a/drivers/acpi/dock.c +++ b/drivers/acpi/dock.c | |||
@@ -604,14 +604,17 @@ static int handle_eject_request(struct dock_station *ds, u32 event) | |||
604 | static void dock_notify(acpi_handle handle, u32 event, void *data) | 604 | static void dock_notify(acpi_handle handle, u32 event, void *data) |
605 | { | 605 | { |
606 | struct dock_station *ds = data; | 606 | struct dock_station *ds = data; |
607 | struct acpi_device *tmp; | ||
607 | 608 | ||
608 | switch (event) { | 609 | switch (event) { |
609 | case ACPI_NOTIFY_BUS_CHECK: | 610 | case ACPI_NOTIFY_BUS_CHECK: |
610 | if (!dock_in_progress(ds) && dock_present(ds)) { | 611 | if (!dock_in_progress(ds) && acpi_bus_get_device(ds->handle, |
612 | &tmp)) { | ||
611 | begin_dock(ds); | 613 | begin_dock(ds); |
612 | dock(ds); | 614 | dock(ds); |
613 | if (!dock_present(ds)) { | 615 | if (!dock_present(ds)) { |
614 | printk(KERN_ERR PREFIX "Unable to dock!\n"); | 616 | printk(KERN_ERR PREFIX "Unable to dock!\n"); |
617 | complete_dock(ds); | ||
615 | break; | 618 | break; |
616 | } | 619 | } |
617 | atomic_notifier_call_chain(&dock_notifier_list, | 620 | atomic_notifier_call_chain(&dock_notifier_list, |