aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorShaohua Li <shaohua.li@intel.com>2008-08-28 10:02:03 +0800
committerGreg Kroah-Hartman <gregkh@suse.de>2008-11-13 09:56:03 -0800
commita442c763d20e7716bd1b91dc33ba0e27e2a7fda0 (patch)
tree3bf94b72a7e5ced7e3b4cb93b1647a8745e73889 /drivers
parent6a58f99038956a40c9feb5abf7cef8d306c3cf03 (diff)
ACPI: dock: avoid check _STA method
commit 8b59560a3baf2e7c24e0fb92ea5d09eca92805db upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/dock.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c
index 7d2edf143f1..25d2161ae9d 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)
static void dock_notify(acpi_handle handle, u32 event, void *data)
{
struct dock_station *ds = data;
+ struct acpi_device *tmp;
switch (event) {
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);
dock(ds);
if (!dock_present(ds)) {
printk(KERN_ERR PREFIX "Unable to dock!\n");
+ complete_dock(ds);
break;
}
atomic_notifier_call_chain(&dock_notifier_list,